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 ifeq ($(ADK_TARGET_KERNEL_UIMAGEBIN
),y
)
11 KERNEL
:=$(LINUX_DIR
)/arch
/h8300
/boot
/uImage.bin
14 ifeq ($(ADK_TARGET_KERNEL_ZIMAGE
),y
)
15 KERNEL
:=$(LINUX_DIR
)/arch
/h8300
/boot
/zImage
18 ifeq ($(ADK_TARGET_KERNEL_VMLINUX_SREC
),y
)
19 KERNEL
:=$(LINUX_DIR
)/arch
/h8300
/boot
/vmlinux.srec
23 ifeq ($(ADK_TARGET_FS
),archive
)
25 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
27 ifeq ($(ADK_TARGET_FS
),initramfs
)
29 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
30 @echo
'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
32 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
34 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
35 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
37 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
39 @echo
'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
40 ifeq ($(ADK_TARGET_SIM
),y
)
41 @echo
"Run the simulator via:"
42 @echo
'$(TARGET_CROSS)gdb $(FW_DIR)/$(TARGET_KERNEL)'
43 @echo
'gdb> target sim'
44 @echo
'gdb> sim intmode 1'
45 @echo
'gdb> sim sci net 12345'
47 @echo
'start telnet localhost 12345 in a second shell'
48 @echo
'gdb> run earlyprintk=h8300-sim console=ttySC0'
51 ifeq ($(ADK_TARGET_FS
),nfsroot
)
53 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
54 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
59 $(TARGET_CROSS
)objcopy
$(OSTRIP
) -S
$(KERNEL
) $(BUILD_DIR
)/$(TARGET_KERNEL
)
61 @cp
$(KERNEL
) $(BUILD_DIR
)/$(TARGET_KERNEL
)
64 kernel-install
: kernel-strip
65 @cp
$(BUILD_DIR
)/$(TARGET_KERNEL
) $(FW_DIR
)/$(TARGET_KERNEL
)
67 # filesystem specific targets
68 ifeq ($(ADK_TARGET_FS
),archive
)
69 imageinstall
: $(FW_DIR
)/$(ROOTFSTARBALL
) targethelp
71 ifeq ($(ADK_TARGET_FS
),initramfs
)
72 imageinstall
: kernel-install
$(FW_DIR
)/$(INITRAMFS
) targethelp
74 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
75 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp
77 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
78 imageinstall
: createinitramfs targethelp
80 ifeq ($(ADK_TARGET_FS
),nfsroot
)
81 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp