diff options
author | Marcello Sylvester Bauer <info@marcellobauer.com> | 2018-11-11 18:03:26 +0100 |
---|---|---|
committer | Philipp Deppenwiese <zaolin.daisuki@gmail.com> | 2018-11-28 18:28:45 +0000 |
commit | 78d0256f1d2bb09e4430f2bd56b58df78d54311b (patch) | |
tree | 193c5725f2d51a6dba1454ccf7861566bffce6a3 /payloads/external/LinuxBoot/targets/u-root.mk | |
parent | 5d8f02f3ef624e9055cc48cd354497a583133b1d (diff) | |
download | coreboot-78d0256f1d2bb09e4430f2bd56b58df78d54311b.tar.xz |
LinuxBoot: refactor payload
Clean and refactor the structure of the LinuxBoot payload integration,
to make it more modular and readable. The kernel and initramfs should
handled in separated makefiles.
tested with:
- qemu-i440fx (x86, x86_64)
- cavium CN8100 (arm64)
Change-Id: I41d0275a5f7efb920e881f43b0acda29f41ee221
Signed-off-by: Marcello Sylvester Bauer <info@marcellobauer.com>
Reviewed-on: https://review.coreboot.org/c/29581
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Diffstat (limited to 'payloads/external/LinuxBoot/targets/u-root.mk')
-rw-r--r-- | payloads/external/LinuxBoot/targets/u-root.mk | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/payloads/external/LinuxBoot/targets/u-root.mk b/payloads/external/LinuxBoot/targets/u-root.mk index 27f184e41a..5cb19bb339 100644 --- a/payloads/external/LinuxBoot/targets/u-root.mk +++ b/payloads/external/LinuxBoot/targets/u-root.mk @@ -1,6 +1,7 @@ ## This file is part of the coreboot project. ## ## Copyright (C) 2017 Facebook Inc. +## Copyright (C) 2018 9elements Cyber Security ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -22,7 +23,7 @@ project_dir=$(shell pwd)/linuxboot project_name=u-root go_path_dir=$(shell pwd)/linuxboot/go -all: build +all: u-root check: ifeq ("$(go_version)","") @@ -66,29 +67,29 @@ $(uroot_dir)/u-root: $(uroot_dir)/u-root.go echo " GO u-root" cd $(uroot_dir); GOPATH=$(go_path_dir) go build u-root.go -$(project_dir)/initramfs.cpio.xz: checkout $(uroot_dir)/u-root +$(project_dir)/initramfs_u-root.cpio.xz: checkout $(uroot_dir)/u-root echo " MAKE u-root $(CONFIG_LINUXBOOT_UROOT_VERSION)" ifneq ($(CONFIG_LINUXBOOT_UROOT_COMMANDS),) ifneq ($(CONFIG_LINUXBOOT_UROOT_FILES),) cd $(uroot_dir); GOARCH=$(CONFIG_LINUXBOOT_ARCH) GOPATH=$(go_path_dir) ./u-root \ - -build=bb -files $(CONFIG_LINUXBOOT_UROOT_FILES) -o $(project_dir)/initramfs.cpio \ + -build=bb -files $(CONFIG_LINUXBOOT_UROOT_FILES) -o $(project_dir)/initramfs_u-root.cpio \ $(patsubst %,cmds/%,$(CONFIG_LINUXBOOT_UROOT_COMMANDS)) else cd $(uroot_dir); GOARCH=$(CONFIG_LINUXBOOT_ARCH) GOPATH=$(go_path_dir) ./u-root \ - -build=bb -o $(project_dir)/initramfs.cpio \ + -build=bb -o $(project_dir)/initramfs_u-root.cpio \ $(patsubst %,cmds/%,$(CONFIG_LINUXBOOT_UROOT_COMMANDS)) endif else ifneq ($(CONFIG_LINUXBOOT_UROOT_FILES),) cd $(uroot_dir); GOARCH=$(CONFIG_LINUXBOOT_ARCH) GOPATH=$(go_path_dir) ./u-root \ - -build=bb -files $(CONFIG_LINUXBOOT_UROOT_FILES) -o $(project_dir)/initramfs.cpio coreboot-app + -build=bb -files $(CONFIG_LINUXBOOT_UROOT_FILES) -o $(project_dir)/initramfs_u-root.cpio coreboot-app else cd $(uroot_dir); GOARCH=$(CONFIG_LINUXBOOT_ARCH) GOPATH=$(go_path_dir) ./u-root \ - -build=bb -o $(project_dir)/initramfs.cpio coreboot-app + -build=bb -o $(project_dir)/initramfs_u-root.cpio coreboot-app endif endif - xz -f --check=crc32 -9 --lzma2=dict=1MiB --threads=$(CPUS) $(project_dir)/initramfs.cpio + xz -f --check=crc32 -9 --lzma2=dict=1MiB --threads=$(CPUS) $(project_dir)/initramfs_u-root.cpio -build: $(project_dir)/initramfs.cpio.xz +u-root: $(project_dir)/initramfs_u-root.cpio.xz -.PHONY: build checkout fetch all check +.PHONY: u-root checkout fetch all check |