Build EC as a submodule, specifying version
For models that use System76 EC, we want to have the board version and the EC version matich. Ref: https://github.com/system76/firmware-open/issues/75
This commit is contained in:
committed by
Jeremy Soller
parent
e7c4683565
commit
f4f4d5b61d
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -94,3 +94,7 @@
|
|||||||
path = tools/ipxe
|
path = tools/ipxe
|
||||||
url = https://github.com/ipxe/ipxe.git
|
url = https://github.com/ipxe/ipxe.git
|
||||||
branch = master
|
branch = master
|
||||||
|
[submodule "ec"]
|
||||||
|
path = ec
|
||||||
|
url = https://github.com/system76/ec.git
|
||||||
|
branch = master
|
||||||
|
1
ec
Submodule
1
ec
Submodule
Submodule ec added at 8559f6f48a
1
models/darp5/ec.config
Normal file
1
models/darp5/ec.config
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOARD=system76/darp5
|
1
models/darp6/ec.config
Normal file
1
models/darp6/ec.config
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOARD=system76/darp5
|
1
models/galp3-c/ec.config
Normal file
1
models/galp3-c/ec.config
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOARD=system76/galp3-c
|
1
models/galp4/ec.config
Normal file
1
models/galp4/ec.config
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOARD=system76/galp3-c
|
1
models/lemp9/ec.config
Normal file
1
models/lemp9/ec.config
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOARD=system76/lemp9
|
14
scripts/_build/ec.sh
Executable file
14
scripts/_build/ec.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ -z "$1" -o ! -e "$1" -o -z "$2" ]
|
||||||
|
then
|
||||||
|
echo "$0 <config> <output>" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
source "$1"
|
||||||
|
make -C ec clean
|
||||||
|
make -C ec BOARD=${BOARD} VERSION=${VERSION} -j $(nproc)
|
||||||
|
cp "ec/build/${BOARD}/${VERSION}/ec.rom" "$2"
|
@ -4,7 +4,7 @@ set -e
|
|||||||
|
|
||||||
if [ -z "$1" ]
|
if [ -z "$1" ]
|
||||||
then
|
then
|
||||||
echo "$0 [model]" >&2
|
echo "$0 <model>" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
MODEL="$1"
|
MODEL="$1"
|
||||||
@ -79,6 +79,15 @@ KERNELVERSION="${VERSION}" \
|
|||||||
"${MODEL_DIR}/coreboot.config" \
|
"${MODEL_DIR}/coreboot.config" \
|
||||||
"${COREBOOT}"
|
"${COREBOOT}"
|
||||||
|
|
||||||
|
# Rebuild EC firmware for System76 EC models
|
||||||
|
if [ ! -e "${MODEL_DIR}/ec.rom" -a -e "${MODEL_DIR}/ec.config" ]
|
||||||
|
then
|
||||||
|
env VERSION="${VERSION}" \
|
||||||
|
./scripts/_build/ec.sh \
|
||||||
|
"${MODEL_DIR}/ec.config" \
|
||||||
|
"${BUILD}/ec.rom"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${MODEL}" != "qemu" ]
|
if [ "${MODEL}" != "qemu" ]
|
||||||
then
|
then
|
||||||
# Rebuild firmware-update
|
# Rebuild firmware-update
|
||||||
|
Reference in New Issue
Block a user