File: Makefile

package info (click to toggle)
coreboot 25.09%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 217,084 kB
  • sloc: ansic: 1,685,313; sh: 15,803; python: 11,200; perl: 10,186; asm: 8,519; makefile: 5,179; cpp: 4,724; pascal: 2,327; ada: 1,985; yacc: 1,264; lex: 731; sed: 75; ruby: 5; lisp: 5; awk: 4
file content (60 lines) | stat: -rw-r--r-- 1,406 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
## SPDX-License-Identifier: GPL-2.0-only

unexport $(COREBOOT_EXPORTS)

DTC ?= dtc

LINUX_ARCH-$(CONFIG_LINUXBOOT_X86_64)     = x86_64
LINUX_ARCH-$(CONFIG_LINUXBOOT_X86)        = i386
LINUX_ARCH-$(CONFIG_LINUXBOOT_ARM64)      = arm64
LINUX_ARCH-$(CONFIG_LINUXBOOT_RISCV_RV32) = riscv
LINUX_ARCH-$(CONFIG_LINUXBOOT_RISCV_RV64) = riscv

ifeq ($(CONFIG_LINUXBOOT_COMPILE_KERNEL),y)
include targets/linux.mk
endif
ifeq ($(CONFIG_LINUXBOOT_UROOT),y)
include targets/u-root.mk
endif

ifeq ($(CONFIG_LINUXBOOT_KERNEL_BZIMAGE),y)

build/Image: $(kernel_dir)/arch/x86/boot/bzImage | build/
	cp $< $@

else ifeq ($(CONFIG_LINUXBOOT_KERNEL_UIMAGE),y)

build/target.dtb: $(CONFIG_LINUXBOOT_DTS_FILE) | build/
	$(DTC) -o $@ $<

build/Image: build/vmlinux.bin.lzma build/initramfs build/target.dtb $(LINUX_ARCH-y)/kernel_fdt_lzma.its | build/
	mkimage -f $(LINUX_ARCH-y)/kernel_fdt_lzma.its $@

else ifneq ($(CONFIG_LINUXBOOT_COMPILE_KERNEL),y)

build/Image: $(CONFIG_LINUXBOOT_KERNEL_PATH) | build/
	cp $< $@

endif

build/initramfs: build/initramfs_u-root.cpio | build/
ifeq ($(CONFIG_LINUXBOOT_INITRAMFS_COMPRESSION_XZ),y)
	xz --stdout --keep --force --check=crc32 --lzma2=dict=1MiB $< > $@
else
	cp $< $@
endif

build/:
	mkdir -p build

clean:
	rm -rf build/kernel*
	rm -f  build/u-root
	rm -f  build/initramfs*
	rm -f  build/bzImage
	rm -f  build/uImage

distclean:
	rm -rf build

.PHONY: linuxboot clean distclean