From e102c5d54b79543eee34cf19bdbab7b25ef9417e Mon Sep 17 00:00:00 2001 From: Marcello Sylvester Bauer Date: Wed, 21 Nov 2018 17:45:43 +0100 Subject: LinuxBoot: refactor u-root.mk Clean the u-root initramfs integration and add essential flags as options. Now u-root automatically fetch updates and rebuilts itself to apply changes. Change-Id: Id978ed2ebeff96c5be4f74ae07df9be76e106a1b Signed-off-by: Marcello Sylvester Bauer Reviewed-on: https://review.coreboot.org/c/29778 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Deppenwiese --- payloads/external/LinuxBoot/Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'payloads/external/LinuxBoot/Makefile') diff --git a/payloads/external/LinuxBoot/Makefile b/payloads/external/LinuxBoot/Makefile index a9b35fc120..80160956c0 100644 --- a/payloads/external/LinuxBoot/Makefile +++ b/payloads/external/LinuxBoot/Makefile @@ -17,7 +17,6 @@ project_dir=linuxboot kernel_dir=$(project_dir)/kernel unexport $(COREBOOT_EXPORTS) -unexport MAKEFLAGS all: linuxboot @@ -38,6 +37,11 @@ initramfs: endif endif +initramfs_compressed: initramfs +ifeq ($(CONFIG_LINUXBOOT_INITRAMFS_COMPRESSION_XZ),y) + xz --keep --force --lzma2=dict=1MiB $(top)/$(CONFIG_LINUXBOOT_INITRAMFS) +endif + ifeq ($(CONFIG_LINUXBOOT_COMPILE_KERNEL),y) ifeq ($(CONFIG_LINUXBOOT_ARCH),arm64) kernel: initramfs @@ -54,13 +58,14 @@ kernel: fi endif -linuxboot: kernel initramfs +linuxboot: kernel initramfs_compressed clean: if [ -d "$(kernel_dir)" ]; then rm -rf $(kernel_dir); fi - rm -f $(project_dir)/initramfs.cpio.xz + rm -f $(project_dir)/u-root + rm -f $(project_dir)/initramfs* distclean: rm -rf $(project_dir) -.PHONY: linuxboot kernel initramfs u-root clean distclean +.PHONY: linuxboot kernel initramfs_compressed initramfs u-root clean distclean -- cgit v1.2.3