summaryrefslogtreecommitdiff
path: root/resources/scripts/build/release
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2022-11-14 00:51:12 +0000
committerLeah Rowe <leah@libreboot.org>2022-11-14 00:51:12 +0000
commit7af9953463c65fe2f02704e6bce815d830e58d7d (patch)
treedce6c19484fd27288c65ac33092040601d8a0622 /resources/scripts/build/release
parentb5c25efed46f0a9121023997c6758eda5c3f5017 (diff)
pragmatic system distribution guideline compliancepsdg
osboot is now part of libreboot, and will soon shut down. libreboot now conforms to osboot policy.
Diffstat (limited to 'resources/scripts/build/release')
-rwxr-xr-xresources/scripts/build/release/deblob21
-rwxr-xr-xresources/scripts/build/release/roms2
-rwxr-xr-xresources/scripts/build/release/src19
3 files changed, 38 insertions, 4 deletions
diff --git a/resources/scripts/build/release/deblob b/resources/scripts/build/release/deblob
new file mode 100755
index 00000000..dcac1020
--- /dev/null
+++ b/resources/scripts/build/release/deblob
@@ -0,0 +1,21 @@
+#!/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
diff --git a/resources/scripts/build/release/roms b/resources/scripts/build/release/roms
index 2308013d..d0ed093c 100755
--- a/resources/scripts/build/release/roms
+++ b/resources/scripts/build/release/roms
@@ -37,7 +37,7 @@ if [ -f versiondate ]; then
fi
if [ ! -d "bin/" ]; then
- ./build boot roms all
+ ./build boot roms release
fi
[ ! -d "release/" ] && \
diff --git a/resources/scripts/build/release/src b/resources/scripts/build/release/src
index ed0eb20e..5f7358f3 100755
--- a/resources/scripts/build/release/src
+++ b/resources/scripts/build/release/src
@@ -53,9 +53,9 @@ mkdir -p "${srcdir}/"
printf "%s" "${version}" > "${srcdir}"/version
-modlist="coreboot flashrom grub memtest86plus seabios ich9utils"
-dirlist="resources"
-filelist="download build README.md COPYING Makefile update version versiondate projectname .gitcheck"
+modlist="coreboot flashrom grub memtest86plus seabios ich9utils me_cleaner"
+dirlist="resources" # do not add blobs directory here. it is handled below
+filelist="blobutil modify download build README.md COPYING Makefile update version versiondate projectname .gitcheck"
for modname in ${modlist}; do
if [ ! -d "${modname}/" ]; then
@@ -67,6 +67,19 @@ for dir in ${modlist} ${dirlist}; do
cp -R "${dir}/" "${srcdir}/"
done
+mkdir -p "${srcdir}"/blobs
+# do not copy intel ME etc, but do copy ifd/gbe files
+for i in t440p w541 xx20 xx30; do
+ for j in ifd gbe 16_ifd; do
+ if [ -f "blobs/${i}/${j}.bin"]; then
+ if [ ! -e "${srcdir}/blobs/${i}" ]; then
+ mkdir -p "${srcdir}/blobs/${i}"
+ fi
+ cp blobs/${i}/${j}.bin "${srcdir}/blobs/${i}"
+ fi
+ done
+done
+
for i in ${filelist}; do
if [ ! -f "${i}" ]; then
printf "build/release/src: ERROR: file '%s' does not exist.\n" "${i}"