diff options
-rw-r--r-- | config/coreboot/default/patches/0039-soc-intel-alderlake-Don-t-compress-FSP-S.patch | 35 | ||||
-rw-r--r-- | config/coreboot/default/patches/0040-alderlake-don-t-require-full-fsp-repo-for-fd-path.patch | 33 | ||||
-rw-r--r-- | config/coreboot/x2e_n150/config/fspgop | 3 | ||||
-rw-r--r-- | config/dependencies/arch | 2 | ||||
-rw-r--r-- | config/dependencies/debian | 2 | ||||
-rwxr-xr-x | config/dependencies/fedora38 | 2 | ||||
-rwxr-xr-x | config/dependencies/fedora40 | 2 | ||||
-rwxr-xr-x | config/dependencies/fedora41 | 2 | ||||
-rw-r--r-- | config/dependencies/fedora42 | 2 | ||||
-rwxr-xr-x | config/dependencies/ubuntu2404 | 2 | ||||
-rw-r--r-- | config/dependencies/void | 2 | ||||
-rw-r--r-- | include/get.sh | 8 | ||||
-rw-r--r-- | include/init.sh | 6 | ||||
-rw-r--r-- | include/lib.sh | 26 | ||||
-rw-r--r-- | include/mrc.sh | 2 | ||||
-rw-r--r-- | include/release.sh | 2 | ||||
-rw-r--r-- | include/rom.sh | 6 | ||||
-rw-r--r-- | include/tree.sh | 6 | ||||
-rw-r--r-- | include/vendor.sh | 17 |
19 files changed, 124 insertions, 36 deletions
diff --git a/config/coreboot/default/patches/0039-soc-intel-alderlake-Don-t-compress-FSP-S.patch b/config/coreboot/default/patches/0039-soc-intel-alderlake-Don-t-compress-FSP-S.patch new file mode 100644 index 00000000..b9c0e89c --- /dev/null +++ b/config/coreboot/default/patches/0039-soc-intel-alderlake-Don-t-compress-FSP-S.patch @@ -0,0 +1,35 @@ +From b5898dacf4306ff8a436cc02e664144bfb2cf52b Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Sat, 4 Oct 2025 21:57:43 +0100 +Subject: [PATCH 1/1] soc/intel/alderlake: Don't compress FSP-S + +Build systems like lbmk need to reproducibly insert +certain vendor files on release images. + +Compression isn't always reproducible, and making it +so costs a lot more time than simply disabling compression. + +With this change, FSP-S uses slightly more space inside +the flash, but it's not that much. + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + src/soc/intel/alderlake/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/soc/intel/alderlake/Kconfig b/src/soc/intel/alderlake/Kconfig +index 739faa3808..1f6a1dca7d 100644 +--- a/src/soc/intel/alderlake/Kconfig ++++ b/src/soc/intel/alderlake/Kconfig +@@ -14,7 +14,7 @@ config SOC_INTEL_ALDERLAKE + select DISPLAY_FSP_VERSION_INFO + select DRIVERS_USB_ACPI + select EDK2_CPU_TIMER_LIB if PAYLOAD_EDK2 +- select FSP_COMPRESS_FSP_S_LZ4 ++# select FSP_COMPRESS_FSP_S_LZ4 + select FAST_SPI_SUPPORTS_EXT_BIOS_WINDOW + select FSP_M_XIP + select FSP_MULTIPHASE_SI_INIT_RETURN_BROKEN +-- +2.47.3 + diff --git a/config/coreboot/default/patches/0040-alderlake-don-t-require-full-fsp-repo-for-fd-path.patch b/config/coreboot/default/patches/0040-alderlake-don-t-require-full-fsp-repo-for-fd-path.patch new file mode 100644 index 00000000..ebfdd640 --- /dev/null +++ b/config/coreboot/default/patches/0040-alderlake-don-t-require-full-fsp-repo-for-fd-path.patch @@ -0,0 +1,33 @@ +From 71687d1f0d938b22612ace6e0481ad3eb394c9ad Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Sat, 4 Oct 2025 22:20:11 +0100 +Subject: [PATCH 1/1] alderlake: don't require full fsp repo for fd path + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + src/soc/intel/alderlake/Kconfig | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/src/soc/intel/alderlake/Kconfig b/src/soc/intel/alderlake/Kconfig +index 1f6a1dca7d..3979d9e162 100644 +--- a/src/soc/intel/alderlake/Kconfig ++++ b/src/soc/intel/alderlake/Kconfig +@@ -415,7 +415,14 @@ config FSP_HEADER_PATH + + config FSP_FD_PATH + string +- depends on FSP_USE_REPO ++# dependency removed for lbmk purposes, so that the path is present ++# in the config regardless of whether it's used. this is for ./mk -d ++# on alderlake boards, which is used by lbmk to manually split fsp, ++# even though the result is identical to what coreboot produces, because ++# this enables lbmk to strip the fsp in release archives, and re-insert ++# for compliance reasons (due to technicalities in intel's licensing), ++# and to enable lbmk's advanced checksum verification of vendor files ++# depends on FSP_USE_REPO + default "3rdparty/fsp/RaptorLakeFspBinPkg/IoT/RaptorLakeP/FSP.fd" if FSP_TYPE_IOT && SOC_INTEL_ALDERLAKE_PCH_P && SOC_INTEL_RAPTORLAKE + default "3rdparty/fsp/RaptorLakeFspBinPkg/IoT/RaptorLakeS/FSP.fd" if FSP_TYPE_IOT && SOC_INTEL_RAPTORLAKE_PCH_S + default "3rdparty/fsp/AlderLakeFspBinPkg/IoT/AlderLakeP/Fsp.fd" if FSP_TYPE_IOT && SOC_INTEL_ALDERLAKE_PCH_P +-- +2.47.3 + diff --git a/config/coreboot/x2e_n150/config/fspgop b/config/coreboot/x2e_n150/config/fspgop index 2044a1e8..6dad173c 100644 --- a/config/coreboot/x2e_n150/config/fspgop +++ b/config/coreboot/x2e_n150/config/fspgop @@ -625,11 +625,10 @@ CONFIG_HAVE_INTEL_FSP_REPO=y CONFIG_ADD_FSP_BINARIES=y CONFIG_FSP_S_CBFS="fsps.bin" CONFIG_FSP_M_CBFS="fspm.bin" -CONFIG_FSP_FULL_FD=y +# CONFIG_FSP_FULL_FD is not set CONFIG_FSP_T_RESERVED_SIZE=0x0 CONFIG_FSP_M_XIP=y CONFIG_FSP_USES_CB_STACK=y -CONFIG_FSP_COMPRESS_FSP_S_LZ4=y CONFIG_SOC_INTEL_COMMON_FSP_RESET=y CONFIG_FSPS_HAS_ARCH_UPD=y CONFIG_FSPS_USE_MULTI_PHASE_INIT=y diff --git a/config/dependencies/arch b/config/dependencies/arch index 727659c5..79819bda 100644 --- a/config/dependencies/arch +++ b/config/dependencies/arch @@ -8,7 +8,7 @@ dtc e2fsprogs flex freetype2 fuse2 gawk gcc-ada gdb gettext git \ help2man innoextract libftdi libgpiod libjaylink libpciaccess libusb nasm \ ncurses openssl p7zip ccache less libx86 \ pandoc parted pciutils perl perl-libwww python python-setuptools rsync \ -sharutils subversion swig texinfo ttf-dejavu unzip wget xz zlib mtools \ +sharutils subversion swig texinfo ttf-dejavu unarchiver unzip wget xz zlib mtools \ " aur_notice="bdf-unifont pcf-unifont psf-unifont mipsel-linux-gnu-binutils mipsel-linux-gnu-gcc" diff --git a/config/dependencies/debian b/config/dependencies/debian index d426300d..c7de8be0 100644 --- a/config/dependencies/debian +++ b/config/dependencies/debian @@ -12,7 +12,7 @@ libncurses-dev libnewlib-arm-none-eabi libopts25 libopts25-dev libpci-dev libpyt libsdl2-dev libselinux1-dev libssl-dev libtool libusb-1.0-0 libusb-1.0-0-dev \ libusb-dev lz4 lzma lzma-alone m4 nasm openssl p7zip p7zip-full parted pciutils \ perl pkg-config python3 python3-distutils-extra python3-pkg-resources python3-pycryptodome \ -python3-pyelftools python3-setuptools python-is-python3 sharutils swig \ +python3-pyelftools python3-setuptools python-is-python3 sharutils swig unar \ unifont unifont-bin unzip uuid-dev wget xfonts-unifont zlib1g-dev ccache \ g++-mipsel-linux-gnu make genisoimage mtools libx86-1 libx86-dev libstdc++-arm-none-eabi-newlib \ " diff --git a/config/dependencies/fedora38 b/config/dependencies/fedora38 index 3892edc5..a34bbbf0 100755 --- a/config/dependencies/fedora38 +++ b/config/dependencies/fedora38 @@ -9,6 +9,6 @@ gawk gcc gcc-gnat gdb gettext gettext-devel git gprbuild help2man \ innoextract intltool libftdi-devel libselinux-devel libusb1 libusb1-devel \ nasm ncurses-devel openssl-devel p7zip p7zip-plugins pandoc parted \ pciutils-devel perl perl-libwww-perl python-unversioned-command python3 \ -python3-setuptools rsync sharutils subversion texinfo unifont \ +python3-setuptools rsync sharutils subversion texinfo unar unifont \ unifont-fonts unifont-ttf-fonts unzip wget xz zlib-devel ccache swig \ " diff --git a/config/dependencies/fedora40 b/config/dependencies/fedora40 index b9bc5198..3ca84aa0 100755 --- a/config/dependencies/fedora40 +++ b/config/dependencies/fedora40 @@ -10,6 +10,6 @@ innoextract intltool libftdi-devel libgpiod-devel libjaylink-devel \ libselinux-devel libusb1 libusb1-devel nasm ncurses-devel openssl-devel \ p7zip p7zip-plugins pandoc parted pciutils-devel perl perl-libwww-perl \ python-unversioned-command python3 python3-setuptools rsync sharutils \ -subversion systemd-devel texinfo unifont unifont-fonts \ +subversion systemd-devel texinfo unar unifont unifont-fonts \ unifont-ttf-fonts unzip wget xz zlib-devel ccache swig python3-devel \ " diff --git a/config/dependencies/fedora41 b/config/dependencies/fedora41 index 73585aab..e49a50b2 100755 --- a/config/dependencies/fedora41 +++ b/config/dependencies/fedora41 @@ -10,7 +10,7 @@ innoextract intltool libftdi-devel libgpiod-devel libjaylink-devel \ libselinux-devel libusb1 libusb1-devel nasm ncurses-devel openssl-devel openssl-devel-engine \ p7zip p7zip-plugins pandoc parted pciutils-devel perl perl-libwww-perl \ python-unversioned-command python3 python3-setuptools rsync sharutils \ -subversion systemd-devel texinfo unifont unifont-fonts uuid-devel \ +subversion systemd-devel texinfo unar unifont unifont-fonts uuid-devel \ unifont-ttf-fonts unzip wget xz zlib-devel ccache swig python3-devel \ libuuid-devel gnutls-devel \ " diff --git a/config/dependencies/fedora42 b/config/dependencies/fedora42 index 426bf739..c7e34aad 100644 --- a/config/dependencies/fedora42 +++ b/config/dependencies/fedora42 @@ -12,5 +12,5 @@ p7zip p7zip-plugins pandoc parted pciutils-devel perl perl-libwww-perl \ python-unversioned-command python3 python3-setuptools rsync sharutils \ subversion systemd-devel texinfo unifont unifont-fonts uuid-devel \ unifont-ttf-fonts unzip wget xz zlib-devel ccache swig python3-devel \ -libuuid-devel gnutls-devel tar \ +libuuid-devel gnutls-devel tar unar \ " diff --git a/config/dependencies/ubuntu2404 b/config/dependencies/ubuntu2404 index 59695c03..a54a3177 100755 --- a/config/dependencies/ubuntu2404 +++ b/config/dependencies/ubuntu2404 @@ -12,6 +12,6 @@ libpython3-dev libsdl2-dev libselinux1-dev libssl-dev libtool libusb-1.0-0 \ libusb-1.0-0-dev lz4 lzma lzma-alone m4 nasm openssl p7zip p7zip-full parted \ pciutils perl pkg-config python3 python3-pkg-resources python3-pycryptodome \ python3-pyelftools python3-setuptools python-is-python3 sharutils swig \ -fonts-unifont unifont unzip uuid-dev wget zlib1g-dev ccache \ +fonts-unifont unar unifont unzip uuid-dev wget zlib1g-dev ccache \ g++-mipsel-linux-gnu make genisoimage mtools \ " diff --git a/config/dependencies/void b/config/dependencies/void index c7656b32..a02d706e 100644 --- a/config/dependencies/void +++ b/config/dependencies/void @@ -10,5 +10,5 @@ freetype freetype-devel fuse gawk gcc-ada gdb gettext gettext-devel git \ help2man innoextract libftdi1 libpciaccess libusb nasm ncurses \ ncurses-devel openssl openssl-devel p7zip parted pciutils perl perl-LWP \ python python3 python3-setuptools rsync sharutils subversion texinfo \ -unzip wget xz zlib ccache \ +unar unzip wget xz zlib ccache \ " diff --git a/include/get.sh b/include/get.sh index 3c30b6d3..0d430abe 100644 --- a/include/get.sh +++ b/include/get.sh @@ -81,7 +81,7 @@ git_prep() fi if [ "$_loc" != "${_loc%/*}" ]; then - x_ mkdir -p "${_loc%/*}" + x_ xbmkdir "${_loc%/*}" fi x_ mv "$tmpgit" "$_loc" } @@ -198,7 +198,7 @@ try_fetch_git() cached="${cached%.git}" cached="$XBMK_CACHE/$cached" - x_ mkdir -p "${5%/*}" "${cached%/*}" + x_ xbmkdir "${5%/*}" "${cached%/*}" if ! try_$2 "$cached" "$@"; then return 1 @@ -221,7 +221,7 @@ try_fetch_file() cached="file/$6" cached="$XBMK_CACHE/$cached" - x_ mkdir -p "${5%/*}" "${cached%/*}" + x_ xbmkdir "${5%/*}" "${cached%/*}" if bad_checksum "$6" "$cached" 2>/dev/null; then x_ rm -f "$cached" @@ -284,7 +284,7 @@ try_git() if [ ! -d "$gitdest" ]; then ( x_ git clone "$2" "$tmpgitcache" ) || return 1 - x_ mkdir -p "${gitdest%/*}" + x_ xbmkdir "${gitdest%/*}" x_ mv "$tmpgitcache" "$gitdest" fi diff --git a/include/init.sh b/include/init.sh index 72af26c3..96247908 100644 --- a/include/init.sh +++ b/include/init.sh @@ -58,7 +58,11 @@ xbmk_init() fi export PWD="$xbmkpwd" - x_ mkdir -p "$basetmp" + x_ xbmkdir "$basetmp" + + if [ ! -e "cache" ]; then + x_ xbmkdir "cache" + fi for init_cmd in get_version set_env set_threads git_init child_exec; do if ! xbmk_$init_cmd "$@"; then diff --git a/include/lib.sh b/include/lib.sh index 3d205fa9..feb411e0 100644 --- a/include/lib.sh +++ b/include/lib.sh @@ -8,12 +8,6 @@ cbfstool="elf/coreboot/default/cbfstool" rmodtool="elf/coreboot/default/rmodtool" -remkdir() -{ - x_ rm -Rf "$@" - x_ mkdir -p "$@" -} - mkrom_tarball() { update_xbmkver "$1" @@ -58,7 +52,7 @@ mktarball() printf "Creating tar archive '%s' from directory '%s'\n" "$2" "$1" if [ "${2%/*}" != "$2" ]; then - x_ mkdir -p "${2%/*}" + x_ xbmkdir "${2%/*}" fi x_ tar -c "$1" | xz -T$XBMK_THREADS -9e > "$2" || \ @@ -169,6 +163,24 @@ build_sbase() fi } +remkdir() +{ + x_ rm -Rf "$@" + x_ xbmkdir "$@" +} + +xbmkdir() +{ + while [ $# -gt 0 ] + do + if [ ! -d "$1" ]; then + x_ mkdir -p "$1" + fi + + shift 1 + done +} + fx_() { xchk fx_ "$@" diff --git a/include/mrc.sh b/include/mrc.sh index 92241b22..9d4566be 100644 --- a/include/mrc.sh +++ b/include/mrc.sh @@ -22,7 +22,7 @@ extract_refcode() err "cbfstoolref not set" "extract_refcode" "$@" fi - x_ mkdir -p "${_pre_dest%/*}" + x_ xbmkdir "${_pre_dest%/*}" x_ "$cbfstoolref" "$appdir/bios.bin" extract \ -m x86 -n fallback/refcode -f "$appdir/ref" -r RO_SECTION diff --git a/include/release.sh b/include/release.sh index 35a9c711..339ab3f5 100644 --- a/include/release.sh +++ b/include/release.sh @@ -52,7 +52,7 @@ release() fi x_ rm -Rf "$rsrc" - x_ mkdir -p "$reldir" + x_ xbmkdir "$reldir" x_ mv "$vdir" "$reldir" x_ rm -Rf "${vdir%"/$version"}" diff --git a/include/rom.sh b/include/rom.sh index 4de49eee..2efe4919 100644 --- a/include/rom.sh +++ b/include/rom.sh @@ -19,7 +19,7 @@ buildser() x_ make -C "$sersrc" BOARD=$2 fi - x_ mkdir -p "bin/serprog_$1" + x_ xbmkdir "bin/serprog_$1" x_ mv "$serx" "bin/serprog_$1/serprog_$2.${serx##*.}" } @@ -119,7 +119,7 @@ check_coreboot_util() return 0 fi - x_ mkdir -p "$utilelfdir" + x_ xbmkdir "$utilelfdir" x_ cp "$utilsrcdir/$1" "$utilelfdir" if [ "$1" = "cbfstool" ]; then @@ -453,7 +453,7 @@ cprom() printf "Creating new %s image: '%s'\n" "$projectname" "$newrom" - x_ mkdir -p "bin/$target" + x_ xbmkdir "bin/$target" x_ $cpcmd "$irom" "$newrom" } diff --git a/include/tree.sh b/include/tree.sh index 254f738d..19060110 100644 --- a/include/tree.sh +++ b/include/tree.sh @@ -432,7 +432,7 @@ project_up_to_date() shift 3 - x_ mkdir -p "$XBMK_CACHE/$hashdir" + x_ xbmkdir "$XBMK_CACHE/$hashdir" if [ -f "$XBMK_CACHE/$hashdir/$project$hashname" ]; then read -r old_hash < "$XBMK_CACHE/$hashdir/$project$hashname" \ @@ -485,7 +485,7 @@ check_cross_compiler() xgccargs="crossgcc-$xfix UPDATED_SUBMODULES=1 CPUS=$XBMK_THREADS" x_ ./mk -f coreboot "${cbdir#src/coreboot/}" - x_ mkdir -p "elf/coreboot/$tree" # TODO: is this needed? + x_ xbmkdir "elf/coreboot/$tree" # TODO: is this needed? export PATH="$xbmkpwd/$cbdir/util/crossgcc/xgcc/bin:$PATH" export CROSS_COMPILE="${xarch% *}-" @@ -748,7 +748,7 @@ check_makefile() copy_elf() { if [ -f "$listfile" ]; then - x_ mkdir -p "$dest_dir" + x_ xbmkdir "$dest_dir" fi if [ -f "$listfile" ]; then diff --git a/include/vendor.sh b/include/vendor.sh index a0806dd8..7fb4d9ea 100644 --- a/include/vendor.sh +++ b/include/vendor.sh @@ -217,7 +217,7 @@ fetch() return 0 fi - x_ mkdir -p "${_dest%/*}" + x_ xbmkdir "${_dest%/*}" if [ "$dl_type" != "fsp" ]; then extract_archive "$_dl" "$appdir" || \ @@ -490,12 +490,17 @@ extract_fsp() setvfile() { - [ -n "$vcfg" ] && for c in $checkvarschk; do - vcmd="[ \"\${$c}\" = \"/dev/null\" ] || [ -z \"\${$c}\" ]" - eval "$vcmd || return 0" + [ -n "$vcfg" ] && for c in $checkvarschk + do + do_getvfile="n" + vcmd="[ \"\${$c}\" != \"/dev/null\" ] && [ -n \"\${$c}\" ]" - if getvfile "$@"; then - return 0 + eval "$vcmd && do_getvfile=\"y\"" + + if [ "$do_getvfile" = "y" ]; then + if getvfile "$@"; then + return 0 + fi fi done && return 1; : } |