Skip to content

Commit 5b7eb07

Browse files
committed
modules/linuxboot: Use a specific commit
* add linuxboot-edk2 module (if not building latest git) * patch linuxboot-edk2 Makefile to not conflict with ours * update linuxboot build dir in circleci and boards/winterfell Signed-off-by: Nathan Rennie-Waldock <nathan.renniewaldock@gmail.com>
1 parent 54b862a commit 5b7eb07

5 files changed

Lines changed: 73 additions & 4 deletions

File tree

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
command: |
4040
make \
4141
BOARD=qemu-linuxboot \
42-
`/bin/pwd`/build/linuxboot-git/build/qemu/.configured \
42+
`/bin/pwd`/build/linuxboot-b5376a441e8e85cbf722e943bb8294958e87c784/build/qemu/.configured \
4343
# Run first to avoid too many processes
4444
4545
- run:

boards/winterfell/winterfell.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ dxe_offset := 860000
5252
dxe_size := 6a0000
5353
flash-dxe: $(build)/$(BOARD)/linuxboot.rom
5454
( echo u$(dxe_offset) $(dxe_size) ; \
55-
pv $(build)/linuxboot-git/build/$(BOARD)/dxe.vol \
55+
pv $(build)/linuxboot-b5376a441e8e85cbf722e943bb8294958e87c784/build/$(BOARD)/dxe.vol \
5656
) > /dev/ttyACM0
5757

5858
flash: $(build)/$(BOARD)/linuxboot.rom

modules/linuxboot

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
modules-$(CONFIG_LINUXBOOT) += linuxboot
22

3-
linuxboot_version := git
4-
linuxboot_repo := https://github.com/osresearch/linuxboot
3+
#linuxboot_version := git
4+
#linuxboot_repo := https://github.com/osresearch/linuxboot
5+
6+
linuxboot_version := b5376a441e8e85cbf722e943bb8294958e87c784
7+
linuxboot_hash := ccbe2a1ce344dd5831a774a038ed619f988029cc123a87202d62f3d0ec7aad62
8+
linuxboot_tar := linuxboot-$(linuxboot_version).tar.gz
9+
linuxboot_url := https://github.com/osresearch/linuxboot/archive/$(linuxboot_version).tar.gz
10+
511
linuxboot_base_dir := linuxboot-$(linuxboot_version)
612

713
# linuxboot builds are specialized on a per-target basis.
@@ -77,3 +83,25 @@ linuxboot.run: $(build)/$(BOARD)/linuxboot.rom
7783
INITRD=$(build)/$(BOARD)/initrd.cpio.xz \
7884
CUSTOM=$(CUSTOMPWD) \
7985
run
86+
87+
# If we are not building from a git checkout,
88+
# we must also download the linuxboot-edk2 tree
89+
ifneq "$(linuxboot_version)" "git"
90+
91+
linuxboot_depends += linuxboot-edk2
92+
modules-$(CONFIG_LINUXBOOT) += linuxboot-edk2
93+
94+
linuxboot-edk2_version := b7c299e4799012e8a20958a68693ab95b7626aa9
95+
linuxboot-edk2_hash := 78f48f46414b019b5fcd2d7049fd79e955d25f2965123d0bbdf7226564db33e5
96+
97+
linuxboot-edk2_tar := linuxboot-edk2-$(linuxboot-edk2_version).tar.gz
98+
linuxboot-edk2_url := https://github.com/linuxboot/edk2/archive/$(linuxboot-edk2_version).tar.gz
99+
linuxboot-edk2_dir := $(linuxboot_base_dir)/edk2
100+
101+
# We don't need to build edk2 ourselves
102+
# It will be done as part of the linuxboot build process
103+
linuxboot-edk2_output := .git
104+
linuxboot-edk2_target := .git
105+
linuxboot-edk2_configure := echo -e '\n.git:\n\ttouch .git' >> Makefile
106+
107+
endif

modules/linuxboot-edk2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# empty placeholder file
2+
# This submodule is defined in modules/linuxboot if necessary
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
From d1a4d98a9ddf8e7e7f1e00ca2c143b5d5dc01afd Mon Sep 17 00:00:00 2001
2+
From: Nathan Rennie-Waldock <nathan.renniewaldock@gmail.com>
3+
Date: Sun, 18 Oct 2020 23:58:29 +0100
4+
Subject: [PATCH] Makefile: Rename configured stamp to avoid conflict with
5+
heads build system
6+
7+
Signed-off-by: Nathan Rennie-Waldock <nathan.renniewaldock@gmail.com>
8+
---
9+
Makefile | 8 ++++----
10+
1 file changed, 4 insertions(+), 4 deletions(-)
11+
12+
diff --git a/Makefile b/Makefile
13+
index 2c58529031..d400904442 100644
14+
--- a/Makefile
15+
+++ b/Makefile
16+
@@ -26,16 +26,16 @@ $(EDK2_OUTPUTS): build-dxe
17+
ia32:
18+
build -a IA32
19+
20+
-build-dxe: .configured
21+
+build-dxe: .edk2-configured
22+
cd MdeModulePkg ; build
23+
24+
-build-cpu: .configured
25+
+build-cpu: .edk2-configured
26+
cd UefiCpuPkg ; build
27+
-build-quark: .configured
28+
+build-quark: .edk2-configured
29+
cd QuarkPlatformPkg ; build
30+
build: build-dxe
31+
32+
- .configured:
33+
+ .edk2-configured:
34+
$(MAKE) -C BaseTools
35+
. ./edksetup.sh
36+
touch $@
37+
--
38+
2.25.1
39+

0 commit comments

Comments
 (0)