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
12 ifeq ($(ADK_TARGET_KERNEL_LOADER
),y
)
13 KERNEL
:=$(LINUX_DIR
)/arch
/arc
/boot
/loader
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
)
22 QEMU_ARGS
+=-cpu arc700
25 ifeq ($(ADK_TARGET_CPU_ARC_ARCHS
),y
)
30 ifeq ($(ADK_TARGET_CPU_ARC_ARC32
),y
)
32 QEMU_ARGS
+=-cpu hs5x
-M virt
,ram_start
=0
35 ifeq ($(ADK_TARGET_CPU_ARC_ARC64
),y
)
36 QEMU
:=qemu-system-arc64
37 QEMU_ARGS
+=-cpu hs6x
-M virt
,ram_start
=0
41 ifeq ($(ADK_TARGET_FS
),archive
)
43 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
45 ifeq ($(ADK_TARGET_FS
),initramfs
)
47 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
48 @echo
'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
50 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
52 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
53 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
55 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
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)'
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}'
67 ifeq ($(ADK_TARGET_CPU_ARC_ARCHS
),y
)
68 @echo
'./scripts/nsim.sh arcv2 $(FW_DIR)/${TARGET_KERNEL}'
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}'
75 ifeq ($(ADK_TARGET_CPU_ARC_ARCHS
),y
)
76 @echo
'./scripts/nsim.sh arcv2-be $(FW_DIR)/${TARGET_KERNEL}'
81 ifeq ($(ADK_TARGET_FS
),nfsroot
)
83 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
84 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
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
97 ifeq ($(ADK_TARGET_FS
),initramfs
)
98 imageinstall
: kernel-install
$(FW_DIR
)/$(INITRAMFS
) targethelp
100 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
101 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp
103 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
104 imageinstall
: createinitramfs targethelp
106 ifeq ($(ADK_TARGET_FS
),nfsroot
)
107 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp