enable travis notification
[openadk.git] / target / mips64 / Makefile
blob74d28143460928695a2cdc7e1ca518046d18cfd7
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
11 QEMU_ARGS:=-M malta
12 QEMU_ARGS+=${ADK_QEMU_ARGS}
13 QEMU_ARGS+=-device e1000,netdev=adk0 -netdev user,id=adk0
15 # target helper text
16 ifeq ($(ADK_TARGET_FS),nfsroot)
17 targethelp:
18 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
19 @echo 'The nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
20 ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
21 @echo 'Boot your Lemote Yeelong and type following commands in PMON:'
22 @echo 'PMON> ifaddr rtl0 <ip-address-client>'
23 @echo 'PMON> load tftp://<ip-address-server>/${TARGET_KERNEL}'
24 @echo 'PMON> g'
25 endif
26 endif
27 ifeq ($(ADK_TARGET_FS),yaffs)
28 targethelp:
29 @echo 'The root tarball is: ${FW_DIR}/${ROOTFSTARBALL}'
30 @echo 'Format your NAND with Routerboot, boot via NFS and'
31 @echo 'then install kernel and filesystem via:'
32 @echo 'adkinstall ${ROOTFSTARBALL}'
33 endif
34 ifeq ($(ADK_TARGET_FS),usb)
35 targethelp:
36 @echo 'The root tarball is: ${FW_DIR}/${ROOTFSTARBALL}'
37 ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
38 @echo "Startup the netbook and type del to enter PMON:"
39 @echo "PMON> load /dev/fs/ext2@usb0/boot/kernel"
40 @echo "PMON> g"
41 endif
42 endif
43 ifeq ($(ADK_TARGET_FS),archive)
44 targethelp:
45 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
46 ifeq ($(ADK_TARGET_QEMU),y)
47 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
48 @echo "Use following command to create a QEMU Image:"
49 @echo "./scripts/create.sh qemu-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
50 @echo "Start qemu with following options:"
51 @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img'
52 endif
53 ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
54 @echo "Startup the Lemote Yeelong and type del to enter PMON:"
55 @echo "PMON> load /dev/fs/ext2@wd0a/boot/kernel"
56 @echo "PMON> g root=/dev/sda1"
57 endif
58 endif
59 ifeq ($(ADK_TARGET_FS),initramfsarchive)
60 targethelp:
61 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
62 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
63 endif
64 ifeq ($(ADK_TARGET_FS),initramfs)
65 targethelp:
66 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
67 @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
68 ifeq ($(ADK_TARGET_QEMU),y)
69 @echo "Start qemu with following command line:"
70 @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
71 endif
72 endif
73 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
74 targethelp:
75 @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
76 ifeq ($(ADK_TARGET_QEMU),y)
77 @echo "Start qemu with following command line:"
78 @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
79 endif
80 endif
82 # image creation and kernel install
83 kernel-strip:
84 $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
86 kernel-install: kernel-strip
87 @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
89 # filesystem specific targets
90 ifeq ($(ADK_TARGET_FS),nfsroot)
91 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
92 endif
93 ifeq ($(ADK_TARGET_FS),archive)
94 imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
95 endif
96 ifeq ($(ADK_TARGET_FS),initramfsarchive)
97 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
98 endif
99 ifeq ($(ADK_TARGET_FS),initramfs)
100 imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
101 endif
102 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
103 imageinstall: createinitramfs targethelp
104 endif
105 ifeq ($(ADK_TARGET_FS),usb)
106 imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
107 endif