diff options
-rwxr-xr-x | resources/scripts/blobs/inject | 28 |
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 |