1 ## SPDX-License-Identifier: GPL-2.0-only
3 unexport $(COREBOOT_EXPORTS
)
7 LINUX_ARCH-
$(CONFIG_LINUXBOOT_X86_64
) = x86_64
8 LINUX_ARCH-
$(CONFIG_LINUXBOOT_X86
) = i386
9 LINUX_ARCH-
$(CONFIG_LINUXBOOT_ARM64
) = arm64
10 LINUX_ARCH-
$(CONFIG_LINUXBOOT_RISCV_RV32
) = riscv
11 LINUX_ARCH-
$(CONFIG_LINUXBOOT_RISCV_RV64
) = riscv
13 ifeq ($(CONFIG_LINUXBOOT_COMPILE_KERNEL
),y
)
14 include targets
/linux.mk
16 ifeq ($(CONFIG_LINUXBOOT_UROOT
),y
)
17 include targets
/u-root.mk
20 ifeq ($(CONFIG_LINUXBOOT_KERNEL_BZIMAGE
),y
)
22 build
/Image
: $(kernel_dir
)/arch
/x86
/boot
/bzImage | build
25 else ifeq ($(CONFIG_LINUXBOOT_KERNEL_UIMAGE
),y
)
27 build
/target.dtb
: $(CONFIG_LINUXBOOT_DTS_FILE
) | build
30 build
/Image
: build
/vmlinux.bin.lzma build
/initramfs build
/target.dtb
$(LINUX_ARCH-y
)/kernel_fdt_lzma.its | build
31 mkimage
-f
$(LINUX_ARCH-y
)/kernel_fdt_lzma.its
$@
33 else ifneq ($(CONFIG_LINUXBOOT_COMPILE_KERNEL
),y
)
35 build
/Image
: $(CONFIG_LINUXBOOT_KERNEL_PATH
) | build
40 build
/initramfs
: build
/initramfs_u-root.cpio | build
41 ifeq ($(CONFIG_LINUXBOOT_INITRAMFS_COMPRESSION_XZ
),y
)
42 xz
--stdout
--keep
--force --check=crc32
--lzma2
=dict
=1MiB
$< > $@
53 rm -f build
/initramfs
*
60 .PHONY
: linuxboot
clean distclean