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
)
14 QEMU_ARGS
+=-device e1000
,netdev
=adk0
-netdev user
,id
=adk0
16 ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC_VIRTEX_ML507
),y
)
17 QEMU_ARGS
+=-M virtex-ml507
-m
256 -dtb
$(FW_DIR
)/ppc.dtb
19 ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC_BAMBOO
),y
)
21 QEMU_ARGS
+=-device e1000
,netdev
=adk0
-netdev user
,id
=adk0
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
29 ifeq ($(ADK_TARGET_FS
),archive
)
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'
40 ifeq ($(ADK_TARGET_FS
),initramfs
)
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}'
49 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
51 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
52 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
54 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
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)'
62 ifeq ($(ADK_TARGET_FS
),nfsroot
)
64 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
65 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
68 # image creation and kernel install
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}
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 \
82 # filesystem specific targets
83 ifeq ($(ADK_TARGET_FS
),archive
)
84 imageinstall
: dtb-install
$(FW_DIR
)/$(ROOTFSTARBALL
) targethelp
86 ifeq ($(ADK_TARGET_FS
),initramfs
)
87 imageinstall
: dtb-install kernel-install
$(FW_DIR
)/$(INITRAMFS
) targethelp
89 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
90 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp
92 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
93 imageinstall
: dtb-install createinitramfs targethelp
95 ifeq ($(ADK_TARGET_FS
),nfsroot
)
96 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp