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
10 QEMU_ARGS
:=${ADK_QEMU_ARGS}
11 ifeq ($(ADK_TARGET_SYSTEM_QEMU_M68K_VIRT
),y
)
12 QEMU_ARGS
+=-M virt
-m
512M
-netdev user
,id
=eth0
-device virtio-net-device
,netdev
=eth0
13 ifeq ($(ADK_TARGET_FS
),archive
)
14 QEMU_ARGS
+=-append
"rootwait root=/dev/vda1 ro" -drive file
=qemu-m68k.img
,format
=raw
,id
=hd0
-device virtio-blk-device
,drive
=hd0
17 ifeq ($(ADK_TARGET_SYSTEM_QEMU_M68K_Q800
),y
)
20 ifeq ($(ADK_TARGET_SYSTEM_QEMU_M68K_MCF5208
),y
)
21 QEMU_ARGS
+=-M mcf5208evb
-cpu m5208
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)/$(ROOTFSUSERTARBALL)"
32 @echo
"Start qemu with following options:"
33 ifeq ($(ADK_TARGET_SYSTEM_QEMU_M68K_VIRT
),y
)
34 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
36 @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}'
48 ifeq ($(ADK_TARGET_SYSTEM_ARANYM_M68K
),y
)
49 @sed
-e
"s#@@KERNEL@@#$(FW_DIR)/$(TARGET_KERNEL)#" \
50 -e
"s#@@INITRAMFS@@#${FW_DIR}/${INITRAMFS}#" \
51 $(ADK_TOPDIR
)/target
/m68k
/aranym.cfg.in \
52 > $(ADK_TOPDIR
)/target
/m68k
/aranym.cfg
53 @echo
'Start aranym with: aranym-mmu -l -c target/m68k/aranym.cfg'
54 @echo
'Ungrab mouse with middle mouse click'
57 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
59 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
60 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
62 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
64 @echo
'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
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)'
73 kernel-install
: kernel-strip
74 @cp
$(KERNEL
) $(FW_DIR
)/$(TARGET_KERNEL
)
76 # filesystem specific targets
77 ifeq ($(ADK_TARGET_FS
),archive
)
78 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) 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
: createinitramfs targethelp