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 ifeq ($(ADK_TARGET_SYSTEM_NUMATO_MIMASV2
),y
)
9 KERNEL
:=$(LINUX_DIR
)/vmlinux
11 KERNEL
:=$(LINUX_DIR
)/arch
/sh
/boot
/zImage
13 OSTRIP
:=-R .reginfo
-R .notes
-R .note
-R .comment
-R .mdebug
-R .note.gnu.build-id
16 QEMU_ARGS
+=${ADK_QEMU_ARGS}
17 QEMU_ARGS
+=-monitor null
18 QEMU_ARGS
+=-net user
-net nic
,model
=rtl8139
20 ifeq ($(ADK_TARGET_QEMU_WITH_GRAPHIC
),)
21 QEMU_ARGS
+=-serial null
-serial stdio
25 ifeq ($(ADK_TARGET_FS
),archive
)
27 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
28 ifeq ($(ADK_TARGET_QEMU
),y
)
29 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
30 @echo
"Use following command to create a QEMU Image:"
31 @echo
"./scripts/create.sh qemu-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
32 @echo
"Start qemu with following options:"
33 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img'
36 ifeq ($(ADK_TARGET_FS
),initramfs
)
38 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
39 @echo
'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
40 ifeq ($(ADK_TARGET_QEMU
),y
)
41 @echo
"Start qemu with following command line:"
42 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
45 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
47 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
48 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
50 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
52 @echo
'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
53 ifeq ($(ADK_TARGET_QEMU
),y
)
54 @echo
"Start qemu with following command line:"
55 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
59 # image creation and kernel install
61 ifeq ($(ADK_TARGET_SYSTEM_NUMATO_MIMASV2
),y
)
62 $(TARGET_CROSS
)objcopy
$(OSTRIP
) -S
$(KERNEL
) $(BUILD_DIR
)/$(TARGET_KERNEL
)
64 @cp
$(KERNEL
) $(BUILD_DIR
)/$(TARGET_KERNEL
)
67 kernel-install
: kernel-strip
68 @cp
$(BUILD_DIR
)/$(TARGET_KERNEL
) $(FW_DIR
)/${TARGET_KERNEL}
71 ifeq ($(ADK_TARGET_SYSTEM_NUMATO_MIMASV2
),y
)
72 PATH
='$(HOST_PATH)' dtc
-O dtb
-o
$(FW_DIR
)/dt.dtb \
73 $(LINUX_DIR
)/arch
/sh
/boot
/dts
/j2_mimas_v2.dts
76 # filesystem specific targets
77 ifeq ($(ADK_TARGET_FS
),archive
)
78 imageinstall
: $(FW_DIR
)/$(ROOTFSTARBALL
) targethelp
80 ifeq ($(ADK_TARGET_FS
),initramfs
)
81 imageinstall
: kernel-install
$(FW_DIR
)/$(INITRAMFS
) targethelp
83 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
84 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp
86 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
87 imageinstall
: dtb-install createinitramfs targethelp