mb/ocp/tiogapass: Only advertise C-states C1C6
[coreboot.git] / payloads / external / LinuxBoot / Makefile
blobfc2c8189836e583e1332345b342f9304a2b2a3c2
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 build/Image: $(CONFIG_LINUXBOOT_KERNEL_PATH) | build
14 ln -s -r $< $@
17 ifeq ($(CONFIG_LINUXBOOT_COMPILE_KERNEL),y)
18 include targets/linux.mk
19 endif
20 ifeq ($(CONFIG_LINUXBOOT_UROOT),y)
21 include targets/u-root.mk
22 endif
24 ifeq ($(CONFIG_LINUXBOOT_BUILD_INITRAMFS),y)
25 build/initramfs: $(CONFIG_LINUXBOOT_INITRAMFS_PATH) | build
26 else
27 build/initramfs:
28 endif
29 ifeq ($(CONFIG_LINUXBOOT_INITRAMFS_COMPRESSION_XZ),y)
30 xz --keep --force --check=crc32 --lzma2=dict=1MiB $(CONFIG_LINUXBOOT_INITRAMFS_PATH)
31 endif
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
37 cp $< $@
39 else ifeq ($(CONFIG_LINUXBOOT_KERNEL_UIMAGE),y)
41 build/target.dtb: $(CONFIG_LINUXBOOT_DTS_FILE)
42 $(DTC) -o $@ $<
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
49 build:
50 mkdir build
52 clean:
53 rm -rf build/kernel*
54 rm -f build/u-root
55 rm -f build/initramfs*
56 rm -f build/bzImage
57 rm -f build/uImage
59 distclean:
60 rm -rf build
62 .PHONY: linuxboot clean distclean