1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR
)/rules.mk
5 include $(ADK_TOPDIR
)/mk
/kernel-build.mk
6 include $(ADK_TOPDIR
)/mk
/image.mk
8 KERNEL
:=$(LINUX_DIR
)/vmlinux
9 OSTRIP
:=-R .reginfo
-R .notes
-R .note
-R .comment
-R .mdebug
-R .note.gnu.build-id
10 QEMU_ARGS
:=-m
256 -nographic
13 ifeq ($(ADK_TARGET_FS
),initramfs
)
15 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
16 @echo
'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
17 ifeq ($(ADK_TARGET_QEMU
),y
)
18 @echo
"Start qemu with following command line:"
19 @echo
'qemu-system-or1k ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
22 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
24 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
25 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
27 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
29 @echo
'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
30 ifeq ($(ADK_TARGET_QEMU
),y
)
31 @echo
"Start qemu with following command line:"
32 @echo
'qemu-system-or1k ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
37 $(TARGET_CROSS
)objcopy
$(OSTRIP
) -S
$(KERNEL
) $(BUILD_DIR
)/$(TARGET_KERNEL
)
39 kernel-install
: kernel-strip
40 @cp
$(BUILD_DIR
)/$(TARGET_KERNEL
) $(FW_DIR
)/$(TARGET_KERNEL
)
42 # filesystem specific targets
43 ifeq ($(ADK_TARGET_FS
),initramfs
)
44 imageinstall
: kernel-install
$(FW_DIR
)/$(INITRAMFS
) targethelp
46 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
47 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp
49 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
50 imageinstall
: createinitramfs targethelp