summaryrefslogtreecommitdiff
path: root/payloads/external/LinuxBoot/targets/u-root.mk
diff options
context:
space:
mode:
authorMarcello Sylvester Bauer <info@marcellobauer.com>2018-12-05 08:45:26 +0100
committerPhilipp Deppenwiese <zaolin.daisuki@gmail.com>2019-04-15 23:23:52 +0000
commit79f92910ebb1a281b87cd2586cff9c5d06478d6c (patch)
tree0fe8cb46aaa0c85930a5ed9a47801f46796340b7 /payloads/external/LinuxBoot/targets/u-root.mk
parent59a407349b6ed15fd83023b96ee559b7771c52f8 (diff)
LinuxBoot/targets/linux.mk: refactor kernel compilation
Refactor the linux kernel compilation. Change-Id: Iea2e2c8a22a91bdd2e3f83cd3058426acec3eaba Signed-off-by: Marcello Sylvester Bauer <info@marcellobauer.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/30053 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.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/payloads/external/LinuxBoot/targets/u-root.mk b/payloads/external/LinuxBoot/targets/u-root.mk
index 86c9019dce..28d7dbbb33 100644
--- a/payloads/external/LinuxBoot/targets/u-root.mk
+++ b/payloads/external/LinuxBoot/targets/u-root.mk
@@ -18,6 +18,10 @@ go_path_dir=$(project_dir)/go
uroot_bin=$(project_dir)/u-root
uroot_package=github.com/u-root/u-root
+ARCH-$(CONFIG_LIBUXBOOT_X86_64)=amd64
+ARCH-$(CONFIG_LINUXBOOT_X86)=i386
+ARCH-$(CONFIG_LINUXBOOT_ARM64)=arm64
+
go_version=$(shell go version | sed -nr 's/.*go([0-9]+\.[0-9]+.?[0-9]?).*/\1/p' )
go_version_major=$(shell echo $(go_version) | sed -nr 's/^([0-9]+)\.([0-9]+)\.?([0-9]*)$$/\1/p')
go_version_minor=$(shell echo $(go_version) | sed -nr 's/^([0-9]+)\.([0-9]+)\.?([0-9]*)$$/\2/p')
@@ -64,7 +68,7 @@ build: checkout
GOPATH=$(go_path_dir) go build -o $(uroot_bin) $(uroot_package)
u-root: build
- GOARCH=$(CONFIG_LINUXBOOT_ARCH) GOPATH=$(go_path_dir) $(uroot_bin) \
+ GOARCH=$(ARCH-y) GOPATH=$(go_path_dir) $(uroot_bin) \
$(uroot_args) -o $(project_dir)/initramfs_u-root.cpio $(uroot_cmds)
.PHONY: all u-root build checkout get version