summaryrefslogtreecommitdiff
path: root/resources/scripts/blobs
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-04-23 05:52:16 +0100
committerLeah Rowe <leah@libreboot.org>2023-04-23 05:52:16 +0100
commit46ec14afa8c9fbd813f6494de9521ad348e5c3ad (patch)
tree24b17a6631be0eb48f22fc02d92cdd820efc4348 /resources/scripts/blobs
parent3462afdbcf3ddcd415210f6a515d4f3f0ea264e2 (diff)
blobutil/inject: handle HP KBC1126 EC firmware
Diffstat (limited to 'resources/scripts/blobs')
-rwxr-xr-xresources/scripts/blobs/inject28
1 files changed, 28 insertions, 0 deletions
diff --git a/resources/scripts/blobs/inject b/resources/scripts/blobs/inject
index 99cfc569..6951f3b6 100755
--- a/resources/scripts/blobs/inject
+++ b/resources/scripts/blobs/inject
@@ -2,6 +2,7 @@
# SPDX-FileCopyrightText: 2022 Caleb La Grange <thonkpeasant@protonmail.com>
# SPDX-FileCopyrightText: 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
+# SPDX-FileCopyrightText: 2023 Leah Rowe <info@minifree.org>
# SPDX-License-Identifier: GPL-3.0-only
Fail(){
@@ -93,6 +94,33 @@ set -- "resources/coreboot/${board}/config/*"
./coreboot/default/util/ifdtool/ifdtool -i me:${_me_location} ${rom} -O ${rom} || exit 1
fi
+ if [ "${CONFIG_KBC1126_FIRMWARE}" = "y" ]; then
+ _ec1_location="${CONFIG_KBC1126_FW1#../../}"
+ _ec1_offset="${CONFIG_KBC1126_FW1_OFFSET}"
+ _ec2_location="${CONFIG_KBC1126_FW2#../../}"
+ _ec2_offset="${CONFIG_KBC1126_FW2_OFFSET}"
+ printf "adding hp kbc1126 ec firmware\n"
+ if [ "${_ec1_offset}" = "" ] || [ "${_ec1_offset}" = "" ];
+ then
+ printf "EC offsets not declared for board: %s\n" \
+ "${board}"
+ exit 1
+ fi
+ if [ "${_ec1_location}" = "" ] || [ "${_ec2_location}" = "" ];
+ then
+ printf "EC firmware path not declared for board: %s\n" \
+ "${board}"
+ fi
+ if [ ! -f "${_ec1_location}" ] || [ ! -f "${_ec2_location}" ];
+ then
+ printf "EC firmware not downloaded for board: %s\n" \
+ "${board}"
+ exit 1
+ fi
+ ./coreboot/default/util/cbfstool/cbfstool "${rom}" add -f ${_ec1_location} -n ecfw1.bin -b ${_ec1_offset} -t raw || exit 1
+ ./coreboot/default/util/cbfstool/cbfstool "${rom}" add -f ${_ec2_location} -n ecfw2.bin -b ${_ec2_offset} -t raw || exit 1
+ fi
+
if [ "${modifygbe}" = "true" ] && ! [ "${release}" = "true" ]; then
Modify_gbe ${rom}
fi