linux+arc: update kernel
[openadk.git] / target / xtensa / Makefile
blob457783bfc08a272bf6d56e93ec0b2a5628ca3c62
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_CPU_XTENSA_DE212),y)
9 KERNEL:=$(LINUX_DIR)/arch/xtensa/boot/Image.elf
10 else
11 KERNEL:=$(LINUX_DIR)/arch/xtensa/boot/uImage
12 endif
14 QEMU_ARGS:=${ADK_QEMU_ARGS}
15 ifeq ($(ADK_TARGET_CPU_XTENSA_DC233C),y)
16 QEMU_ARGS+=-M kc705
17 QEMU_ARGS+=-cpu dc233c
18 endif
19 ifeq ($(ADK_TARGET_CPU_XTENSA_DC232B),y)
20 QEMU_ARGS+=-M kc705
21 QEMU_ARGS+=-cpu dc232b
22 endif
23 ifeq ($(ADK_TARGET_CPU_XTENSA_DE212),y)
24 QEMU_ARGS+=-M kc705-nommu
25 QEMU_ARGS+=-cpu de212 -m 256
26 endif
28 # target helper text
29 ifeq ($(ADK_TARGET_FS),archive)
30 targethelp:
31 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
32 ifeq ($(ADK_TARGET_QEMU),y)
33 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
34 @echo "Use following command to create a QEMU Image:"
35 @echo "./scripts/create.sh qemu-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
36 @echo "Start qemu with following options:"
37 @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img'
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 endif
49 ifeq ($(ADK_TARGET_FS),initramfsarchive)
50 targethelp:
51 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
52 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
53 endif
54 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
55 targethelp:
56 @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
57 ifeq ($(ADK_TARGET_QEMU),y)
58 @echo "Start qemu with following command line:"
59 @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
60 endif
61 endif
62 ifeq ($(ADK_TARGET_FS),nfsroot)
63 targethelp:
64 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
65 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
66 endif
68 kernel-strip:
69 @cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
71 kernel-install: kernel-strip
72 @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
74 # filesystem specific targets
75 ifeq ($(ADK_TARGET_FS),archive)
76 imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
77 endif
78 ifeq ($(ADK_TARGET_FS),initramfs)
79 imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
80 endif
81 ifeq ($(ADK_TARGET_FS),initramfsarchive)
82 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
83 endif
84 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
85 imageinstall: createinitramfs targethelp
86 endif
87 ifeq ($(ADK_TARGET_FS),nfsroot)
88 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
89 endif