From 46ec14afa8c9fbd813f6494de9521ad348e5c3ad Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 23 Apr 2023 05:52:16 +0100 Subject: blobutil/inject: handle HP KBC1126 EC firmware --- resources/scripts/blobs/inject | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) 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 # SPDX-FileCopyrightText: 2022 Ferass El Hafidi +# SPDX-FileCopyrightText: 2023 Leah Rowe # 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 -- cgit v1.2.1