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
),usb
)
33 @echo
'The root tarball is: ${FW_DIR}/${ROOTFSTARBALL}'
34 ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG
),y
)
35 @echo
"Startup the netbook and type del to enter PMON:"
36 @echo
"PMON> load /dev/fs/ext2@usb0/boot/kernel"
40 ifeq ($(ADK_TARGET_FS
),archive
)
42 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
43 ifeq ($(ADK_TARGET_QEMU
),y
)
44 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
45 @echo
"Use following command to create a QEMU Image:"
46 @echo
"./scripts/create.sh qemu-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
47 @echo
"Start qemu with following options:"
48 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img'
50 ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG
),y
)
51 @echo
"Startup the Lemote Yeelong and type del to enter PMON:"
52 @echo
"PMON> load /dev/fs/ext2@wd0a/boot/kernel"
53 @echo
"PMON> g root=/dev/sda1"
56 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
58 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
59 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
61 ifeq ($(ADK_TARGET_FS
),initramfs
)
63 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
64 @echo
'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
65 ifeq ($(ADK_TARGET_QEMU
),y
)
66 @echo
"Start qemu with following command line:"
67 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
70 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
72 @echo
'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
73 ifeq ($(ADK_TARGET_QEMU
),y
)
74 @echo
"Start qemu with following command line:"
75 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
79 # image creation and kernel install
81 $(TARGET_CROSS
)objcopy
$(OSTRIP
) -S
$(KERNEL
) $(BUILD_DIR
)/$(TARGET_KERNEL
)
83 kernel-install
: kernel-strip
84 @cp
$(BUILD_DIR
)/$(TARGET_KERNEL
) $(FW_DIR
)/${TARGET_KERNEL}
86 # filesystem specific targets
87 ifeq ($(ADK_TARGET_FS
),nfsroot
)
88 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp
90 ifeq ($(ADK_TARGET_FS
),archive
)
91 imageinstall
: $(FW_DIR
)/$(ROOTFSTARBALL
) targethelp
93 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
94 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp
96 ifeq ($(ADK_TARGET_FS
),initramfs
)
97 imageinstall
: kernel-install
$(FW_DIR
)/$(INITRAMFS
) targethelp
99 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
100 imageinstall
: createinitramfs targethelp
102 ifeq ($(ADK_TARGET_FS
),usb
)
103 imageinstall
: $(FW_DIR
)/$(ROOTFSTARBALL
) targethelp