remove duplicate package
[openadk.git] / target / metag / Makefile
blob10c89c16b32915f5d648bfb96573ce4eeceb77ab
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
9 QEMU_ARGS:=-nographic -display none -device da,exit_threads=1 -chardev stdio,id=chan1 -chardev pty,id=chan2
11 # target helper text
12 ifeq ($(ADK_TARGET_FS),archive)
13 targethelp:
14 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
15 ifeq ($(ADK_TARGET_QEMU),y)
16 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
17 @echo "Use following command to create a QEMU Image:"
18 @echo "./scripts/create.sh qemu-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
19 @echo "Start qemu with following options:"
20 @echo 'qemu-system-meta ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img'
21 endif
22 endif
23 ifeq ($(ADK_TARGET_FS),initramfs)
24 targethelp:
25 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
26 @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
27 ifeq ($(ADK_TARGET_QEMU),y)
28 @echo "Start qemu with following command line:"
29 @echo 'qemu-system-meta ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
30 endif
31 endif
32 ifeq ($(ADK_TARGET_FS),initramfsarchive)
33 targethelp:
34 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
35 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
36 endif
37 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
38 targethelp:
39 @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
40 ifeq ($(ADK_TARGET_QEMU),y)
41 @echo "Start qemu with following command line:"
42 @echo 'qemu-system-meta ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
43 endif
44 endif
45 ifeq ($(ADK_TARGET_FS),nfsroot)
46 targethelp:
47 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
48 @echo 'The nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
49 endif
51 # image creation and kernel install
52 kernel-strip:
53 cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
55 kernel-install: kernel-strip
56 cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
58 # filesystem specific targets
59 ifeq ($(ADK_TARGET_FS),archive)
60 imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
61 endif
62 ifeq ($(ADK_TARGET_FS),initramfs)
63 imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
64 endif
65 ifeq ($(ADK_TARGET_FS),initramfsarchive)
66 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
67 endif
68 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
69 imageinstall: createinitramfs targethelp
70 endif
71 ifeq ($(ADK_TARGET_FS),nfsroot)
72 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
73 endif