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
)/$(ADK_TARGET_KERNEL
)
9 OSTRIP
:=-R .reginfo
-R .notes
-R .note
-R .comment
-R .mdebug
-R .note.gnu.build-id
12 QEMU_ARGS
+=${ADK_QEMU_ARGS}
13 QEMU_ARGS
+=-device e1000
,netdev
=adk0
-netdev user
,id
=adk0
15 ifeq ($(ADK_TARGET_CPU_MIPS64_MIPS64R6
),y
)
20 ifeq ($(ADK_TARGET_FS
),nfsroot
)
22 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
23 @echo
'The nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
24 ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG
),y
)
25 @echo
'Boot your Lemote Yeelong and type following commands in PMON:'
26 @echo
'PMON> ifaddr rtl0 <ip-address-client>'
27 @echo
'PMON> load tftp://<ip-address-server>/${TARGET_KERNEL}'
31 ifeq ($(ADK_TARGET_FS
),yaffs
)
33 @echo
'The root tarball is: ${FW_DIR}/${ROOTFSTARBALL}'
34 @echo
'Format your NAND with Routerboot, boot via NFS and'
35 @echo
'then install kernel and filesystem via:'
36 @echo
'adkinstall ${ROOTFSTARBALL}'
38 ifeq ($(ADK_TARGET_FS
),usb
)
40 @echo
'The root tarball is: ${FW_DIR}/${ROOTFSTARBALL}'
41 ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG
),y
)
42 @echo
"Startup the netbook and type del to enter PMON:"
43 @echo
"PMON> load /dev/fs/ext2@usb0/boot/kernel"
47 ifeq ($(ADK_TARGET_FS
),archive
)
49 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
50 ifeq ($(ADK_TARGET_QEMU
),y
)
51 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
52 @echo
"Use following command to create a QEMU Image:"
53 @echo
"./scripts/create.sh qemu-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
54 @echo
"Start qemu with following options:"
55 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img'
57 ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG
),y
)
58 @echo
"Startup the Lemote Yeelong and type del to enter PMON:"
59 @echo
"PMON> load /dev/fs/ext2@wd0a/boot/kernel"
60 @echo
"PMON> g root=/dev/sda1"
63 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
65 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
66 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
68 ifeq ($(ADK_TARGET_FS
),initramfs
)
70 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
71 @echo
'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
72 ifeq ($(ADK_TARGET_QEMU
),y
)
73 @echo
"Start qemu with following command line:"
74 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
77 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
79 @echo
'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
80 ifeq ($(ADK_TARGET_QEMU
),y
)
81 @echo
"Start qemu with following command line:"
82 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
86 # image creation and kernel install
88 $(TARGET_CROSS
)objcopy
$(OSTRIP
) -S
$(KERNEL
) $(BUILD_DIR
)/$(TARGET_KERNEL
)
90 kernel-install
: kernel-strip
91 @cp
$(BUILD_DIR
)/$(TARGET_KERNEL
) $(FW_DIR
)/${TARGET_KERNEL}
93 # filesystem specific targets
94 ifeq ($(ADK_TARGET_FS
),nfsroot
)
95 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp
97 ifeq ($(ADK_TARGET_FS
),archive
)
98 imageinstall
: $(FW_DIR
)/$(ROOTFSTARBALL
) targethelp
100 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
101 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp
103 ifeq ($(ADK_TARGET_FS
),initramfs
)
104 imageinstall
: kernel-install
$(FW_DIR
)/$(INITRAMFS
) targethelp
106 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
107 imageinstall
: createinitramfs targethelp
109 ifeq ($(ADK_TARGET_FS
),usb
)
110 imageinstall
: $(FW_DIR
)/$(ROOTFSTARBALL
) targethelp