diff options
Diffstat (limited to 'resources/scripts/build')
-rwxr-xr-x | resources/scripts/build/boot/roms | 4 | ||||
-rwxr-xr-x | resources/scripts/build/boot/roms_helper | 31 | ||||
-rwxr-xr-x | resources/scripts/build/clean/bios_extract | 28 | ||||
-rw-r--r-- | resources/scripts/build/dependencies/arch | 2 | ||||
-rwxr-xr-x | resources/scripts/build/dependencies/debian | 2 | ||||
-rwxr-xr-x | resources/scripts/build/dependencies/fedora38 | 2 | ||||
-rwxr-xr-x | resources/scripts/build/dependencies/parabola | 2 | ||||
-rwxr-xr-x | resources/scripts/build/dependencies/ubuntu2004 | 2 | ||||
-rwxr-xr-x | resources/scripts/build/dependencies/void | 2 | ||||
-rwxr-xr-x | resources/scripts/build/module/bios_extract | 33 | ||||
-rwxr-xr-x | resources/scripts/build/release/roms | 84 | ||||
-rwxr-xr-x | resources/scripts/build/release/src | 27 |
12 files changed, 9 insertions, 210 deletions
diff --git a/resources/scripts/build/boot/roms b/resources/scripts/build/boot/roms index 16ce698a..70054fd4 100755 --- a/resources/scripts/build/boot/roms +++ b/resources/scripts/build/boot/roms @@ -129,10 +129,6 @@ listboards() buildrom() { board="$1" - # Start by building blobs and placing them in the - # coreboot tree only for boards that need them - ./blobutil download ${board} || exit 1 - if [ -d "resources/coreboot/${board}/" ]; then ./build boot roms_helper ${board}${opts} else diff --git a/resources/scripts/build/boot/roms_helper b/resources/scripts/build/boot/roms_helper index 97178593..5ac65c61 100755 --- a/resources/scripts/build/boot/roms_helper +++ b/resources/scripts/build/boot/roms_helper @@ -31,9 +31,6 @@ set -u -e projectname="$(cat projectname)" -blobs_required="" -microcode_required="" - kmapdir="resources/grub/keymap" displaymodes="" payloads="" @@ -161,15 +158,6 @@ if [ "${payload_uboot}" = "y" ] && \ uboot_config="default" fi -if [ "${microcode_required}" != "n" ] \ - && [ "${microcode_required}" != "y" ]; then - microcode_required="y" -fi -if [ "${blobs_required}" != "n" ] \ - && [ "${blobs_required}" != "y" ]; then - blobs_required="y" -fi - # Override all payload directives with cmdline args if [ ! -z ${payloads} ]; then echo "setting payloads $payloads" @@ -320,10 +308,6 @@ moverom() { newrompath="$2" cuttype="$3" - if [ "${blobs_required}" = "n" ]; then - newrompath="${newrompath%.rom}_noblobs.rom" - fi - printf "\nCreating new ROM image: %s\n" "${newrompath}" if [ "${cuttype}" = "4MiB IFD BIOS region" ]; then @@ -363,21 +347,6 @@ moverom() { count=64k conv=notrunc rm -f top64k.bin fi - - if [ "${microcode_required}" = "n" ]; then - _newrom_b="${newrompath%.rom}_nomicrocode.rom" - cp "${newrompath}" "${_newrom_b}" || exit 1 - microcode_present="y" - "${cbfstool}" "${_newrom_b}" remove -n \ - cpu_microcode_blob.bin || microcode_present="n" - if [ "${microcode_present}" = "n" ]; then - rm -f "${_newrom_b}" || exit 1 - printf "REMARK: '%s' already lacks microcode\n" \ - ${newrompath} - printf "Renaming default ROM file instead.\n" - mv "${newrompath}" "${_newrom_b}" || exit 1 - fi - fi } # expected: configs must not specify a payload diff --git a/resources/scripts/build/clean/bios_extract b/resources/scripts/build/clean/bios_extract deleted file mode 100755 index 65493f78..00000000 --- a/resources/scripts/build/clean/bios_extract +++ /dev/null @@ -1,28 +0,0 @@ -#!/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 bios_extract\n" - -[ ! -d "bios_extract/" ] && exit 0 - -make clean -BC bios_extract || exit 1 diff --git a/resources/scripts/build/dependencies/arch b/resources/scripts/build/dependencies/arch index c20a1faf..57abb022 100644 --- a/resources/scripts/build/dependencies/arch +++ b/resources/scripts/build/dependencies/arch @@ -49,7 +49,7 @@ pacman -S --needed --noconfirm nasm perl-libwww python subversion pacman -S --needed --noconfirm base-devel -# for running the crostool script (to get mrc.bin file for t440p) +# for running the crostool script pacman -S --needed --noconfirm sharutils curl parted e2fsprogs unzip # for cross-compiling ARM binaries diff --git a/resources/scripts/build/dependencies/debian b/resources/scripts/build/dependencies/debian index fb0ae248..28d83116 100755 --- a/resources/scripts/build/dependencies/debian +++ b/resources/scripts/build/dependencies/debian @@ -48,7 +48,7 @@ apt-get -y install uuid-dev nasm apt-get -y install build-essential -# for running the crostool script (to get mrc.bin file for t440p) +# for running the crostool script apt-get -y install sharutils curl parted e2fsprogs unzip # to use the right software versions and links for compiling diff --git a/resources/scripts/build/dependencies/fedora38 b/resources/scripts/build/dependencies/fedora38 index 2389b806..64c1a407 100755 --- a/resources/scripts/build/dependencies/fedora38 +++ b/resources/scripts/build/dependencies/fedora38 @@ -53,7 +53,7 @@ dnf -y install nasm perl-libwww-perl python3 subversion dnf -y install gcc -# for running the crostool script (to get mrc.bin file for t440p) +# for running the crostool script dnf -y install sharutils curl parted e2fsprogs unzip # for cross-compiling ARM binaries diff --git a/resources/scripts/build/dependencies/parabola b/resources/scripts/build/dependencies/parabola index da284bed..b5562abf 100755 --- a/resources/scripts/build/dependencies/parabola +++ b/resources/scripts/build/dependencies/parabola @@ -51,7 +51,7 @@ pacman -S --needed --noconfirm nasm perl-libwww python subversion pacman -S --needed --noconfirm base-devel -# for running the crostool script (to get mrc.bin file for t440p) +# for running the crostool script pacman -S --needed --noconfirm sharutils curl parted e2fsprogs unzip # for cross-compiling ARM binaries diff --git a/resources/scripts/build/dependencies/ubuntu2004 b/resources/scripts/build/dependencies/ubuntu2004 index 14a1d8c2..e7a04678 100755 --- a/resources/scripts/build/dependencies/ubuntu2004 +++ b/resources/scripts/build/dependencies/ubuntu2004 @@ -46,7 +46,7 @@ apt-get -y install uuid-dev nasm apt-get -y install build-essential -# for running the crostool script (to get mrc.bin file for t440p) +# for running the crostool script apt-get -y install sharutils curl parted e2fsprogs unzip # to use the right software versions and links for compiling diff --git a/resources/scripts/build/dependencies/void b/resources/scripts/build/dependencies/void index e46cd5ee..a13a1adc 100755 --- a/resources/scripts/build/dependencies/void +++ b/resources/scripts/build/dependencies/void @@ -46,7 +46,7 @@ xbps-install -y nasm perl-LWP python subversion xbps-install -y base-devel -# for running the crostool script (to get mrc.bin file for t440p) +# for running the crostool script xbps-install -y sharutils curl parted e2fsprogs unzip # for cross-compiling ARM binaries diff --git a/resources/scripts/build/module/bios_extract b/resources/scripts/build/module/bios_extract deleted file mode 100755 index 77677fa1..00000000 --- a/resources/scripts/build/module/bios_extract +++ /dev/null @@ -1,33 +0,0 @@ -#!/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 - -# Build "flashrom" (utility for flashing/dumping ROMs) -# -------------------------------------------------------------------- - -if [ ! -d "bios_extract/" ]; then - ./download bios_extract -fi - -printf "Building bios_extract\n" - -make -BC bios_extract diff --git a/resources/scripts/build/release/roms b/resources/scripts/build/release/roms index d81ec09a..62fe91bc 100755 --- a/resources/scripts/build/release/roms +++ b/resources/scripts/build/release/roms @@ -26,9 +26,6 @@ version="version-unknown" versiondate="version-date-unknown" cbtree="default" target="" -CONFIG_HAVE_MRC="" -CONFIG_HAVE_ME_BIN="" -CONFIG_KBC1126_FIRMWARE="" ifdtool="cbutils/${cbtree}/ifdtool" cbfstool="cbutils/${cbtree}/cbfstool" @@ -73,25 +70,6 @@ make_archive() continue fi - CONFIG_HAVE_MRC="y" - CONFIG_HAVE_ME_BIN="y" - CONFIG_KBC1126_FIRMWARE="y" - grep "CONFIG_HAVE_ME_BIN=y" \ - "resources/coreboot/${target}/config/"* \ - || CONFIG_HAVE_ME_BIN="n" - grep "CONFIG_HAVE_MRC=y" \ - "resources/coreboot/${target}/config/"* \ - || CONFIG_HAVE_MRC="n" - grep "CONFIG_KBC1126_FIRMWARE=y" \ - "resources/coreboot/${target}/config"/* \ - || CONFIG_KBC1126_FIRMWARE="n" - - # remove ME/MRC/EC firmware from ROM images - if [ "${CONFIG_HAVE_ME_BIN}" = "y" ] \ - || [ "${target}" = "e6400nvidia_4mb" ]; then - strip_archive "${romdir}" - fi - printf "Generating release/%s/roms/%s-%s_%s.tar.xz\n" \ "${version}" "${projectname}" \ "${version}" "${target##*/}" @@ -109,68 +87,6 @@ make_archive() fi } -strip_archive() -{ - romdir=${1} - - if [ ! -d coreboot/${cbtree} ]; then - ./download coreboot ${cbtree} || exit 1 - fi - ./build module cbutils ${cbtree} || exit 1 - - rm -Rf "${romdir}_tmp" # dirty hack, to reduce disk io later - # rather than using /tmp, which might not be tmpfs - mkdir "${romdir}_tmp" - - # Hash the rom before removing blobs - if [ ! -f "${romdir}/blobhashes" ]; then - printf "ROMs must match these hashes after blob insertion:" \ - > "${romdir}/blobhashes" - fi - ( - cd ${romdir} || err "subshell: cd" - sha1sum *.rom >> blobhashes || err "subshell: sha1sum" - ) - - for romfile in "${romdir}"/*.rom - do - strip_rom_image "${romfile}" - done -} - -strip_rom_image() -{ - romfile=${1} - - if [ ! -f "${romfile}" ]; then - continue - fi - - if [ "${CONFIG_HAVE_ME_BIN}" = "y" ]; then - ${ifdtool} --nuke me "${romfile}" || exit 1 - mv "${romfile}" "${romdir}_tmp"/ - mv "${romfile}.new" "${romfile}" - fi - - if [ "${CONFIG_HAVE_MRC}" = "y" ] - then - ${cbfstool} "${romfile}" remove -n mrc.bin || exit 1 - ${cbfstool} "${romfile}" print - fi - - if [ "${CONFIG_KBC1126_FIRMWARE}" = "y" ]; then - ${cbfstool} "${romfile}" remove -n ecfw1.bin || exit 1 - ${cbfstool} "${romfile}" remove -n ecfw2.bin || exit 1 - fi - - # TODO: replace this board-specific hack - if [ "${target}" = "e6400nvidia_4mb" ]; then - ${cbfstool} "${romfile}" remove \ - -n "pci10de,06eb.rom" \ - || exit 1 - fi -} - err() { printf "%s: %s\n" $0 $1 diff --git a/resources/scripts/build/release/src b/resources/scripts/build/release/src index 7a2f94d7..267b3eea 100755 --- a/resources/scripts/build/release/src +++ b/resources/scripts/build/release/src @@ -23,12 +23,11 @@ set -u -e projectname="$(cat projectname)" -modlist="coreboot flashrom grub memtest86plus seabios me_cleaner u-boot" -modlist="${modlist} bios_extract" +modlist="coreboot flashrom grub memtest86plus seabios u-boot" -dirlist="resources util" # do not add blobs directory here. it's handled below +dirlist="resources util" -filelist="lbmk blobutil modify download build README.md COPYING Makefile update" +filelist="lbmk modify download build README.md COPYING Makefile update" filelist="${filelist} version versiondate projectname .gitcheck gitclone" version="version-unknown" @@ -88,8 +87,6 @@ copy_files() cp -R "${dir}/" "${srcdir}/" done - copy_blobs - for i in ${filelist}; do if [ ! -f "${i}" ]; then rm -Rf "${srcdir}" @@ -99,23 +96,6 @@ copy_files() done } -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 - 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 -} - purge_files() { ( @@ -127,7 +107,6 @@ purge_files() cd "${i}/" || err "cd2" make distclean || err "make-distclean1" ) - make clean -BC default/util/kbc1126/ || err "make-clean1" done ) |