linux: update to 6.10.x, 6.9.x is EOL
[openadk.git] / target / arc / Makefile
blobdecdd817614dc7b9c53f272f9ba7156434b6ea8f
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)/$(ADK_TARGET_KERNEL)
9 ifeq ($(ADK_TARGET_KERNEL_UIMAGE),y)
10 KERNEL:=$(LINUX_DIR)/arch/arc/boot/uImage
11 endif
12 ifeq ($(ADK_TARGET_KERNEL_LOADER),y)
13 KERNEL:=$(LINUX_DIR)/arch/arc/boot/loader
14 endif
16 QEMU_ARGS:=-monitor none -serial stdio
17 QEMU_ARGS+=-netdev user,id=eth0 -device virtio-net-device,netdev=eth0
18 QEMU_ARGS+=${ADK_QEMU_ARGS}
20 ifeq ($(ADK_TARGET_CPU_ARC_ARC700),y)
21 QEMU:=qemu-system-arc
22 QEMU_ARGS+=-cpu arc700
23 endif
25 ifeq ($(ADK_TARGET_CPU_ARC_ARCHS),y)
26 QEMU:=qemu-system-arc
27 QEMU_ARGS+=-cpu archs
28 endif
30 ifeq ($(ADK_TARGET_CPU_ARC_ARC32),y)
31 QEMU:=qemu-system-arc
32 QEMU_ARGS+=-cpu hs5x -M virt,ram_start=0
33 endif
35 ifeq ($(ADK_TARGET_CPU_ARC_ARC64),y)
36 QEMU:=qemu-system-arc64
37 QEMU_ARGS+=-cpu hs6x -M virt,ram_start=0
38 endif
40 # target helper text
41 ifeq ($(ADK_TARGET_FS),archive)
42 targethelp:
43 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
44 endif
45 ifeq ($(ADK_TARGET_FS),initramfs)
46 targethelp:
47 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
48 @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
49 endif
50 ifeq ($(ADK_TARGET_FS),initramfsarchive)
51 targethelp:
52 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
53 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
54 endif
55 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
56 targethelp:
57 @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
58 ifeq ($(ADK_TARGET_QEMU),y)
59 @echo "Start qemu with following command line:"
60 @echo '${QEMU} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
61 endif
62 ifeq ($(ADK_TARGET_SYSTEM_SYNOPSYS_NSIM),y)
63 ifeq ($(ADK_TARGET_LITTLE_ENDIAN),y)
64 ifeq ($(ADK_TARGET_CPU_ARC_ARC700),y)
65 @echo './scripts/nsim.sh arcv1 $(FW_DIR)/${TARGET_KERNEL}'
66 endif
67 ifeq ($(ADK_TARGET_CPU_ARC_ARCHS),y)
68 @echo './scripts/nsim.sh arcv2 $(FW_DIR)/${TARGET_KERNEL}'
69 endif
70 endif
71 ifeq ($(ADK_TARGET_BIG_ENDIAN),y)
72 ifeq ($(ADK_TARGET_CPU_ARC_ARC700),y)
73 @echo './scripts/nsim.sh arcv1-be $(FW_DIR)/${TARGET_KERNEL}'
74 endif
75 ifeq ($(ADK_TARGET_CPU_ARC_ARCHS),y)
76 @echo './scripts/nsim.sh arcv2-be $(FW_DIR)/${TARGET_KERNEL}'
77 endif
78 endif
79 endif
80 endif
81 ifeq ($(ADK_TARGET_FS),nfsroot)
82 targethelp:
83 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
84 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
85 endif
87 kernel-strip:
88 @cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
90 kernel-install: kernel-strip
91 @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
93 # filesystem specific targets
94 ifeq ($(ADK_TARGET_FS),archive)
95 imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
96 endif
97 ifeq ($(ADK_TARGET_FS),initramfs)
98 imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
99 endif
100 ifeq ($(ADK_TARGET_FS),initramfsarchive)
101 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
102 endif
103 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
104 imageinstall: createinitramfs targethelp
105 endif
106 ifeq ($(ADK_TARGET_FS),nfsroot)
107 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
108 endif