drivers/amd/opensil/romstage.c: Implement cbmem_top_chipset in driver
[coreboot.git] / payloads / external / LinuxBoot / Makefile
blob83b8d6e0ea2df9378237af77944467fc0b17d9de
1 ## SPDX-License-Identifier: GPL-2.0-only
3 unexport $(COREBOOT_EXPORTS)
5 DTC ?= dtc
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
15 endif
16 ifeq ($(CONFIG_LINUXBOOT_UROOT),y)
17 include targets/u-root.mk
18 endif
20 ifeq ($(CONFIG_LINUXBOOT_KERNEL_BZIMAGE),y)
22 build/Image: $(kernel_dir)/arch/x86/boot/bzImage | build
23 cp $< $@
25 else ifeq ($(CONFIG_LINUXBOOT_KERNEL_UIMAGE),y)
27 build/target.dtb: $(CONFIG_LINUXBOOT_DTS_FILE) | build
28 $(DTC) -o $@ $<
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
36 cp $< $@
38 endif
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 $< > $@
43 else
44 cp $< $@
45 endif
47 build:
48 mkdir build
50 clean:
51 rm -rf build/kernel*
52 rm -f build/u-root
53 rm -f build/initramfs*
54 rm -f build/bzImage
55 rm -f build/uImage
57 distclean:
58 rm -rf build
60 .PHONY: linuxboot clean distclean