diff options
-rw-r--r-- | config/coreboot/default/nuke.list | 19 | ||||
-rw-r--r-- | config/coreboot/fam15h/nuke.list | 1 | ||||
-rwxr-xr-x | config/dependencies/debian | 2 | ||||
-rw-r--r-- | config/flashprog/patches/0002-lbmk-hack-add-config-Makefile-options.patch | 48 | ||||
-rw-r--r-- | config/grub/default/target.cfg | 2 | ||||
-rw-r--r-- | config/grub/nvme/target.cfg | 2 | ||||
-rw-r--r-- | config/grub/xhci/target.cfg | 2 | ||||
-rw-r--r-- | config/ifd/hp8300usdt/ifd | bin | 4096 -> 4096 bytes | |||
-rw-r--r-- | config/pcsx-redux/patches/0002-lbmk-hack-add-no-ops-for-config-commands.patch | 43 | ||||
-rw-r--r-- | include/get.sh | 20 | ||||
-rw-r--r-- | include/init.sh | 23 | ||||
-rw-r--r-- | include/lib.sh | 20 | ||||
-rw-r--r-- | include/release.sh | 2 | ||||
-rw-r--r-- | include/rom.sh | 2 | ||||
-rw-r--r-- | include/tree.sh | 10 | ||||
-rw-r--r-- | include/vendor.sh | 2 |
16 files changed, 161 insertions, 37 deletions
diff --git a/config/coreboot/default/nuke.list b/config/coreboot/default/nuke.list new file mode 100644 index 00000000..7e5ba3b5 --- /dev/null +++ b/config/coreboot/default/nuke.list @@ -0,0 +1,19 @@ +3rdparty/fsp/EagleStreamFspBinPkg +3rdparty/fsp/AlderLakeFspBinPkg +3rdparty/fsp/MeteorLakeFspBinPkg +3rdparty/fsp/IceLakeFspBinPkg +3rdparty/fsp/AmberLakeFspBinPkg +3rdparty/fsp/DenvertonNSFspBinPkg +3rdparty/fsp/TigerLakeFspBinPkg +3rdparty/fsp/CedarIslandFspBinPkg +3rdparty/fsp/ElkhartLakeFspBinPkg +3rdparty/fsp/CometLakeFspBinPkg +3rdparty/fsp/WhitleyFspBinPkg +3rdparty/fsp/ArrowLakeFspBinPkg +3rdparty/fsp/IdavilleFspBinPkg +3rdparty/fsp/BraswellFspBinPkg +3rdparty/fsp/CoffeeLakeFspBinPkg +3rdparty/fsp/RaptorLakeFspBinPkg +3rdparty/fsp/ApolloLakeFspBinPkg +3rdparty/fsp/SkylakeFspBinPkg +3rdparty/vboot/tests diff --git a/config/coreboot/fam15h/nuke.list b/config/coreboot/fam15h/nuke.list new file mode 100644 index 00000000..8ca7a4cf --- /dev/null +++ b/config/coreboot/fam15h/nuke.list @@ -0,0 +1 @@ +3rdparty/vboot/tests diff --git a/config/dependencies/debian b/config/dependencies/debian index 992fb690..d4c26ee0 100755 --- a/config/dependencies/debian +++ b/config/dependencies/debian @@ -14,5 +14,5 @@ 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 unar \ unifont unifont-bin unzip uuid-dev wget xfonts-unifont zlib1g-dev ccache \ -g++-mipsel-linux-gnu make genisoimage mtools \ +g++-mipsel-linux-gnu make genisoimage mtools libx86-1 libx86-dev \ " diff --git a/config/flashprog/patches/0002-lbmk-hack-add-config-Makefile-options.patch b/config/flashprog/patches/0002-lbmk-hack-add-config-Makefile-options.patch new file mode 100644 index 00000000..d2702d23 --- /dev/null +++ b/config/flashprog/patches/0002-lbmk-hack-add-config-Makefile-options.patch @@ -0,0 +1,48 @@ +From b7a4d2907d3358173510aa6e31af08afe4969b38 Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Thu, 22 May 2025 11:25:42 +0100 +Subject: [PATCH 1/1] lbmk hack: add config Makefile options + +this prevents a build error when running the +-u, -m, -s, -l and -n options in lbmk without +argument. + +this makes no functional changes to flashprog. + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + Makefile | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 12adf61..701f842 100644 +--- a/Makefile ++++ b/Makefile +@@ -1113,7 +1113,23 @@ libpayload: clean + gitconfig: + ./util/getrevision.sh -c 2>/dev/null && ./util/git-hooks/install.sh + +-.PHONY: all install clean distclean config branch tag versioninfo _export export tarball libpayload gitconfig ++oldconfig: ++ : ++ ++menuconfig: ++ : ++ ++savedefconfig: ++ : ++ ++olddefconfig: ++ : ++ ++nconfig: ++ : ++ ++ ++.PHONY: all install clean distclean config branch tag versioninfo _export export tarball libpayload gitconfig oldconfig menuconfig savedefconfig olddefconfig nconfig + + # Disable implicit suffixes and built-in rules (for performance and profit) + .SUFFIXES: +-- +2.39.5 + diff --git a/config/grub/default/target.cfg b/config/grub/default/target.cfg index a9dab736..f5cc85f1 100644 --- a/config/grub/default/target.cfg +++ b/config/grub/default/target.cfg @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-3.0-or-later tree="default" -rev="a4da71dafeea519b034beb159dfe80c486c2107c" +rev="73d1c959ea3417e9309ba8c6102d7d6dc7c94259" diff --git a/config/grub/nvme/target.cfg b/config/grub/nvme/target.cfg index aa86509f..7e473f19 100644 --- a/config/grub/nvme/target.cfg +++ b/config/grub/nvme/target.cfg @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-3.0-or-later tree="nvme" -rev="a4da71dafeea519b034beb159dfe80c486c2107c" +rev="73d1c959ea3417e9309ba8c6102d7d6dc7c94259" diff --git a/config/grub/xhci/target.cfg b/config/grub/xhci/target.cfg index 5727e70b..0b90065b 100644 --- a/config/grub/xhci/target.cfg +++ b/config/grub/xhci/target.cfg @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-3.0-or-later tree="xhci" -rev="a4da71dafeea519b034beb159dfe80c486c2107c" +rev="73d1c959ea3417e9309ba8c6102d7d6dc7c94259" diff --git a/config/ifd/hp8300usdt/ifd b/config/ifd/hp8300usdt/ifd Binary files differindex 3b81b704..282a8abb 100644 --- a/config/ifd/hp8300usdt/ifd +++ b/config/ifd/hp8300usdt/ifd diff --git a/config/pcsx-redux/patches/0002-lbmk-hack-add-no-ops-for-config-commands.patch b/config/pcsx-redux/patches/0002-lbmk-hack-add-no-ops-for-config-commands.patch new file mode 100644 index 00000000..1a495d60 --- /dev/null +++ b/config/pcsx-redux/patches/0002-lbmk-hack-add-no-ops-for-config-commands.patch @@ -0,0 +1,43 @@ +From e4cd98fb5e3baf8260a3692cab745dea925b0764 Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Thu, 22 May 2025 11:29:37 +0100 +Subject: [PATCH 1/1] lbmk hack: add no-ops for config commands + +./mk -u, -m, -s, -l and -n cause errors without +arguments, because pcsx-redux's makefile doesn't +have them. additionally, i use my own makefile here, +so that only the openbios is compiled. + +add these so that lbmk doesn't crash during tests. + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + lbmkbofhmakefile | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/lbmkbofhmakefile b/lbmkbofhmakefile +index fe2e36d2..e0e2a11e 100644 +--- a/lbmkbofhmakefile ++++ b/lbmkbofhmakefile +@@ -14,3 +14,18 @@ clean: + + distclean: + make -C src/mips/openbios clean ++ ++oldconfig: ++ : ++ ++menuconfig: ++ : ++ ++savedefconfig: ++ : ++ ++olddefconfig: ++ : ++ ++nconfig: ++ : +-- +2.39.5 + diff --git a/include/get.sh b/include/get.sh index 667ab398..6f1b5f1d 100644 --- a/include/get.sh +++ b/include/get.sh @@ -22,7 +22,7 @@ fetch_project() eval "`setvars "" xtree`" eval "`setcfg "config/git/$project/pkg.cfg"`" - chkvars url + chkvars url bkup_url [ -n "$xtree" ] && x_ ./mk -f coreboot "$xtree" [ -z "$depend" ] || for d in $depend ; do @@ -85,9 +85,12 @@ xbmkget() echk="f" && [ "$1" = "git" ] && echk="d" for url in "$2" "$3"; do - [ -n "$url" ] && try_file "$url" "$@" && \ - eval "[ -$echk \"$4\" ] && return 0" - done && err "$1 $2 $3 $4: not downloaded"; : + [ -n "$url" ] || err "empty URL given in: xbmkget $*" + try_file "$url" "$@" || continue + eval "[ -$echk \"$4\" ] || continue" + return 0 # successful download/copy + done + err "$1 $2 $3 $4: not downloaded"; : } try_file() @@ -101,7 +104,8 @@ try_file() echk="d" && [ "$2" != "git" ] && echk="f" && \ bad_checksum "$6" "$cached" 2>/dev/null && x_ rm -f "$cached" - eval "[ -$echk \"$cached\" ] || try_$2 \"\$cached\" \"\$@\" || return 1" + evalchk="[ -$echk \"$cached\" ] || " && [ "$2" = "git" ] && evalchk="" + eval "${evalchk}try_$2 \"\$cached\" \"\$@\" || return 1" [ "$2" != "git" ] && [ -f "$5" ] && \ bad_checksum "$6" "$5" 2>/dev/null && x_ cp "$cached" "$5" eval "[ -$echk \"$cached\" ] || return 1" @@ -140,8 +144,10 @@ try_git() [ -d "$gitdest" ] || x_ mkdir -p "${gitdest%/*}" [ -d "$gitdest" ] || x_ mv "$tmpgitcache" "$gitdest" - ( x_ git -C "$gitdest" remote add main "$4" 2>/dev/null ) || : - ( x_ git -C "$gitdest" remote add backup "$5" 2>/dev/null ) || : + ( x_ git -C "$gitdest" remote remove main ) || : + ( x_ git -C "$gitdest" remote remove backup ) || : + x_ git -C "$gitdest" remote add main "$4" + x_ git -C "$gitdest" remote add backup "$5" ( x_ git -C "$gitdest" fetch --all ) || : ( x_ git -C "$gitdest" pull --all ) || :; : } diff --git a/include/init.sh b/include/init.sh index ee19c398..38eb1c81 100644 --- a/include/init.sh +++ b/include/init.sh @@ -30,7 +30,7 @@ xbmk_init() id -u 1>/dev/null 2>/dev/null || err "suid check failed (id -u)" [ "$(id -u)" != "0" ] || err "this command as root is not permitted" - for init_cmd in get_version set_env git_init child_exec; do + for init_cmd in get_version set_env set_threads git_init child_exec; do xbmk_$init_cmd "$@" || break done } @@ -76,7 +76,7 @@ xbmk_set_env() if [ "$is_child" = "y" ]; then [ -z "${XBMK_CACHE+x}" ] && err "XBMK_CACHE unset on child" - [ -z "${XBMK_THREADS+x}" ] && err "XBMK_THREADS unset on child" + [ -z "${XBMK_THREADS+x}" ] && xbmk_set_threads e "lock" f missing && err "lock file absent on child" return 1 fi @@ -89,15 +89,9 @@ xbmk_set_env() export TMPDIR="$(mktemp -d -t xbmk_XXXXXXXX)" xbmktmp="$TMPDIR" - # XBMK_CACHE is a directory, for caching downloads and git repon - [ -z "${XBMK_CACHE+x}" ] && export XBMK_CACHE="$xbmkpwd/cache" - [ -z "$XBMK_CACHE" ] && export XBMK_CACHE="$xbmkpwd/cache" + export XBMK_CACHE="$xbmkpwd/cache" [ -L "$XBMK_CACHE" ] && [ "$XBMK_CACHE" = "$xbmkpwd/cache" ] && \ err "cachedir '$xbmkpwd/cache' is a symlink" - [ -L "$XBMK_CACHE" ] && export XBMK_CACHE="$xbmkpwd/cache" - xbmkcache="`findpath "$XBMK_CACHE"`" || \ - err "Can't resolve cachedir: '$XBMK_CACHE'" - export XBMK_CACHE="$xbmkcache" [ ! -e "$XBMK_CACHE" ] || \ [ -d "$XBMK_CACHE" ] || err "cachedir '$XBMK_CACHE' is a file"; : @@ -110,10 +104,6 @@ xbmk_set_env() [ "$XBMK_RELEASE" = "Y" ] && export XBMK_RELEASE="y" [ "$XBMK_RELEASE" = "y" ] || export XBMK_RELEASE="n" - [ -z "${XBMK_THREADS+x}" ] && export XBMK_THREADS=1 - expr "X$XBMK_THREADS" : "X-\{0,1\}[0123456789][0123456789]*$" \ - 1>/dev/null 2>/dev/null || export XBMK_THREADS=1 - xbmk_set_version export LOCALVERSION="-$projectname-${version%%-*}" @@ -123,6 +113,13 @@ xbmk_set_env() xbmk_set_pyver } +xbmk_set_threads() +{ + [ -z "${XBMK_THREADS+x}" ] && export XBMK_THREADS=1 + expr "X$XBMK_THREADS" : "X-\{0,1\}[0123456789][0123456789]*$" \ + 1>/dev/null 2>/dev/null || export XBMK_THREADS=1 +} + xbmk_set_version() { version_="$version" diff --git a/include/lib.sh b/include/lib.sh index 6c831795..7c4d71ea 100644 --- a/include/lib.sh +++ b/include/lib.sh @@ -53,8 +53,10 @@ setvars() fi val="$1" shift 1 - for var in "$@"; do - _setvars="$var=\"$val\"; $_setvars" + while true; do + [ $# -lt 1 ] && break + _setvars="$1=\"$val\"; $_setvars" + shift 1 done printf "%s\n" "${_setvars% }" } @@ -69,9 +71,11 @@ setcfg() chkvars() { - for var in "$@"; do - eval "[ -n \"\${$var+x}\" ] || err \"$var unset\"" - eval "[ -n \"\$$var\" ] || err \"$var unset\"" + while true; do + [ $# -lt 1 ] && break + eval "[ -n \"\${$1+x}\" ] || err \"$1 unset\"" + eval "[ -n \"\$$1\" ] || err \"$1 unset\"" + shift 1 done; : } @@ -106,9 +110,9 @@ fx_() dx_() { - [ -f "$2" ] && while read -r fx; do - $1 "$fx" || return 1 - done < "$2"; : + [ ! -f "$2" ] || while read -r fx; do + $1 "$fx" || return 1; : + done < "$2" || err "dx_ $*: cannot read '$2'"; : } x_() diff --git a/include/release.sh b/include/release.sh index 5d6da466..f23ed541 100644 --- a/include/release.sh +++ b/include/release.sh @@ -27,6 +27,8 @@ release() remkdir "$vdir" x_ git clone . "$rsrc" + x_ cp ".version" "$rsrc/.version" + x_ cp ".versiondate" "$rsrc/.versiondate" prep_release src prep_release tarball diff --git a/include/rom.sh b/include/rom.sh index 65900a01..1c39979d 100644 --- a/include/rom.sh +++ b/include/rom.sh @@ -20,6 +20,8 @@ buildser() copyps1bios() { + [ "$dry" = ":" ] && return 0; : + remkdir "bin/playstation" x_ cp src/pcsx-redux/src/mips/openbios/openbios.bin bin/playstation diff --git a/include/tree.sh b/include/tree.sh index 25d4732c..83887864 100644 --- a/include/tree.sh +++ b/include/tree.sh @@ -275,7 +275,8 @@ elfcheck() handle_makefile() { - $dry check_makefile "$srcdir" && x_ make -C "$srcdir" $cleanargs clean + $dry check_makefile "$srcdir" && \ + $dry x_ make -C "$srcdir" $cleanargs clean [ -f "$defconfig" ] && x_ cp "$defconfig" "$srcdir/.config" [ -n "$mode" ] || [ -n "$btype" ] || $dry make -C \ @@ -332,8 +333,9 @@ check_makefile() copy_elf() { - [ -f "$listfile" ] && x_ mkdir -p "$dest_dir" && while read -r f; do - [ -f "$srcdir/$f" ] && x_ cp "$srcdir/$f" "$dest_dir" - done < "$listfile" + [ -f "$listfile" ] && x_ mkdir -p "$dest_dir" + [ ! -f "$listfile" ] || while read -r f; do + [ -f "$srcdir/$f" ] && x_ cp "$srcdir/$f" "$dest_dir"; : + done < "$listfile" || err "copy_elf $*: cannot read '$listfile'"; : x_ make clean -C "$srcdir" $cleanargs } diff --git a/include/vendor.sh b/include/vendor.sh index 2732eade..99fc7467 100644 --- a/include/vendor.sh +++ b/include/vendor.sh @@ -107,7 +107,7 @@ fetch() [ "$dl_type" = "fsp" ] && for _cdl in dl dl_bkup; do eval "$_cdl=\"\${$_cdl##*../}\"; _cdp=\"\$$_cdl\"" [ -f "$_cdp" ] || _cdp="$cbdir/$_cdp" - [ -f "$_cdp" ] && eval "$_cdl=\"$_cdp\"" + [ -f "$_cdp" ] && eval "$_cdl=\"$_cdp\""; : done; : # download the file (from the internet) to extract from |