From 7af9953463c65fe2f02704e6bce815d830e58d7d Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 14 Nov 2022 00:51:12 +0000 Subject: pragmatic system distribution guideline compliance osboot is now part of libreboot, and will soon shut down. libreboot now conforms to osboot policy. --- resources/scripts/build/boot/roms | 64 ++++++++- resources/scripts/build/boot/roms_helper | 178 +++++++++++++++++------- resources/scripts/build/dependencies/arch | 6 + resources/scripts/build/dependencies/debian | 9 +- resources/scripts/build/dependencies/fedora35 | 1 + resources/scripts/build/dependencies/ubuntu2004 | 7 + resources/scripts/build/dependencies/void | 9 +- resources/scripts/build/release/deblob | 21 +++ resources/scripts/build/release/roms | 2 +- resources/scripts/build/release/src | 19 ++- 10 files changed, 249 insertions(+), 67 deletions(-) create mode 100755 resources/scripts/build/release/deblob (limited to 'resources/scripts/build') diff --git a/resources/scripts/build/boot/roms b/resources/scripts/build/boot/roms index 2f3d76f3..94215028 100755 --- a/resources/scripts/build/boot/roms +++ b/resources/scripts/build/boot/roms @@ -5,6 +5,7 @@ # # Copyright (C) 2014, 2015, 2016, 2020, 2021 Leah Rowe # Copyright (C) 2015 Klemens Nanni +# Copyright (C) 2022 Caleb La Grange # # 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 @@ -42,12 +43,18 @@ help() { USAGE: ./build boot roms boardname To build *all* boards, do this: ./build boot roms all To list *all* boards, do this: ./build boot roms list - - possible values for 'options': - $(listboards) + + Optional Flags: + -d: displaymode + -p: payload + -k: keyboard layout Example: ./build boot roms x60 Example: ./build boot roms x200_8mb x60 + Example: ./build boot roms x230_12mb -p grub -d corebootfb -k usqwerty + + possible values for 'boardname': + $(listboards) Refer to the ${projectname} documentation for more information. EOF @@ -61,13 +68,33 @@ die() { # Build ROM images for supported boards 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 + die "\nbuild/roms: target not defined in the build system: %s\n" "${board}" + fi +} + +buildrom_release() { + board="$1" + if [ -d "resources/coreboot/${board}/" ]; then - ./build boot roms_helper "${board}" + ./build release deblob ${board} + if [ "$?" = 2 ]; then + ./build boot roms_helper "${board}" + else + ./build boot roms_helper deblobbed "${board}" + fi else die "\nbuild/roms: target not defined in the build system: %s\n" "${board}" fi } + if [ $# -gt 0 ]; then firstoption="${1}" if [ "${firstoption}" = "help" ]; then @@ -78,15 +105,40 @@ if [ $# -gt 0 ]; then listboards exit 0 fi + + while [[ $# > 0 ]]; do + case ${1} in + -d) + opts+=" -d ${2}" + shift ;; + -p) + opts+=" -p ${2}" + shift ;; + -k) + opts+=" -k ${2}" + shift ;; + *) + boards+="${1} " ;; + esac + shift + done + +if [ -z ${opts+x} ]; then + opts="" +fi printf "Building %s ROM images\n" "${projectname}" - if [ "${firstoption}" = "all" ]; then + if [ "${firstoption}" = "release" ]; then + for boardname in $(listboards); do + buildrom_release "${boardname}" || die "build/roms: something went wrong" + done + elif [ "${firstoption}" = "all" ]; then for boardname in $(listboards); do buildrom "${boardname}" || die "build/roms: something went wrong" done else - for board in ${@}; do + for board in ${boards}; do buildrom "${board}" || die "build/roms: something went wrong" done fi diff --git a/resources/scripts/build/boot/roms_helper b/resources/scripts/build/boot/roms_helper index 951e19ba..bfcd736b 100755 --- a/resources/scripts/build/boot/roms_helper +++ b/resources/scripts/build/boot/roms_helper @@ -4,6 +4,7 @@ # # Copyright (C) 2020,2021 Leah Rowe # Copyright (C) 2021 Vitali64 +# Copyright (C) 2022 Caleb La Grange # Copyright (C) 2022 Alper Nebi Yasak # # This program is free software: you can redistribute it and/or modify @@ -23,22 +24,40 @@ # This script assumes that the working directory is the root # of git or release archive + [ "x${DEBUG+set}" = 'xset' ] && set -v set -u -e projectname="$(cat projectname)" -if (( $# != 1 )); then - printf "Usage: ./build boot roms boardname\n" - printf "Example: ./build boot roms x60\n" - printf "Example: ./build boot roms x60 x200_8mb\n" - printf "Example: ./build boot roms all\n" - printf "You need to specify exactly 1 argument\n" - exit 1 +if [ "${1}" = "deblobbed" ]; then + deblobbed=true + shift +else + deblobbed=false fi -board="${1}" +displaymodes="" +payloads="" +keyboard_layouts="" +while [[ $# > 0 ]]; do + case ${1} in + -d) + displaymodes+="${2}" + shift ;; + -p) + payloads+="${2}" + shift ;; + -k) + keyboard_layouts+="${2}" + shift ;; + *) + board=${1} ;; + esac + shift +done +echo "board is $board , kb is ${keyboard_layouts} , displaymode is ${displaymodes} , payloads is ${payloads}" if [ ! -d "resources/coreboot/${board}" ]; then printf "build/roms: Target %s does not exist in the %s build system. Skipping build.\n" "${projectname}" "${board}" exit 1 @@ -140,6 +159,21 @@ if [ "${payload_memtest}" = "y" ]; then fi fi +# Override all payload directives with cmdline args +if [ ! -z ${payloads} ]; then + echo "setting payloads $payloads" + payload_grub="n" + payload_grub_withseabios="n" # seabios chainloaded from grub + payload_seabios="n" + payload_seabios_withgrub="n" # i386-coreboot grub accessible from SeaBIOS boot menu + seabios_opromloadonly="0" + payload_memtest="n" + + for payload in ${payloads} ; do + eval "payload_${payload}=y" + done +fi + romdir="bin/${board}" cbdir="coreboot/${board}" if [ "${board}" != "${cbtree}" ]; then @@ -222,8 +256,8 @@ if [ "${payload_grub}" = "y" ] || [ "${payload_seabios_withgrub}" = "y" ]; then grubtestcfg="payload/grub/grub_${keymap}_test.cfg" if [ ! -f "${grubelf}" ] || [ ! -f "${grubcfg}" ] || \ - [ ! -f "${grubtestcfg}" ]; then - ./build payload grub + [ ! -f "${grubtestcfg}" ]; then + ./build payload grub fi done fi @@ -256,7 +290,7 @@ moverom() { dd if=${rompath} of=${newrompath} bs=1 skip=$[$(stat -c %s ${rompath}) - 0x400000] count=4194304 else cp ${rompath} ${newrompath} - fi + fi # pike2008 cards cause a system hang when loading the option rom in seabios # if there is an empty option rom in cbfs, no option rom will be loaded @@ -276,26 +310,30 @@ moverom() { ./build descriptors ich9m fi dd if=descriptors/ich9m/ich9fdgbe_${romsize}m.bin of=${newrompath} bs=1 count=12k conv=notrunc - fi - if [ "${cuttype}" = "${romsize}MiB ICH9 IFD NOGBE NOR flash" ]; then - if [ ! -f "descriptors/ich9m/ich9fdnogbe_${romsize}m.bin" ]; then - ./build descriptors ich9m fi - dd if=descriptors/ich9m/ich9fdnogbe_${romsize}m.bin of=${newrompath} bs=1 count=4k conv=notrunc - fi - done - - if [ "${cuttype}" = "i945 laptop" ]; then - dd if=${newrompath} of=top64k.bin bs=1 skip=$[$(stat -c %s ${newrompath}) - 0x10000] count=64k - dd if=top64k.bin of=${newrompath} bs=1 seek=$[$(stat -c %s ${newrompath}) - 0x20000] count=64k conv=notrunc - rm -f top64k.bin - fi -} + if [ "${cuttype}" = "${romsize}MiB ICH9 IFD NOGBE NOR flash" ]; then + if [ ! -f "descriptors/ich9m/ich9fdnogbe_${romsize}m.bin" ]; then + ./build descriptors ich9m + fi + dd if=descriptors/ich9m/ich9fdnogbe_${romsize}m.bin of=${newrompath} bs=1 count=4k conv=notrunc + fi + done + + if [ "${cuttype}" = "i945 laptop" ]; then + dd if=${newrompath} of=top64k.bin bs=1 skip=$[$(stat -c %s ${newrompath}) - 0x10000] count=64k + dd if=top64k.bin of=${newrompath} bs=1 seek=$[$(stat -c %s ${newrompath}) - 0x20000] count=64k conv=notrunc + rm -f top64k.bin + fi + } # expected: configs must not specify a payload mkCoreboot() { cbdir="${1}" # e.g. coreboot/default - cbcfgpath="${2}" # e.g. resources/coreboot/x200_8mb/config/libgfxinit_txtmode + if ${deblobbed} ; then + cbcfgpath="${2}_deblobbed" + else + cbcfgpath="${2}" # e.g. resources/coreboot/x200_8mb/config/libgfxinit_txtmode + fi if [ ! -f "${cbcfgpath}" ]; then printf "\nmkCoreboot: Coreboot config '%s' does not exist. Skipping build.\n" \ "${cbcfgpath}" @@ -303,8 +341,17 @@ mkCoreboot() { fi printf "%s-%s\n" "$(cat projectname)" "$(cat version)" > "${cbdir}/.coreboot-version" ( + if [ -f "${cbfstool}" ]; then + mv "${cbfstool}" "${cbdir}/cbfstool" + fi + cd "${cbdir}" - make distclean + make distclean + cd - + + if [ -f "${cbdir}/cbfstool" ]; then + mv "${cbdir}/cbfstool" "${cbfstool}" + fi ) cp "${cbcfgpath}" "${cbdir}"/.config ./build module cbutils ${cbdir#coreboot/} @@ -321,7 +368,6 @@ make_seabios_rom() { target_seabios_cbfs_path="${2}" # e.g. fallback/payload target_opromloadonly="${3}" # 0 or 1. if 1, only load but don't execute oproms target_initmode="${4}" # e.g. libgfxinit - cbfstool_path="${5}" if [ "${target_initmode}" = "normal" ]; then target_seabioself="payload/seabios/seabios_vgarom.elf" @@ -347,7 +393,7 @@ make_seabios_rom() { "${cbfstool}" "${tmprom}" add-int -i ${target_opromloadonly} -n etc/only-load-option-roms if [ "${target_initmode}" = "libgfxinit" ]; then - "${cbfstool_path}" "${tmprom}" add -f "${target_seavgabios_rom}" -n vgaroms/seavgabios.bin -t raw + "${cbfstool}" "${tmprom}" add -f "${target_seavgabios_rom}" -n vgaroms/seavgabios.bin -t raw fi printf "%s\n" "${tmprom}" @@ -379,8 +425,7 @@ make_uboot_payload_rom() { make_grubrom_from_keymap() { target_keymap="${1}" target_cbrom="${2}" - cbfstool_path="${3}" - target_grubelf_cbfs_path="${4}" # e.g. fallback/payload + target_grubelf_cbfs_path="${3}" # e.g. fallback/payload grubelf="payload/grub/grub_${target_keymap}.elf" grubcfg="payload/grub/grub_${target_keymap}.cfg" @@ -389,7 +434,7 @@ make_grubrom_from_keymap() { tmprom=$(mktemp -t coreboot_rom.XXXXXXXXXX) cp "${target_cbrom}" "${tmprom}" - "${cbfstool_path}" "${tmprom}" add-payload -f "${grubelf}" -n ${target_grubelf_cbfs_path} -c lzma + "${cbfstool}" "${tmprom}" add-payload -f "${grubelf}" -n ${target_grubelf_cbfs_path} -c lzma tmpgrubcfg=$(mktemp -t grub.cfg.XXXXXXXXXX) tmpgrubtestcfg=$(mktemp -t grubtest.cfg.XXXXXXXXXX) @@ -403,8 +448,8 @@ make_grubrom_from_keymap() { cp "${grubcfg}" "${tmpgrubcfg}" cp "${grubtestcfg}" "${tmpgrubtestcfg}" fi - "${cbfstool_path}" "${tmprom}" add -f "${tmpgrubcfg}" -n grub.cfg -t raw - "${cbfstool_path}" "${tmprom}" add -f "${tmpgrubtestcfg}" -n grubtest.cfg -t raw + "${cbfstool}" "${tmprom}" add -f "${tmpgrubcfg}" -n grub.cfg -t raw + "${cbfstool}" "${tmprom}" add -f "${tmpgrubtestcfg}" -n grubtest.cfg -t raw rm -f "${tmpgrubcfg}" "${tmpgrubtestcfg}" backgroundfile="background1280x800.png" @@ -413,7 +458,7 @@ make_grubrom_from_keymap() { backgroundfile="background1024x768.png" fi backgroundfile="resources/grub/background/${backgroundfile}" - "${cbfstool_path}" "${tmprom}" add -f ${backgroundfile} -n background.png -t raw + "${cbfstool}" "${tmprom}" add -f ${backgroundfile} -n background.png -t raw printf "%s\n" "${tmprom}" } @@ -426,9 +471,9 @@ mkRomsWithGrub() { firstpayloadname="${4}" # allow values: grub, seabios, seabios_withgrub, seabios_grubfirst if [ "${payload_grub_withseabios}" = "y" ] && [ "${firstpayloadname}" = "grub" ]; then - mv "$(make_seabios_rom "${tmprompath}" "seabios.elf" "${seabios_opromloadonly}" "${initmode}" "${cbfstool}")" "${tmprompath}" + mv "$(make_seabios_rom "${tmprompath}" "seabios.elf" "${seabios_opromloadonly}" "${initmode}")" "${tmprompath}" elif [ "${payload_seabios_withgrub}" ] && [ "${firstpayloadname}" != "grub" ]; then - mv "$(make_seabios_rom "${tmprompath}" "fallback/payload" "${seabios_opromloadonly}" "${initmode}" "${cbfstool}")" "${tmprompath}" + mv "$(make_seabios_rom "${tmprompath}" "fallback/payload" "${seabios_opromloadonly}" "${initmode}")" "${tmprompath}" if [ "${firstpayloadname}" = "seabios_grubfirst" ]; then tmpbootorder=$(mktemp -t coreboot_rom.XXXXXXXXXX) printf "/rom@img/grub2\n" > "${tmpbootorder}" @@ -436,9 +481,18 @@ mkRomsWithGrub() { rm -f "${tmpbootorder}" "${cbfstool}" "${tmprompath}" add-int -i 0 -n etc/show-boot-menu fi - fi + fi - for keymapfile in resources/grub/keymap/*; do + keymaps="" + if [ -z ${keyboard_layouts} ]; then + keymaps="resources/grub/keymap/*" + else + for keymapname in ${keyboard_layouts}; do + keymaps+="resources/grub/keymap/${keymapname}.gkb" + done + fi + for keymapfile in ${keymaps}; do + echo "keymaps is $keymaps, keymapfile is $keymapfile" if [ ! -f "${keymapfile}" ]; then continue @@ -452,7 +506,7 @@ mkRomsWithGrub() { grub_path_in_cbfs="img/grub2" fi - tmpgrubrom="$(make_grubrom_from_keymap "${keymap}" "${tmprompath}" "${cbfstool}" "${grub_path_in_cbfs}")" + tmpgrubrom="$(make_grubrom_from_keymap "${keymap}" "${tmprompath}" "${grub_path_in_cbfs}")" if [ "${initmode}" = "normal" ]; then newrompath="${romdir}/${firstpayloadname}_${board}_${initmode}_${keymap}.rom" else @@ -483,7 +537,7 @@ mkRoms() { if [ "${payload_seabios}" = "y" ]; then if [ "${payload_seabios_withgrub}" = "n" ]; then - tmpseabiosrom="$(make_seabios_rom "${corebootrom}" "fallback/payload" "${seabios_opromloadonly}" "${initmode}" "${cbfstool}")" + tmpseabiosrom="$(make_seabios_rom "${corebootrom}" "fallback/payload" "${seabios_opromloadonly}" "${initmode}")" if [ "${initmode}" = "normal" ]; then newrompath="${romdir}/seabios_${board}_${initmode}.rom" else @@ -518,22 +572,38 @@ mkRoms() { fi } -initmode="libgfxinit" -for displaymode in corebootfb txtmode; do - cbcfgpath="resources/coreboot/${board}/config/${initmode}_${displaymode}" +if [ -z ${displaymodes} ]; then + initmode="libgfxinit" + for displaymode in corebootfb txtmode; do + cbcfgpath="resources/coreboot/${board}/config/${initmode}_${displaymode}" + mkRoms "${cbcfgpath}" "${displaymode}" "${initmode}" + done + + initmode="vgarom" + for displaymode in vesafb txtmode; do + cbcfgpath="resources/coreboot/${board}/config/${initmode}_${displaymode}" + mkRoms "${cbcfgpath}" "${displaymode}" "${initmode}" + done + + initmode="normal" + displaymode="txtmode" + cbcfgpath="resources/coreboot/${board}/config/${initmode}" mkRoms "${cbcfgpath}" "${displaymode}" "${initmode}" -done -initmode="vgarom" -for displaymode in vesafb txtmode; do - cbcfgpath="resources/coreboot/${board}/config/${initmode}_${displaymode}" - mkRoms "${cbcfgpath}" "${displaymode}" "${initmode}" -done +else + echo "special displaymode defined as $displaymodes" + initmode="libgfxinit" + for displaymode in ${displaymodes}; do + cbcfgpath="resources/coreboot/${board}/config/${initmode}_${displaymode}" + mkRoms "${cbcfgpath}" "${displaymode}" "${initmode}" + done -initmode="normal" -displaymode="txtmode" -cbcfgpath="resources/coreboot/${board}/config/${initmode}" -mkRoms "${cbcfgpath}" "${displaymode}" "${initmode}" + initmode="vgarom" + for displaymode in ${displaymodes}; do + cbcfgpath="resources/coreboot/${board}/config/${initmode}_${displaymode}" + mkRoms "${cbcfgpath}" "${displaymode}" "${initmode}" + done +fi ( cd "${cbdir}" diff --git a/resources/scripts/build/dependencies/arch b/resources/scripts/build/dependencies/arch index 7d4367d8..4f621c72 100755 --- a/resources/scripts/build/dependencies/arch +++ b/resources/scripts/build/dependencies/arch @@ -3,6 +3,7 @@ # arch script: installs build dependencies for Arch Linux # # Copyright (C) 2021 Melissa Goad +# Copyright (C) 2022 Caleb La Grange # # 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 @@ -83,3 +84,8 @@ pacman -S --needed --noconfirm base-devel # ------------------------------------------------------------ pacman -S --needed --noconfirm libpciaccess pciutils zlib libftdi base-devel libusb + +# Management engine extraction dependencies +# ------------------------------------------------------------ + +pacman -S --needed --noconfirm innoextract diff --git a/resources/scripts/build/dependencies/debian b/resources/scripts/build/dependencies/debian index 275ce160..77898201 100755 --- a/resources/scripts/build/dependencies/debian +++ b/resources/scripts/build/dependencies/debian @@ -3,6 +3,7 @@ # ubuntu2004 script: installs build dependencies for Ubuntu 20.04 # # Copyright (C) 2014, 2015, 2021 Leah Rowe +# Copyright (C) 2022 Caleb La Grange # # 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 @@ -80,7 +81,7 @@ apt-get -y install build-essential perl # Coreboot build dependencies (also requires build-essential and git) # ------------------------------------------------------------ -apt-get -y install libncurses5-dev doxygen iasl gdb flex bison build-essential git libssl-dev gnat +apt-get -y install libncurses5-dev doxygen iasl gdb flex bison build-essential git libssl-dev gnat python-is-python3 # For cross-compiling i686 target on x86_64 host. [ "${arch}" -eq 0 ] && apt-get -y install lib32ncurses5-dev @@ -102,3 +103,9 @@ apt-get -y install libpci-dev pciutils zlib1g-dev libftdi-dev build-essential li # For cross-compiling i686 target on x86_64 host. [ "${arch}" -eq 0 ] && apt-get -y install lib32z1-dev + + +# Blobs building dependencies (for me) +# ------------------------------------------------------------ + +apt-get -y install innoextract diff --git a/resources/scripts/build/dependencies/fedora35 b/resources/scripts/build/dependencies/fedora35 index 3b43dc36..a4c97a59 100755 --- a/resources/scripts/build/dependencies/fedora35 +++ b/resources/scripts/build/dependencies/fedora35 @@ -4,6 +4,7 @@ # # Copyright (C) 2021 Melody Goad # Copyright (C) 2021 Wei Mingzhi +# Copyright (C) 2022 Caleb La Grange # # 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 diff --git a/resources/scripts/build/dependencies/ubuntu2004 b/resources/scripts/build/dependencies/ubuntu2004 index 25e0d64f..a17b5260 100755 --- a/resources/scripts/build/dependencies/ubuntu2004 +++ b/resources/scripts/build/dependencies/ubuntu2004 @@ -3,6 +3,7 @@ # ubuntu2004 script: installs build dependencies for Ubuntu 20.04 # # Copyright (C) 2014, 2015, 2021 Leah Rowe +# Copyright (C) 2022 Caleb La Grange # # 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 @@ -102,3 +103,9 @@ apt-get -y install libpci-dev pciutils zlib1g-dev libftdi-dev build-essential li # For cross-compiling i686 target on x86_64 host. [ "${arch}" -eq 0 ] && apt-get -y install lib32z1-dev + + +# Blobs building dependencies (for me) +# ------------------------------------------------------------ + +apt-get -y install innoextract diff --git a/resources/scripts/build/dependencies/void b/resources/scripts/build/dependencies/void index a17a4ada..1a902a9b 100755 --- a/resources/scripts/build/dependencies/void +++ b/resources/scripts/build/dependencies/void @@ -67,12 +67,12 @@ xbps-install -y base-devel perl # Coreboot build dependencies (also requires build-essential and git) # ------------------------------------------------------------ -xbps-install -y ncurses doxygen acpica-utils gdb flex bison base-devel git openssl gcc-ada +xbps-install -y ncurses doxygen acpica-utils gdb flex bison base-devel git openssl gcc-ada ncurses-devel # GRUB build dependencies (also requires build-essential, bison and flex) # ------------------------------------------------------------ -xbps-install -y font-unifont-bdf autogen help2man base-devel bison flex dejavu-fonts-ttf texinfo rsync python3 libusb xz gawk device-mapper fuse gettext freetype +xbps-install -y font-unifont-bdf autogen help2man base-devel bison flex dejavu-fonts-ttf texinfo rsync python3 libusb xz gawk device-mapper fuse gettext gettext-devel freetype # BucTS build dependencies (external script) # ------------------------------------------------------------ @@ -83,3 +83,8 @@ xbps-install -y base-devel # ------------------------------------------------------------ xbps-install -y libpciaccess pciutils zlib libftdi1 base-devel libusb + +# Management engine extraction dependencies +# ------------------------------------------------------------ + +xbps-install -y innoextract 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 +# 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}" -- cgit v1.2.1