linux: update to 6.10.x, 6.9.x is EOL
[openadk.git] / target / x86 / Makefile
blobb9bbc72a3edad0d720cb8e5d48c9dac64bed8bbb
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
10 QEMU_ARCH:=i386
11 QEMU_ARGS:=-M pc
12 QEMU_ARGS+=${ADK_QEMU_ARGS}
13 QEMU_ARGS+=-net user -net nic,model=e1000
15 ifeq ($(ADK_PACKAGE_GRUB_EFI_X86),y)
16 QEMU_ARGS+=-L . -bios bios-x86.bin
17 endif
19 ifeq ($(ADK_TARGET_QEMU_WITH_AUDIO),y)
20 QEMU_ARGS+=-soundhw ac97
21 endif
23 ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y)
24 ifeq ($(ADK_TARGET_QEMU_WITHOUT_GRAPHIC),y)
25 CREATE:=./scripts/create.sh -g -t
26 else
27 CREATE:=./scripts/create.sh -g
28 endif
29 else
30 CREATE:=./scripts/create.sh
31 endif
33 # target helper text
34 ifeq ($(ADK_TARGET_FS),archive)
35 targethelp:
36 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
37 ifeq ($(ADK_TARGET_QEMU),y)
38 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
39 @echo "Use following command to create a QEMU Image:"
40 @echo "$(CREATE) qemu-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
41 @echo "Start qemu with following options:"
42 ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y)
43 @echo 'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} qemu-${ADK_TARGET_CPU_ARCH}.img'
44 else
45 @echo 'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img'
46 endif
47 endif
48 endif
49 ifeq ($(ADK_TARGET_FS),initramfs)
50 targethelp:
51 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
52 @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
53 ifeq ($(ADK_TARGET_QEMU),y)
54 @echo "Start qemu with following command line:"
55 @echo 'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
56 endif
57 endif
58 ifeq ($(ADK_TARGET_FS),initramfsarchive)
59 targethelp:
60 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
61 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
62 endif
63 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
64 targethelp:
65 @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
66 ifeq ($(ADK_TARGET_QEMU),y)
67 @echo "Start qemu with following command line:"
68 @echo 'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
69 endif
70 endif
71 ifeq ($(ADK_TARGET_FS),nfsroot)
72 targethelp:
73 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
74 @echo 'The nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
75 endif
76 ifeq ($(ADK_TARGET_FS),usb)
77 targethelp:
78 @echo 'The root tarball is: ${FW_DIR}/${ROOTFSTARBALL}'
79 @echo "To install everything to USB use scripts/install.sh"
80 endif
81 ifeq ($(ADK_TARGET_FS),iso)
82 targethelp:
83 @echo 'ISO image is at $<'
84 endif
85 ifeq ($(ADK_TARGET_FS),genimage)
86 targethelp:
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'
91 else
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'
94 endif
95 endif
97 # image creation and kernel install
98 kernel-strip:
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
107 endif
108 ifeq ($(ADK_TARGET_FS),initramfs)
109 imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
110 endif
111 ifeq ($(ADK_TARGET_FS),initramfsarchive)
112 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
113 endif
114 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
115 imageinstall: createinitramfs targethelp
116 endif
117 ifeq (${ADK_TARGET_FS},genimage)
118 imageinstall: ${FW_DIR}/${GENIMAGE} targethelp
119 endif
120 ifeq (${ADK_TARGET_FS},iso)
121 imageinstall: ${FW_DIR}/${ROOTFSISO} targethelp
122 endif
123 ifeq ($(ADK_TARGET_FS),nfsroot)
124 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
125 endif
126 ifeq ($(ADK_TARGET_FS),usb)
127 imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
128 endif