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.mk
6 include $(ADK_TOPDIR
)/mk
/modules.mk
7 include $(ADK_TOPDIR
)/mk
/kernel-build.mk
8 include $(ADK_TOPDIR
)/mk
/image.mk
10 KERNEL
:=$(LINUX_DIR
)/arch
/x86
/boot
/bzImage
14 QEMU_ARGS
+=${ADK_QEMU_ARGS}
15 QEMU_ARGS
+=-net user
-net nic
,model
=e1000
17 ifeq ($(ADK_TARGET_QEMU_WITH_AUDIO
),y
)
18 QEMU_ARGS
+=-soundhw ac97
21 ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER
),y
)
22 ifeq ($(ADK_TARGET_QEMU_WITHOUT_GRAPHIC
),y
)
23 CREATE
:=.
/scripts
/create.sh
-g
-t
25 CREATE
:=.
/scripts
/create.sh
-g
28 CREATE
:=.
/scripts
/create.sh
32 ifeq ($(ADK_TARGET_FS
),archive
)
34 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
35 ifeq ($(ADK_TARGET_QEMU
),y
)
36 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
37 @echo
"Use following command to create a QEMU Image:"
38 @echo
"./scripts/create.sh qemu-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
39 @echo
"Start qemu with following options:"
40 ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER
),y
)
41 @echo
'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} qemu-${ADK_TARGET_CPU_ARCH}.img'
43 @echo
'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img'
46 ifeq ($(ADK_HARDWARE_VBOX
),y
)
47 @cp
$(KERNEL
) $(FW_DIR
)/$(TARGET_KERNEL
)
48 @echo
"Use following command to create a VirtualBox Image:"
49 @echo
"./scripts/create.sh -T vdi vbox-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
52 ifeq ($(ADK_TARGET_FS
),initramfs
)
54 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
55 @echo
'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
56 ifeq ($(ADK_TARGET_QEMU
),y
)
57 @echo
"Start qemu with following command line:"
58 @echo
'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
61 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
63 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
64 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
66 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
68 @echo
'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
69 ifeq ($(ADK_TARGET_QEMU
),y
)
70 @echo
"Start qemu with following command line:"
71 @echo
'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
74 ifeq ($(ADK_TARGET_FS
),nfsroot
)
76 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
77 @echo
'The nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
79 ifeq ($(ADK_TARGET_FS
),usb
)
81 @echo
'The root tarball is: ${FW_DIR}/${ROOTFSTARBALL}'
82 @echo
"To install everything to USB use:"
83 @echo
"sudo ./scripts/install.sh -t /dev/sdX $(FW_DIR)/$(ROOTFSTARBALL)"
85 ifeq ($(ADK_TARGET_FS
),iso
)
87 @echo
'ISO image is at $<'
90 # image creation and kernel install
92 @cp
$(KERNEL
) $(BUILD_DIR
)/$(TARGET_KERNEL
)
94 kernel-install
: kernel-strip
95 @cp
$(BUILD_DIR
)/$(TARGET_KERNEL
) $(FW_DIR
)/${TARGET_KERNEL}
97 # filesystem specific targets
98 ifeq ($(ADK_TARGET_FS
),archive
)
99 imageinstall
: $(FW_DIR
)/$(ROOTFSTARBALL
) targethelp
101 ifeq ($(ADK_TARGET_FS
),initramfs
)
102 imageinstall
: kernel-install
$(FW_DIR
)/$(INITRAMFS
) targethelp
104 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
105 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp
107 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
108 imageinstall
: createinitramfs targethelp
110 ifeq (${ADK_TARGET_FS},iso
)
111 imageinstall
: ${FW_DIR}/${ROOTFSISO} targethelp
113 ifeq ($(ADK_TARGET_FS
),nfsroot
)
114 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp
116 ifeq ($(ADK_TARGET_FS
),usb
)
117 imageinstall
: $(FW_DIR
)/$(ROOTFSTARBALL
) targethelp