remove duplicate package
[openadk.git] / target / ppc / Makefile
blob2b143943f38c588082ee4b82a4d4e7f0fb2c52ba
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
11 QEMU_ARGS:=${ADK_QEMU_ARGS}
12 ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC_MACPPC),y)
13 QEMU_ARGS+=-M mac99
14 QEMU_ARGS+=-device e1000,netdev=adk0 -netdev user,id=adk0
15 endif
16 ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC_VIRTEX_ML507),y)
17 QEMU_ARGS+=-M virtex-ml507 -m 256 -dtb $(FW_DIR)/ppc.dtb
18 endif
19 ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC_BAMBOO),y)
20 QEMU_ARGS+=-M bamboo
21 QEMU_ARGS+=-device e1000,netdev=adk0 -netdev user,id=adk0
22 endif
23 ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC_MPC8544DS),y)
24 QEMU_ARGS+=-M mpc8544ds
25 QEMU_ARGS+=-device e1000,netdev=adk0 -netdev user,id=adk0
26 endif
28 # target helper text
29 ifeq ($(ADK_TARGET_FS),archive)
30 targethelp:
31 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
32 ifeq ($(ADK_TARGET_QEMU),y)
33 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
34 @echo "Use following command to create a QEMU Image:"
35 @echo "./scripts/create.sh qemu-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
36 @echo "Start qemu with following options:"
37 @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img'
38 endif
39 endif
40 ifeq ($(ADK_TARGET_FS),initramfs)
41 targethelp:
42 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
43 @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
44 ifeq ($(ADK_TARGET_QEMU),y)
45 @echo "Start qemu with following command line:"
46 @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
47 endif
48 endif
49 ifeq ($(ADK_TARGET_FS),initramfsarchive)
50 targethelp:
51 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
52 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
53 endif
54 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
55 targethelp:
56 @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
57 ifeq ($(ADK_TARGET_QEMU),y)
58 @echo "Start qemu with following command line:"
59 @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
60 endif
61 endif
62 ifeq ($(ADK_TARGET_FS),nfsroot)
63 targethelp:
64 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
65 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
66 endif
68 # image creation and kernel install
69 kernel-strip:
70 $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
72 kernel-install: kernel-strip
73 @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
75 dtb-install:
76 ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC_VIRTEX_ML507),y)
77 ${KERNEL_MAKE} virtex440-ml507.dtb $(MAKE_TRACE)
78 $(CP) $(LINUX_DIR)/arch/powerpc/boot/virtex440-ml507.dtb \
79 $(FW_DIR)/ppc.dtb
80 endif
82 # filesystem specific targets
83 ifeq ($(ADK_TARGET_FS),archive)
84 imageinstall: dtb-install $(FW_DIR)/$(ROOTFSTARBALL) targethelp
85 endif
86 ifeq ($(ADK_TARGET_FS),initramfs)
87 imageinstall: dtb-install kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
88 endif
89 ifeq ($(ADK_TARGET_FS),initramfsarchive)
90 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
91 endif
92 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
93 imageinstall: dtb-install createinitramfs targethelp
94 endif
95 ifeq ($(ADK_TARGET_FS),nfsroot)
96 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
97 endif