summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2022-12-05 00:10:07 +0000
committerLeah Rowe <leah@libreboot.org>2022-12-05 00:10:07 +0000
commit137b5434d75352d2a0ddd56d5cc25ba59d9b0c5a (patch)
tree66fc798c5d8dd62be2c2e0f7ab04f7df5364ae75
parent7679c8e0f0c4e7b93941d2309a742dc3fa2f3276 (diff)
remove logic for avoiding nonredistributable blobs
the --nuke option in ifdtool will be used instead, to nuke the ME regions in specific rom sets (and cbfstool will be used to delete mrc.bin files from rom sets) the new method being implemented is heavier on disk io, but simplifies lbmk, and disk io could still be optimised in the following ways: * when copying roms from boards with ME in them, use ifdtool --nuke to get filename.rom.new, and *move* (not copy) filename.rom.new to the new destination (for use with tar) * possibly modify ifdtool to make efficient use of mmap for disk i/o; it currently loads entire roms into an allocated buffer in memory
-rwxr-xr-xresources/scripts/blobs/download19
-rwxr-xr-xresources/scripts/build/boot/roms7
-rwxr-xr-xresources/scripts/build/boot/roms_helper13
-rwxr-xr-xresources/scripts/build/release/deblob21
4 files changed, 6 insertions, 54 deletions
diff --git a/resources/scripts/blobs/download b/resources/scripts/blobs/download
index d8933573..f1898899 100755
--- a/resources/scripts/blobs/download
+++ b/resources/scripts/blobs/download
@@ -7,13 +7,6 @@ board="${1}"
# A shorthand for each board so as not to duplicate blobs for boards of different sizes
board_short=${board%%_*mb}
-# Allow adding only blobs that can be legally redistributed (ifd+gbe)
-if [ "${2}" = "redistributable" ]; then
- redistributable=true
-else
- redistributable=false
-fi
-
Fail(){
printf "\nERROR: $@\n"
exit 1
@@ -102,10 +95,8 @@ set -- "resources/coreboot/${board}/config/*"
. "resources/coreboot/${board}/board.cfg"
if [ "${CONFIG_HAVE_MRC}" = "y" ]; then
- if [ "${redistributable}" = "false" ]; then
- printf 'haswell board detected, downloading mrc\n'
- needs+=" MRC"
- fi
+ printf 'haswell board detected, downloading mrc\n'
+ needs+=" MRC"
fi
@@ -115,10 +106,8 @@ if [ "${CONFIG_HAVE_IFD_BIN}" = "y" ]; then
fi
if [ "${CONFIG_HAVE_ME_BIN}" = "y" ]; then
- if [ "${redistributable}" = "false" ]; then
- printf 'board needs intel management engine\n'
- needs+=" ME"
- fi
+ printf 'board needs intel management engine\n'
+ needs+=" ME"
fi
if [ "${CONFIG_HAVE_GBE_BIN}" = "y" ]; then
diff --git a/resources/scripts/build/boot/roms b/resources/scripts/build/boot/roms
index 94215028..c526c268 100755
--- a/resources/scripts/build/boot/roms
+++ b/resources/scripts/build/boot/roms
@@ -83,12 +83,7 @@ buildrom_release() {
board="$1"
if [ -d "resources/coreboot/${board}/" ]; then
- ./build release deblob ${board}
- if [ "$?" = 2 ]; then
- ./build boot roms_helper "${board}"
- else
- ./build boot roms_helper deblobbed "${board}"
- fi
+ ./build boot roms_helper "${board}"
else
die "\nbuild/roms: target not defined in the build system: %s\n" "${board}"
fi
diff --git a/resources/scripts/build/boot/roms_helper b/resources/scripts/build/boot/roms_helper
index 40c0f394..bd1f3860 100755
--- a/resources/scripts/build/boot/roms_helper
+++ b/resources/scripts/build/boot/roms_helper
@@ -30,13 +30,6 @@ set -u -e
projectname="$(cat projectname)"
-if [ "${1}" = "deblobbed" ]; then
- deblobbed=true
- shift
-else
- deblobbed=false
-fi
-
displaymodes=""
payloads=""
keyboard_layouts=""
@@ -315,11 +308,7 @@ moverom() {
# expected: configs must not specify a payload
mkCoreboot() {
cbdir="${1}" # e.g. coreboot/default
- if ${deblobbed} ; then
- cbcfgpath="${2}_deblobbed"
- else
- cbcfgpath="${2}" # e.g. resources/coreboot/x200_8mb/config/libgfxinit_txtmode
- fi
+ cbcfgpath="${2}" # e.g. resources/coreboot/x200_8mb/config/libgfxinit_txtmode
if [ ! -f "${cbcfgpath}" ]; then
printf "\nmkCoreboot: Coreboot config '%s' does not exist. Skipping build.\n" \
"${cbcfgpath}"
diff --git a/resources/scripts/build/release/deblob b/resources/scripts/build/release/deblob
deleted file mode 100755
index dcac1020..00000000
--- a/resources/scripts/build/release/deblob
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-
-# SPDX-FileCopyrightText: 2022 Caleb La Grange <thonkpeasant@protonmail.com>
-# SPDX-License-Identifier: GPL-3.0-only
-
-board="${1}"
-board_config_dir="resources/coreboot/${board}/config"
-set -- "${board_config_dir}/*"
-. ${1} 2>/dev/null
-
-if [ "${CONFIG_HAVE_MRC}" = "y" ] || [ "${CONFIG_HAVE_ME_BIN}" = "y" ]; then
- rm ${board_config_dir}/*_deblobbed
- for config in ${board_config_dir}/* ; do
- grep -v 'CONFIG_HAVE_ME_BIN\|CONFIG_ME_BIN_PATH\|CONFIG_HAVE_MRC\|CONFIG_MRC_FILE' ${config} > "${config}_deblobbed"
- done
- ./blobutil download ${board} redistributable
-
-else
- # Quickly exits for boards requiring no blobs
- exit 2
-fi