summaryrefslogtreecommitdiff
path: root/resources/scripts/build
diff options
context:
space:
mode:
Diffstat (limited to 'resources/scripts/build')
-rwxr-xr-xresources/scripts/build/clean/uefitool28
-rw-r--r--resources/scripts/build/dependencies/arch5
-rwxr-xr-xresources/scripts/build/dependencies/debian4
-rwxr-xr-xresources/scripts/build/dependencies/fedora385
-rwxr-xr-xresources/scripts/build/dependencies/parabola5
-rwxr-xr-xresources/scripts/build/dependencies/ubuntu20044
-rwxr-xr-xresources/scripts/build/dependencies/void5
-rwxr-xr-xresources/scripts/build/module/uefitool44
-rwxr-xr-xresources/scripts/build/release/roms9
-rwxr-xr-xresources/scripts/build/release/src6
10 files changed, 112 insertions, 3 deletions
diff --git a/resources/scripts/build/clean/uefitool b/resources/scripts/build/clean/uefitool
new file mode 100755
index 00000000..ad8aa56e
--- /dev/null
+++ b/resources/scripts/build/clean/uefitool
@@ -0,0 +1,28 @@
+#!/usr/bin/env sh
+
+# helper script: run make clean on bios_extract
+#
+# Copyright (C) 2023 Leah Rowe <info@minifree.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+[ "x${DEBUG+set}" = 'xset' ] && set -v
+set -u -e
+
+printf "Cleaning the previous build of uefitool (UEFIExtract)\n"
+
+[ ! -d "uefitool" ] && exit 0
+
+make clean -BC uefitool || exit 1
diff --git a/resources/scripts/build/dependencies/arch b/resources/scripts/build/dependencies/arch
index 407915e1..92af1a87 100644
--- a/resources/scripts/build/dependencies/arch
+++ b/resources/scripts/build/dependencies/arch
@@ -94,6 +94,11 @@ pacman -S --needed --noconfirm libpciaccess pciutils zlib libftdi \
pacman -S --needed --noconfirm innoextract p7zip unar
+# UEFIExtract
+# ------------
+
+pacman -S --needed --noconfirm cmake
+
# U-Boot build dependencies
# ------------------------------------------------------------
pacman -S --needed --noconfirm swig dtc
diff --git a/resources/scripts/build/dependencies/debian b/resources/scripts/build/dependencies/debian
index b9ab42e6..065cb2c7 100755
--- a/resources/scripts/build/dependencies/debian
+++ b/resources/scripts/build/dependencies/debian
@@ -127,6 +127,10 @@ apt-get -y install libpci-dev pciutils zlib1g-dev libftdi-dev \
# For cross-compiling i686 target on x86_64 host.
[ "${arch}" -eq 0 ] && apt-get -y install lib32z1-dev
+# UEFIExtract
+# ------------
+
+apt-get -y install cmake
# Blobs building dependencies (for me)
# ------------------------------------------------------------
diff --git a/resources/scripts/build/dependencies/fedora38 b/resources/scripts/build/dependencies/fedora38
index 0f852f44..57dd20a3 100755
--- a/resources/scripts/build/dependencies/fedora38
+++ b/resources/scripts/build/dependencies/fedora38
@@ -93,6 +93,11 @@ dnf -y install gcc
dnf -y install pciutils-devel zlib-devel libftdi-devel gcc libusb-devel
+# UEFIExtract
+# ------------
+
+dnf -y install cmake
+
# For extracting IntelME from lenovo updates (X230 etc)
dnf -y install innoextract p7zip p7zip-plugins unar
diff --git a/resources/scripts/build/dependencies/parabola b/resources/scripts/build/dependencies/parabola
index 4e40b175..67a5fe75 100755
--- a/resources/scripts/build/dependencies/parabola
+++ b/resources/scripts/build/dependencies/parabola
@@ -101,6 +101,11 @@ pacman -S --needed --noconfirm innoextract p7zip unar
# ------------------------------------------------------------
pacman -S --needed --noconfirm swig dtc
+# UEFIExtract
+# ------------
+
+pacman -S --needed --noconfirm cmake
+
# Unifont, for GRUB
# ------------------------------------------------------------
diff --git a/resources/scripts/build/dependencies/ubuntu2004 b/resources/scripts/build/dependencies/ubuntu2004
index bacb1e46..8ea5507b 100755
--- a/resources/scripts/build/dependencies/ubuntu2004
+++ b/resources/scripts/build/dependencies/ubuntu2004
@@ -109,6 +109,10 @@ apt-get -y install libpci-dev pciutils zlib1g-dev libftdi-dev \
# For cross-compiling i686 target on x86_64 host.
[ "${arch}" -eq 0 ] && apt-get -y install lib32z1-dev
+# UEFIExtract
+# ------------
+
+apt-get -y install cmake
# Blobs building dependencies (for me)
# ------------------------------------------------------------
diff --git a/resources/scripts/build/dependencies/void b/resources/scripts/build/dependencies/void
index 7ceaafde..96263f9c 100755
--- a/resources/scripts/build/dependencies/void
+++ b/resources/scripts/build/dependencies/void
@@ -85,6 +85,11 @@ xbps-install -y base-devel
xbps-install -y libpciaccess pciutils zlib libftdi1 base-devel libusb
+# UEFIExtract
+# ------------
+
+xbps-install -y cmake
+
# Management engine extraction dependencies
# ------------------------------------------------------------
diff --git a/resources/scripts/build/module/uefitool b/resources/scripts/build/module/uefitool
new file mode 100755
index 00000000..6adf1de2
--- /dev/null
+++ b/resources/scripts/build/module/uefitool
@@ -0,0 +1,44 @@
+#!/usr/bin/env sh
+
+# helper script: builds bios_extract source code
+#
+# Copyright (C) 2023 Leah Rowe <info@minifree.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+[ "x${DEBUG+set}" = 'xset' ] && set -v
+set -u -e
+
+main()
+{
+ if [ ! -d "uefitool" ]; then
+ ./download uefitool || fail "cannot download uefitool"
+ fi
+
+ printf "Building uefitool (UEFIExtract)\n"
+
+ (
+ cd uefitool || fail "uefitool not downloaded"
+ cmake UEFIExtract/ || fail "cannot cmake UEFIExtract"
+ make || fail "error compiling UEFIExtract"
+ )
+}
+
+fail()
+{
+ printf "(uefitool build) %s\n" $1 1>&2
+}
+
+main $@
diff --git a/resources/scripts/build/release/roms b/resources/scripts/build/release/roms
index d81ec09a..c60070ec 100755
--- a/resources/scripts/build/release/roms
+++ b/resources/scripts/build/release/roms
@@ -29,6 +29,7 @@ target=""
CONFIG_HAVE_MRC=""
CONFIG_HAVE_ME_BIN=""
CONFIG_KBC1126_FIRMWARE=""
+CONFIG_INCLUDE_SMSC_SCH5545_EC_FW=""
ifdtool="cbutils/${cbtree}/ifdtool"
cbfstool="cbutils/${cbtree}/cbfstool"
@@ -76,6 +77,7 @@ make_archive()
CONFIG_HAVE_MRC="y"
CONFIG_HAVE_ME_BIN="y"
CONFIG_KBC1126_FIRMWARE="y"
+ CONFIG_INCLUDE_SMSC_SCH5545_EC_FW="y"
grep "CONFIG_HAVE_ME_BIN=y" \
"resources/coreboot/${target}/config/"* \
|| CONFIG_HAVE_ME_BIN="n"
@@ -85,6 +87,9 @@ make_archive()
grep "CONFIG_KBC1126_FIRMWARE=y" \
"resources/coreboot/${target}/config"/* \
|| CONFIG_KBC1126_FIRMWARE="n"
+ grep "CONFIG_INCLUDE_SMSC_SCH5545_EC_FW=y" \
+ "resources/coreboot/${target}/config"/* \
+ || CONFIG_INCLUDE_SMSC_SCH5545_EC_FW="n"
# remove ME/MRC/EC firmware from ROM images
if [ "${CONFIG_HAVE_ME_BIN}" = "y" ] \
@@ -163,6 +168,10 @@ strip_rom_image()
${cbfstool} "${romfile}" remove -n ecfw2.bin || exit 1
fi
+ if [ "${CONFIG_INCLUDE_SMSC_SCH5545_EC_FW}" = "y" ]; then
+ ${cbfstool} "${romfile}" remove -n sch5545_ecfw.bin || exit 1
+ fi
+
# TODO: replace this board-specific hack
if [ "${target}" = "e6400nvidia_4mb" ]; then
${cbfstool} "${romfile}" remove \
diff --git a/resources/scripts/build/release/src b/resources/scripts/build/release/src
index 7a2f94d7..0e3237ab 100755
--- a/resources/scripts/build/release/src
+++ b/resources/scripts/build/release/src
@@ -24,7 +24,7 @@ set -u -e
projectname="$(cat projectname)"
modlist="coreboot flashrom grub memtest86plus seabios me_cleaner u-boot"
-modlist="${modlist} bios_extract"
+modlist="${modlist} bios_extract biosutilities uefitool"
dirlist="resources util" # do not add blobs directory here. it's handled below
@@ -104,8 +104,8 @@ copy_blobs()
mkdir -p "${srcdir}"/blobs
# do not copy intel ME etc, but do copy ifd/gbe files
for i in t440p xx20 xx30 hp8200sff hp_ivybridge hp_sandybridge \
- hp8300usdt; do
- for j in ifd gbe 16_ifd; do
+ hp8300usdt t1650; do
+ for j in ifd gbe 4_ifd 8_ifd 12_ifd 16_ifd; do
if [ -f "blobs/${i}/${j}.bin" ]; then
if [ ! -e "${srcdir}/blobs/${i}" ]; then
mkdir -p "${srcdir}/blobs/${i}"