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
)/arch
/x86
/boot
/bzImage
12 QEMU_ARGS
:=-M
pc -m
256
13 ifeq ($(ADK_PACKAGE_GRUB_EFI_X86_64
),y
)
14 QEMU_ARGS
+=-L .
-bios bios-x86_64.bin
16 QEMU_ARGS
+=${ADK_QEMU_ARGS}
17 QEMU_ARGS
+=-net user
-net nic
,model
=e1000
18 ifeq ($(ADK_TARGET_QEMU_WITH_AUDIO
),y
)
19 QEMU_ARGS
+=-device AC97
22 ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER
),y
)
23 ifeq ($(ADK_TARGET_QEMU_WITHOUT_GRAPHIC
),y
)
24 CREATE
:=.
/scripts
/create.sh
-g
-t
26 CREATE
:=.
/scripts
/create.sh
-g
29 CREATE
:=.
/scripts
/create.sh
33 ifeq ($(ADK_TARGET_FS
),archive
)
35 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
36 ifeq ($(ADK_TARGET_QEMU
),y
)
37 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
38 @echo
"Use following command to create a QEMU Image:"
39 @echo
"$(CREATE) qemu-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
40 @echo
"Start qemu with following options:"
41 ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER
),y
)
42 @echo
'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} qemu-${ADK_TARGET_CPU_ARCH}.img'
44 @echo
'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img'
48 ifeq ($(ADK_TARGET_FS
),initramfs
)
50 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
51 @echo
'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
52 ifeq ($(ADK_TARGET_QEMU
),y
)
53 @echo
"Start qemu with following command line:"
54 @echo
'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
57 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
59 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
60 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
62 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
64 @echo
'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
65 ifeq ($(ADK_TARGET_QEMU
),y
)
66 @echo
"Start qemu with following command line:"
67 @echo
'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
70 ifeq ($(ADK_TARGET_FS
),nfsroot
)
72 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
73 @echo
'The nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
75 ifeq ($(ADK_TARGET_FS
),usb
)
77 @echo
'The root tarball is: ${FW_DIR}/${ROOTFSTARBALL}'
78 @echo
"To install everything to USB disk use:"
79 @echo
"sudo ./scripts/install.sh -g -t default /dev/sdX $(FW_DIR)/$(ROOTFSTARBALL)"
81 ifeq ($(ADK_TARGET_FS
),iso
)
83 @echo
'ISO image is at $<'
85 ifeq ($(ADK_TARGET_FS
),genimage
)
87 @echo
"The disk image is: $(FW_DIR)/disk.img"
88 ifeq ($(ADK_TARGET_QEMU
),y
)
89 @echo
"Start qemu with following command line:"
90 @echo
'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} $(FW_DIR)/disk.img'
92 @echo
"Use following command to install it on SD card:"
93 @echo
'sudo dd if=$(FW_DIR)/disk.img of=/dev/sdX bs=2048k'
97 # image creation and kernel install
99 @cp
$(KERNEL
) $(BUILD_DIR
)/$(TARGET_KERNEL
)
101 kernel-install
: kernel-strip
102 @cp
$(BUILD_DIR
)/$(TARGET_KERNEL
) $(FW_DIR
)/${TARGET_KERNEL}
104 # filesystem specific targets
105 ifeq ($(ADK_TARGET_FS
),archive
)
106 imageinstall
: $(FW_DIR
)/$(ROOTFSTARBALL
) targethelp
108 ifeq ($(ADK_TARGET_FS
),initramfs
)
109 imageinstall
: kernel-install
$(FW_DIR
)/$(INITRAMFS
) targethelp
111 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
112 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp
114 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
115 imageinstall
: createinitramfs targethelp
117 ifeq (${ADK_TARGET_FS},iso
)
118 imageinstall
: ${FW_DIR}/${ROOTFSISO} targethelp
120 ifeq (${ADK_TARGET_FS},genimage
)
121 imageinstall
: ${FW_DIR}/${GENIMAGE} targethelp
123 ifeq ($(ADK_TARGET_FS
),nfsroot
)
124 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp
126 ifeq ($(ADK_TARGET_FS
),usb
)
127 imageinstall
: $(FW_DIR
)/$(ROOTFSTARBALL
) targethelp