From c202be793fd483167ab25b60a3f4630137ca33ae Mon Sep 17 00:00:00 2001 From: Maximilian Brune Date: Mon, 26 Jun 2023 20:04:47 +0200 Subject: payloads/external/LinuxBoot: Clean up There were some issues with the current Linuxboot Makefiles. - multithreaded compilation didn't work, because some prerequisites were missing - initramfs wasn't added for x86 qemu boot. - riscv support was incomplete It began with separate patches, but resulted in a clean up patch, that is hard to separate. The most important changes are the following: - Instead of phony targets, actual files are now used as prerequisites - riscv can now be used as target - initramfs works now also for x86 - instead of querying the most recent version from the internet, I set a known working version (because I tested it) that can be customized and/or upgraded in the future. The reasons: - querying the version from the internet requires a constant connection to the internet even after linux kernel is already build (aka subsequent builds). - one usually wants to use a known working version, but optionally still have the posibillity to choose a custom one. This patch introduces this possibility in its most simple form. - I removed as much ifeq statements as possible and moved that responsibility to Kconfig, because they tend to make the Makefile less readable. Signed-off-by: Maximilian Brune Change-Id: I25e757108e0dd473969fe5a192ad0733f1fe6286 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76150 Reviewed-by: Lean Sheng Tan Tested-by: build bot (Jenkins) --- .../external/LinuxBoot/riscv/kernel_fdt_lzma.its | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 payloads/external/LinuxBoot/riscv/kernel_fdt_lzma.its (limited to 'payloads/external/LinuxBoot/riscv/kernel_fdt_lzma.its') diff --git a/payloads/external/LinuxBoot/riscv/kernel_fdt_lzma.its b/payloads/external/LinuxBoot/riscv/kernel_fdt_lzma.its new file mode 100644 index 0000000000..6cbe484910 --- /dev/null +++ b/payloads/external/LinuxBoot/riscv/kernel_fdt_lzma.its @@ -0,0 +1,74 @@ +/* + * Simple U-Boot uImage source file containing a single kernel and FDT blob + */ + +/dts-v1/; + +/ { + description = "Simple image with single Linux kernel and FDT blob"; + #address-cells = <1>; + + images { + kernel { + description = "Vanilla Linux kernel"; + data = /incbin/("../build/vmlinux.bin.lzma"); + type = "kernel"; + arch = "riscv64"; + os = "linux"; + compression = "lzma"; + load = <0x80000>; + entry = <0x80000>; + hash-1 { + algo = "crc32"; + }; + hash-2 { + algo = "sha1"; + }; + hash-3 { + algo = "sha256"; + }; + }; + fdt-1 { + description = "Flattened Device Tree blob"; + data = /incbin/("../build/target.dtb"); + type = "flat_dt"; + arch = "riscv64"; + compression = "none"; + hash-1 { + algo = "crc32"; + }; + hash-2 { + algo = "sha1"; + }; + hash-3 { + algo = "sha256"; + }; + }; + ramdisk-1 { + description = "Compressed Initramfs"; + data = /incbin/("../build/initramfs"); + type = "ramdisk"; + arch = "riscv64"; + os = "linux"; + compression = "none"; + load = <00000000>; + entry = <00000000>; + hash-1 { + algo = "sha1"; + }; + hash-2 { + algo = "sha256"; + }; + }; + }; + + configurations { + default = "conf-1"; + conf-1 { + description = "Boot Linux kernel with FDT blob"; + kernel = "kernel"; + fdt = "fdt-1"; + ramdisk = "ramdisk-1"; + }; + }; +}; -- cgit v1.2.3