numato-mimasv2: works fine with 6.6.x/6.9.x
[openadk.git] / target / m68k / Makefile
blob0b742ed197c929cd28dd51fa89c53b516ca6c419
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
15 endif
16 endif
17 ifeq ($(ADK_TARGET_SYSTEM_QEMU_M68K_Q800),y)
18 QEMU_ARGS+=-M q800
19 endif
20 ifeq ($(ADK_TARGET_SYSTEM_QEMU_M68K_MCF5208),y)
21 QEMU_ARGS+=-M mcf5208evb -cpu m5208
22 endif
24 # target helper text
25 ifeq ($(ADK_TARGET_FS),archive)
26 targethelp:
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)'
35 else
36 @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img'
37 endif
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 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'
55 endif
56 endif
57 ifeq ($(ADK_TARGET_FS),initramfsarchive)
58 targethelp:
59 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
60 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
61 endif
62 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
63 targethelp:
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)'
68 endif
69 endif
71 kernel-strip:
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
79 endif
80 ifeq ($(ADK_TARGET_FS),initramfs)
81 imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
82 endif
83 ifeq ($(ADK_TARGET_FS),initramfsarchive)
84 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
85 endif
86 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
87 imageinstall: createinitramfs targethelp
88 endif