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 build
/Image
: $(CONFIG_LINUXBOOT_KERNEL_PATH
) | build
17 ifeq ($(CONFIG_LINUXBOOT_COMPILE_KERNEL
),y
)
18 include targets
/linux.mk
20 ifeq ($(CONFIG_LINUXBOOT_UROOT
),y
)
21 include targets
/u-root.mk
24 ifeq ($(CONFIG_LINUXBOOT_BUILD_INITRAMFS
),y
)
25 build
/initramfs
: $(CONFIG_LINUXBOOT_INITRAMFS_PATH
) | build
29 ifeq ($(CONFIG_LINUXBOOT_INITRAMFS_COMPRESSION_XZ
),y
)
30 xz
--keep
--force --check=crc32
--lzma2
=dict
=1MiB
$(CONFIG_LINUXBOOT_INITRAMFS_PATH
)
32 cp
$(CONFIG_LINUXBOOT_INITRAMFS_PATH
)$(CONFIG_LINUXBOOT_INITRAMFS_SUFFIX
) $@
34 ifeq ($(CONFIG_LINUXBOOT_KERNEL_BZIMAGE
),y
)
36 build
/bzImage
: $(kernel_dir
)/arch
/x86
/boot
/bzImage build
/initramfs | build
39 else ifeq ($(CONFIG_LINUXBOOT_KERNEL_UIMAGE
),y
)
41 build
/target.dtb
: $(CONFIG_LINUXBOOT_DTS_FILE
)
44 build
/uImage
: build
/vmlinux.bin.lzma build
/initramfs build
/target.dtb
$(LINUX_ARCH-y
)/kernel_fdt_lzma.its | build
45 mkimage
-f
$(LINUX_ARCH-y
)/kernel_fdt_lzma.its
$@
47 endif # CONFIG_LINUXBOOT_KERNEL_BZIMAGE
55 rm -f build
/initramfs
*
62 .PHONY
: linuxboot
clean distclean