mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 21:39:03 +02:00
Merge branch 'master' into 25.06_branch
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subfile="https://www.mirrorservice.org/sites/libreboot.org/release/misc/acpica/acpica-unix-20241212.tar.gz"
|
||||
subfile_bkup="https://mirror.math.princeton.edu/pub/libreboot/misc/acpica/acpica-unix-20241212.tar.gz"
|
||||
subcurl="https://www.mirrorservice.org/sites/libreboot.org/release/misc/acpica/acpica-unix-20241212.tar.gz"
|
||||
subcurl_bkup="https://mirror.math.princeton.edu/pub/libreboot/misc/acpica/acpica-unix-20241212.tar.gz"
|
||||
subhash="daa4243f927451ac18c337cf17c27849e68329b3f7eb25b8c3379fda9c6a484201b73d4ffccab89a0ae22cc5e432f141ba149015a003834b0515bdb3d4efe0a8"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subrepo="https://review.coreboot.org/arm-trusted-firmware.git"
|
||||
subrepo_bkup="https://github.com/coreboot/arm-trusted-firmware"
|
||||
subgit="https://review.coreboot.org/arm-trusted-firmware.git"
|
||||
subgit_bkup="https://github.com/coreboot/arm-trusted-firmware"
|
||||
subhash="57ac3f74b34a3303f03deee264a1f2247c68008d"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/binutils/binutils-2.43.1.tar.xz"
|
||||
subfile_bkup="https://ftp.nluug.nl/pub/gnu/binutils/binutils-2.43.1.tar.xz"
|
||||
subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/binutils/binutils-2.43.1.tar.xz"
|
||||
subcurl_bkup="https://ftp.nluug.nl/pub/gnu/binutils/binutils-2.43.1.tar.xz"
|
||||
subhash="20977ad17729141a2c26d358628f44a0944b84dcfefdec2ba029c2d02f40dfc41cc91c0631044560d2bd6f9a51e1f15846b4b311befbe14f1239f14ff7d57824"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subrepo="https://review.coreboot.org/fsp.git"
|
||||
subrepo_bkup="https://github.com/coreboot/fsp"
|
||||
subgit="https://review.coreboot.org/fsp.git"
|
||||
subgit_bkup="https://github.com/coreboot/fsp"
|
||||
subhash="86c9111639d357e0f369c14248097b119112a71c"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz"
|
||||
subfile_bkup="https://ftp.nluug.nl/pub/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz"
|
||||
subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz"
|
||||
subcurl_bkup="https://ftp.nluug.nl/pub/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz"
|
||||
subhash="932bdef0cda94bacedf452ab17f103c0cb511ff2cec55e9112fc0328cbf1d803b42595728ea7b200e0a057c03e85626f937012e49a7515bc5dd256b2bf4bc396"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz"
|
||||
subfile_bkup="https://ftp.nluug.nl/pub/gnu/gmp/gmp-6.3.0.tar.xz"
|
||||
subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz"
|
||||
subcurl_bkup="https://ftp.nluug.nl/pub/gnu/gmp/gmp-6.3.0.tar.xz"
|
||||
subhash="e85a0dab5195889948a3462189f0e0598d331d3457612e2d3350799dba2e244316d256f8161df5219538eb003e4b5343f989aaa00f96321559063ed8c8f29fd2"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subrepo="https://review.coreboot.org/intel-microcode.git"
|
||||
subrepo_bkup="https://github.com/coreboot/intel-microcode"
|
||||
subgit="https://review.coreboot.org/intel-microcode.git"
|
||||
subgit_bkup="https://github.com/coreboot/intel-microcode"
|
||||
subhash="8a62de41c011615d749f8e72bb906dddc72e56a8"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subrepo="https://review.coreboot.org/libgfxinit.git"
|
||||
subrepo_bkup="https://github.com/coreboot/libgfxinit"
|
||||
subgit="https://review.coreboot.org/libgfxinit.git"
|
||||
subgit_bkup="https://github.com/coreboot/libgfxinit"
|
||||
subhash="17cfc92f402493979783585b6581efbd98c0cf07"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subrepo="https://review.coreboot.org/libhwbase.git"
|
||||
subrepo_bkup="https://github.com/coreboot/libhwbase"
|
||||
subgit="https://review.coreboot.org/libhwbase.git"
|
||||
subgit_bkup="https://github.com/coreboot/libhwbase"
|
||||
subhash="584629b9f4771b7618951cec57df2ca3af9c6981"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz"
|
||||
subfile_bkup="https://ftp.nluug.nl/pub/gnu/mpc/mpc-1.3.1.tar.gz"
|
||||
subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz"
|
||||
subcurl_bkup="https://ftp.nluug.nl/pub/gnu/mpc/mpc-1.3.1.tar.gz"
|
||||
subhash="4bab4ef6076f8c5dfdc99d810b51108ced61ea2942ba0c1c932d624360a5473df20d32b300fc76f2ba4aa2a97e1f275c9fd494a1ba9f07c4cb2ad7ceaeb1ae97"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpfr/mpfr-4.2.1.tar.xz"
|
||||
subfile_bkup="https://ftp.nluug.nl/pub/gnu/mpfr/mpfr-4.2.1.tar.xz"
|
||||
subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpfr/mpfr-4.2.1.tar.xz"
|
||||
subcurl_bkup="https://ftp.nluug.nl/pub/gnu/mpfr/mpfr-4.2.1.tar.xz"
|
||||
subhash="bc68c0d755d5446403644833ecbb07e37360beca45f474297b5d5c40926df1efc3e2067eecffdf253f946288bcca39ca89b0613f545d46a9e767d1d4cf358475"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subfile="https://www.nasm.us/pub/nasm/releasebuilds/2.16.03/nasm-2.16.03.tar.bz2"
|
||||
subfile_bkup="https://www.mirrorservice.org/sites/distfiles.macports.org/nasm/nasm-2.16.03.tar.bz2"
|
||||
subcurl="https://www.nasm.us/pub/nasm/releasebuilds/2.16.03/nasm-2.16.03.tar.bz2"
|
||||
subcurl_bkup="https://www.mirrorservice.org/sites/distfiles.macports.org/nasm/nasm-2.16.03.tar.bz2"
|
||||
subhash="f28445d368debdf44219cc57df33800a8c0e49186cd60836d4adfec7700d53b801d34aa9fc9bfda74169843f33a1e8b465e11292582eb968bb9c3a26f54dd172"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subrepo="https://review.coreboot.org/vboot.git"
|
||||
subrepo_bkup="https://github.com/coreboot/vboot"
|
||||
subgit="https://review.coreboot.org/vboot.git"
|
||||
subgit_bkup="https://github.com/coreboot/vboot"
|
||||
subhash="3f94e2c7ed58c4e67d6e7dc6052ec615dbbb9bb4"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subfile="https://www.mirrorservice.org/sites/libreboot.org/release/misc/acpica/acpica-unix2-20190703.tar.gz"
|
||||
subfile_bkup="https://mirror.math.princeton.edu/pub/libreboot/misc/acpica/acpica-unix2-20190703.tar.gz"
|
||||
subcurl="https://www.mirrorservice.org/sites/libreboot.org/release/misc/acpica/acpica-unix2-20190703.tar.gz"
|
||||
subcurl_bkup="https://mirror.math.princeton.edu/pub/libreboot/misc/acpica/acpica-unix2-20190703.tar.gz"
|
||||
subhash="8445a6d354ce3bcbfb5159f4ec0312b1e910c0b1b2033a2300f892e4ac580abab4e3f5b4ded379f0036299359d307330511ab7053678cfd9031d7df4c365f555"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/binutils/binutils-2.32.tar.xz"
|
||||
subfile_bkup="https://ftp.nluug.nl/pub/gnu/binutils/binutils-2.32.tar.xz"
|
||||
subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/binutils/binutils-2.32.tar.xz"
|
||||
subcurl_bkup="https://ftp.nluug.nl/pub/gnu/binutils/binutils-2.32.tar.xz"
|
||||
subhash="d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subrepo="https://review.coreboot.org/blobs.git"
|
||||
subrepo_bkup="https://github.com/coreboot/blobs"
|
||||
subgit="https://review.coreboot.org/blobs.git"
|
||||
subgit_bkup="https://github.com/coreboot/blobs"
|
||||
subhash="034b27818450428f70aa9316c8bd0d65bacd8ee8"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz"
|
||||
subfile_bkup="https://ftp.nluug.nl/pub/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz"
|
||||
subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz"
|
||||
subcurl_bkup="https://ftp.nluug.nl/pub/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz"
|
||||
subhash="1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz"
|
||||
subfile_bkup="https://ftp.nluug.nl/pub/gnu/gmp/gmp-6.1.2.tar.xz"
|
||||
subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz"
|
||||
subcurl_bkup="https://ftp.nluug.nl/pub/gnu/gmp/gmp-6.1.2.tar.xz"
|
||||
subhash="9f098281c0593b76ee174b722936952671fab1dae353ce3ed436a31fe2bc9d542eca752353f6645b7077c1f395ab4fdd355c58e08e2a801368f1375690eee2c6"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz"
|
||||
subfile_bkup="https://ftp.nluug.nl/pub/gnu/mpc/mpc-1.1.0.tar.gz"
|
||||
subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz"
|
||||
subcurl_bkup="https://ftp.nluug.nl/pub/gnu/mpc/mpc-1.1.0.tar.gz"
|
||||
subhash="72d657958b07c7812dc9c7cbae093118ce0e454c68a585bfb0e2fa559f1bf7c5f49b93906f580ab3f1073e5b595d23c6494d4d76b765d16dde857a18dd239628"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.xz"
|
||||
subfile_bkup="https://ftp.nluug.nl/pub/gnu/mpfr/mpfr-4.0.2.tar.xz"
|
||||
subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.xz"
|
||||
subcurl_bkup="https://ftp.nluug.nl/pub/gnu/mpfr/mpfr-4.0.2.tar.xz"
|
||||
subhash="d583555d08863bf36c89b289ae26bae353d9a31f08ee3894520992d2c26e5683c4c9c193d7ad139632f71c0a476d85ea76182702a98bf08dde7b6f65a54f8b88"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subfile="https://www.nasm.us/pub/nasm/releasebuilds/2.16.03/nasm-2.16.03.tar.bz2"
|
||||
subfile_bkup="https://www.mirrorservice.org/sites/distfiles.macports.org/nasm/nasm-2.16.03.tar.bz2"
|
||||
subcurl="https://www.nasm.us/pub/nasm/releasebuilds/2.16.03/nasm-2.16.03.tar.bz2"
|
||||
subcurl_bkup="https://www.mirrorservice.org/sites/distfiles.macports.org/nasm/nasm-2.16.03.tar.bz2"
|
||||
subhash="f28445d368debdf44219cc57df33800a8c0e49186cd60836d4adfec7700d53b801d34aa9fc9bfda74169843f33a1e8b465e11292582eb968bb9c3a26f54dd172"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subrepo="https://review.coreboot.org/vboot.git"
|
||||
subrepo_bkup="https://github.com/coreboot/vboot"
|
||||
subgit="https://review.coreboot.org/vboot.git"
|
||||
subgit_bkup="https://github.com/coreboot/vboot"
|
||||
subhash="ecdca931ae0637d1a9498f64862939bd5bb99e0b"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subhash="47c993cba483ff23a4c7b866c6cedcc905e9a2bd"
|
||||
subrepo="https://codeberg.org/libreboot/lbwww"
|
||||
subrepo_bkup="https://git.disroot.org/libreboot/lbwww"
|
||||
subgit="https://codeberg.org/libreboot/lbwww"
|
||||
subgit_bkup="https://git.disroot.org/libreboot/lbwww"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subhash="68863fd7491f1358fb920d8ad558de35fcfec769"
|
||||
subrepo="https://codeberg.org/libreboot/lbwww-img"
|
||||
subrepo_bkup="https://git.disroot.org/libreboot/lbwww-img"
|
||||
subgit="https://codeberg.org/libreboot/lbwww-img"
|
||||
subgit_bkup="https://git.disroot.org/libreboot/lbwww-img"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subrepo="https://codeberg.org/libreboot/gnulib"
|
||||
subrepo_bkup="git://git.sv.gnu.org/gnulib" # ALWAYS slow. only use as backup!
|
||||
subgit="https://codeberg.org/libreboot/gnulib"
|
||||
subgit_bkup="git://git.sv.gnu.org/gnulib" # ALWAYS slow. only use as backup!
|
||||
subhash="9f48fb992a3d7e96610c4ce8be969cff2d61a01b"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subrepo="https://codeberg.org/libreboot/gnulib"
|
||||
subrepo_bkup="git://git.sv.gnu.org/gnulib" # ALWAYS slow. only use as backup!
|
||||
subgit="https://codeberg.org/libreboot/gnulib"
|
||||
subgit_bkup="git://git.sv.gnu.org/gnulib" # ALWAYS slow. only use as backup!
|
||||
subhash="9f48fb992a3d7e96610c4ce8be969cff2d61a01b"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subrepo="https://codeberg.org/libreboot/gnulib"
|
||||
subrepo_bkup="git://git.sv.gnu.org/gnulib" # ALWAYS slow. only use as backup!
|
||||
subgit="https://codeberg.org/libreboot/gnulib"
|
||||
subgit_bkup="git://git.sv.gnu.org/gnulib" # ALWAYS slow. only use as backup!
|
||||
subhash="9f48fb992a3d7e96610c4ce8be969cff2d61a01b"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subhash="7c6f1973a16893cf1f0868af6f8e60a028b933ad"
|
||||
subrepo="https://github.com/grumpycoders/uC-sdk.git"
|
||||
subrepo_bkup="https://codeberg.org/vimuser/uC-sdk"
|
||||
subgit="https://github.com/grumpycoders/uC-sdk.git"
|
||||
subgit_bkup="https://codeberg.org/vimuser/uC-sdk"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subhash="86c416d4c0fb38432460b3e11b08b9de76941bf5"
|
||||
subrepo="https://codeberg.org/libreboot/tinyusb"
|
||||
subrepo_bkup="https://github.com/hathach/tinyusb.git"
|
||||
subgit="https://codeberg.org/libreboot/tinyusb"
|
||||
subgit_bkup="https://github.com/hathach/tinyusb.git"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
subhash="458250dc6147dc807eec9e4d5a6caf38a699ecb1"
|
||||
subrepo="https://codeberg.org/libreboot/libopencm3"
|
||||
subrepo_bkup="https://github.com/libopencm3/libopencm3"
|
||||
subgit="https://codeberg.org/libreboot/libopencm3"
|
||||
subgit_bkup="https://github.com/libopencm3/libopencm3"
|
||||
|
||||
173
include/get.sh
Normal file
173
include/get.sh
Normal file
@@ -0,0 +1,173 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright (c) 2020-2021,2023-2025 Leah Rowe <leah@libreboot.org>
|
||||
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
||||
|
||||
eval "`setvars "" loc url bkup_url subcurl subhash subgit subgit_bkup \
|
||||
depend subcurl_bkup repofail`"
|
||||
|
||||
tmpgit="$xbmklocal/gitclone"
|
||||
tmpgitcache="$XBMK_CACHE/tmpgit"
|
||||
|
||||
fetch_targets()
|
||||
{
|
||||
e "src/$project/$tree" d && return 0
|
||||
|
||||
printf "Creating %s tree %s\n" "$project" "$tree"
|
||||
git_prep "$url" "$bkup_url" "$xbmkpwd/$configdir/$tree/patches" \
|
||||
"src/$project/$tree" with_submodules
|
||||
nuke "$project/$tree" "$project/$tree"
|
||||
}
|
||||
|
||||
fetch_project()
|
||||
{
|
||||
eval "`setvars "" xtree`"
|
||||
eval "`setcfg "config/git/$project/pkg.cfg"`"
|
||||
|
||||
chkvars url
|
||||
|
||||
[ -n "$xtree" ] && x_ ./mk -f coreboot "$xtree"
|
||||
[ -z "$depend" ] || for d in $depend ; do
|
||||
printf "'%s' needs '%s'; grabbing '%s'\n" "$project" "$d" "$d"
|
||||
x_ ./mk -f $d
|
||||
done
|
||||
clone_project
|
||||
|
||||
for x in config/git/*; do
|
||||
[ -d "$x" ] && nuke "${x##*/}" "src/${x##*/}" 2>/dev/null; :
|
||||
done; :
|
||||
}
|
||||
|
||||
clone_project()
|
||||
{
|
||||
loc="$XBMK_CACHE/clone/$project" && singletree "$project" && \
|
||||
loc="src/$project"
|
||||
printf "Downloading project '%s' to '%s'\n" "$project" "$loc"
|
||||
|
||||
e "$loc" d missing && remkdir "${tmpgit%/*}" && git_prep \
|
||||
"$url" "$bkup_url" "$xbmkpwd/config/$project/patches" "$loc"; :
|
||||
}
|
||||
|
||||
git_prep()
|
||||
{
|
||||
_patchdir="$3"
|
||||
_loc="$4" # $1 and $2 are gitrepo and gitrepo_backup
|
||||
|
||||
chkvars rev
|
||||
xbmkget git "$1" "$2" "$tmpgit" "$rev" "$_patchdir"
|
||||
if singletree "$project" || [ $# -gt 4 ]; then
|
||||
dx_ fetch_submodule "$mdir/module.list"
|
||||
fi
|
||||
|
||||
[ "$_loc" = "${_loc%/*}" ] || x_ mkdir -p "${_loc%/*}"
|
||||
x_ mv "$tmpgit" "$_loc"
|
||||
}
|
||||
|
||||
fetch_submodule()
|
||||
{
|
||||
mcfgdir="$mdir/${1##*/}"; eval \
|
||||
"`setvars "" subhash subgit subgit_bkup subcurl subcurl_bkup st`"
|
||||
eval "`setcfg "$mcfgdir/module.cfg" 0`"
|
||||
|
||||
for xt in git curl; do
|
||||
_seval="if [ -n \"\$sub$xt\" ] || [ -n \"\$sub${xt}_bkup\" ]"
|
||||
eval "$_seval; then st=\"\$st \$xt\"; fi"
|
||||
done
|
||||
|
||||
st="${st# }" && [ "$st" = "git curl" ] && err "$mdir: git+curl defined"
|
||||
[ -z "$st" ] && return 0 # subgit/subcurl not defined
|
||||
chkvars "sub${st}" "sub${st}_bkup" "subhash"
|
||||
|
||||
[ "$st" = "git" ] && x_ rm -Rf "$tmpgit/$1"
|
||||
eval xbmkget "$st" "\$sub$st" "\$sub${st}_bkup" "$tmpgit/$1" \
|
||||
"$subhash" "$mdir/${1##*/}/patches"
|
||||
}
|
||||
|
||||
xbmkget()
|
||||
{
|
||||
[ "$1" = "curl" ] || [ "$1" = "copy" ] || [ "$1" = "git" ] || \
|
||||
err "Bad dlop (arg 1): xbmkget $*"
|
||||
|
||||
for url in "$2" "$3"; do
|
||||
[ -n "$url" ] && try_file "$url" "$@" && return 0
|
||||
done && err "$1 $2 $3 $4: not downloaded"; :
|
||||
}
|
||||
|
||||
try_file()
|
||||
{
|
||||
cached="file/$6" && [ "$2" = "git" ] && cached="clone/${3##*/}" && \
|
||||
cached="${cached%.git}" # always the main repo as basis for naming,
|
||||
# in case the backup has another name
|
||||
cached="$XBMK_CACHE/$cached"
|
||||
x_ mkdir -p "${5%/*}" "${cached%/*}"
|
||||
|
||||
echk="d" && [ "$2" != "git" ] && echk="f" && \
|
||||
bad_checksum "$6" "$cached" 2>/dev/null && x_ rm -f "$cached"
|
||||
|
||||
e "$cached" $echk || try_$2 "$cached" "$@" || return 1
|
||||
if e "$5" $echk && [ "$2" != "git" ]; then
|
||||
bad_checksum "$6" "$5" 2>/dev/null && x_ cp "$cached" "$5"
|
||||
fi
|
||||
e "$cached" $echk missing && return 1
|
||||
|
||||
if [ "$2" = "git" ]; then
|
||||
tmpclone "$cached" "$5" "$6" "$7" || return 1
|
||||
else
|
||||
bad_checksum "$6" "$cached" && x_ rm -f "$cached" && return 1
|
||||
[ "$cached" != "$5" ] && x_ cp "$cached" "$5"
|
||||
bad_checksum "$6" "$5" && x_ rm -f "$5" && return 1; :
|
||||
fi
|
||||
}
|
||||
|
||||
try_curl()
|
||||
{
|
||||
_ua="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
|
||||
( x_ curl --location --retry 3 -A "$_ua" "$2" -o "$1" ) || \
|
||||
( x_ wget --tries 3 -U "$_ua" "$2" -O "$1" ) || return 1; :
|
||||
}
|
||||
|
||||
try_copy()
|
||||
{
|
||||
[ -L "$2" ] && printf "symlink %s (trycp %s)\n" "$2" "$*" && return 1
|
||||
[ ! -f "$2" ] && printf "%s missing (trycp %s)\n" "$2" "$*" && return 1
|
||||
( x_ cp "$2" "$1" ) || return 1; :
|
||||
}
|
||||
|
||||
try_git()
|
||||
{
|
||||
gitdest="`findpath "$1"`" || err "Can't get readpath for '$1'"
|
||||
x_ rm -Rf "$tmpgitcache"
|
||||
|
||||
[ -d "$gitdest" ] || ( x_ git clone "$2" "$tmpgitcache" ) || return 1
|
||||
[ -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" fetch --all ) || :
|
||||
( x_ git -C "$gitdest" pull --all ) || :; :
|
||||
}
|
||||
|
||||
bad_checksum()
|
||||
{
|
||||
[ ! -f "$2" ] || [ "$(sha512sum "$2" | awk '{print $1}')" != "$1" ] \
|
||||
|| return 1
|
||||
printf "Bad checksum for file: %s\n" "$2" 1>&2
|
||||
x_ rm -f "$2"
|
||||
}
|
||||
|
||||
tmpclone()
|
||||
{
|
||||
[ -d "$2" ] && return 0
|
||||
printf "Creating git clone '%s' from '%s'\n" "$2" "$1"
|
||||
( x_ git clone "$1" "$2" ) || return 1
|
||||
( x_ git -C "$2" reset --hard "$3" ) || return 1
|
||||
( fx_ "eval x_ git -C \"$2\" am" find "$4" -type f ) || return 1; :
|
||||
}
|
||||
|
||||
nuke()
|
||||
{
|
||||
e "config/${1%/}/nuke.list" f missing || while read -r nukefile; do
|
||||
rmf="src/${2%/}/$nukefile" && [ -L "$rmf" ] && continue
|
||||
e "$rmf" e missing || x_ rm -Rf "$rmf"
|
||||
done < "config/${1%/}/nuke.list"; :
|
||||
}
|
||||
106
include/git.sh
106
include/git.sh
@@ -1,106 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright (c) 2020-2021,2023-2025 Leah Rowe <leah@libreboot.org>
|
||||
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
||||
|
||||
eval "`setvars "" loc url bkup_url subfile subhash subrepo subrepo_bkup \
|
||||
depend subfile_bkup repofail`"
|
||||
|
||||
tmpgit="$xbmklocal/gitclone"
|
||||
|
||||
fetch_targets()
|
||||
{
|
||||
e "src/$project/$tree" d && return 0
|
||||
|
||||
printf "Creating %s tree %s\n" "$project" "$tree"
|
||||
git_prep "$loc" "$loc" "$xbmkpwd/$configdir/$tree/patches" \
|
||||
"src/$project/$tree" with_submodules
|
||||
nuke "$project/$tree" "$project/$tree"
|
||||
}
|
||||
|
||||
fetch_project()
|
||||
{
|
||||
eval "`setvars "" xtree`"
|
||||
eval "`setcfg "config/git/$project/pkg.cfg"`"
|
||||
|
||||
chkvars url
|
||||
|
||||
[ -n "$xtree" ] && x_ ./mk -f coreboot "$xtree"
|
||||
[ -z "$depend" ] || for d in $depend ; do
|
||||
printf "'%s' needs '%s'; grabbing '%s'\n" "$project" "$d" "$d"
|
||||
x_ ./mk -f $d
|
||||
done
|
||||
clone_project
|
||||
|
||||
for x in config/git/*; do
|
||||
[ -d "$x" ] && nuke "${x##*/}" "src/${x##*/}" 2>/dev/null; :
|
||||
done; :
|
||||
}
|
||||
|
||||
clone_project()
|
||||
{
|
||||
loc="$XBMK_CACHE/repo/$project" && singletree "$project" && \
|
||||
loc="src/$project"
|
||||
printf "Downloading project '%s' to '%s'\n" "$project" "$loc"
|
||||
|
||||
e "$loc" d missing && remkdir "${tmpgit%/*}" && git_prep \
|
||||
"$url" "$bkup_url" "$xbmkpwd/config/$project/patches" "$loc"; :
|
||||
}
|
||||
|
||||
git_prep()
|
||||
{
|
||||
_patchdir="$3"
|
||||
_loc="$4" # $1 and $2 are gitrepo and gitrepo_backup
|
||||
|
||||
chkvars rev
|
||||
tmpclone "$1" "$2" "$tmpgit" "$rev" "$_patchdir"
|
||||
if singletree "$project" || [ $# -gt 4 ]; then
|
||||
dx_ fetch_submodule "$mdir/module.list"
|
||||
fi
|
||||
|
||||
[ "$_loc" != "$XBMK_CACHE/repo/$project" ] && \
|
||||
[ "$XBMK_RELEASE" = "y" ] && rmgit "$tmpgit"
|
||||
|
||||
[ "$_loc" = "${_loc%/*}" ] || x_ mkdir -p "${_loc%/*}"
|
||||
x_ mv "$tmpgit" "$_loc"
|
||||
}
|
||||
|
||||
fetch_submodule()
|
||||
{
|
||||
mcfgdir="$mdir/${1##*/}"; eval \
|
||||
"`setvars "" subhash subrepo subrepo_bkup subfile subfile_bkup st`"
|
||||
[ ! -f "$mcfgdir/module.cfg" ] || . "$mcfgdir/module.cfg" || \
|
||||
err "! . $mcfgdir/module.cfg"
|
||||
|
||||
for xt in repo file; do
|
||||
_seval="if [ -n \"\$sub$xt\" ] || [ -n \"\$sub${xt}_bkup\" ]"
|
||||
eval "$_seval; then st=\"\$st \$xt\"; fi"
|
||||
done
|
||||
st="${st# }" && [ "$st" = "repo file" ] && err "$mdir: repo+file"
|
||||
|
||||
[ -z "$st" ] && return 0 # subrepo/subfile not defined
|
||||
chkvars "sub${st}" "sub${st}_bkup" "subhash"
|
||||
|
||||
[ "$st" = "file" ] && xbmkget "$subfile" "$subfile_bkup" \
|
||||
"$tmpgit/$1" "$subhash" && return 0
|
||||
x_ rm -Rf "$tmpgit/$1"
|
||||
tmpclone "$subrepo" "$subrepo_bkup" "$tmpgit/$1" "$subhash" \
|
||||
"$mdir/${1##*/}/patches"
|
||||
}
|
||||
|
||||
tmpclone()
|
||||
{
|
||||
[ -d "$3" ] && return 0
|
||||
printf "Creating git clone '%s' from '%s', '%s'\n" "$3" "$1" "$2"
|
||||
git clone "$1" "$3" || x_ rm -Rf "$3"
|
||||
[ -d "$3" ] || x_ git clone "$2" "$3"
|
||||
x_ git -C "$3" reset --hard "$4"
|
||||
fx_ "eval x_ git -C \"$3\" am" find "$5" -type f
|
||||
}
|
||||
|
||||
nuke()
|
||||
{
|
||||
e "config/${1%/}/nuke.list" f missing || while read -r nukefile; do
|
||||
rmf="src/${2%/}/$nukefile" && [ -L "$rmf" ] && continue
|
||||
e "$rmf" e missing || x_ rm -Rf "$rmf"
|
||||
done < "config/${1%/}/nuke.list"; :
|
||||
}
|
||||
@@ -4,7 +4,6 @@
|
||||
# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
|
||||
|
||||
cbcfgsdir="config/coreboot"
|
||||
hashfiles="vendorhashes blobhashes" # blobhashes for backwards compatibility
|
||||
tmpromdel="$XBMK_CACHE/DO_NOT_FLASH"
|
||||
nvm="util/nvmutil/nvm"
|
||||
ifdtool="elf/ifdtool/default/ifdtool"
|
||||
@@ -14,7 +13,7 @@ cv="CONFIG_GBE_BIN_PATH"
|
||||
[ -n "$cvchk" ] && cv="$cv $cvchk"
|
||||
|
||||
eval "`setvars "" archive boarddir IFD_platform ifdprefix tree new_mac \
|
||||
tmpromdir board $cv`"
|
||||
tmpromdir board xchanged $cv`"
|
||||
|
||||
inject()
|
||||
{
|
||||
@@ -39,9 +38,6 @@ inject()
|
||||
esac
|
||||
[ "$new_mac" = "keep" ] && new_mac=""
|
||||
|
||||
[ -n "$new_mac" ] && [ "$new_mac" != "restore" ] && \
|
||||
x_ make -C util/nvmutil clean && x_ make -C util/nvmutil
|
||||
|
||||
check_release
|
||||
check_target && patch_release
|
||||
|
||||
@@ -75,10 +71,7 @@ check_release()
|
||||
|
||||
check_target()
|
||||
{
|
||||
if [ "$board" = "serprog_rp2040" ] || [ "$board" = "serprog_stm32" ] \
|
||||
|| [ "$board" = "serprog_pico" ]; then
|
||||
return 1
|
||||
fi
|
||||
[ "$board" = "${board#serprog_}" ] || return 1
|
||||
boarddir="$cbcfgsdir/$board"
|
||||
|
||||
eval "`setcfg "$boarddir/target.cfg"`"
|
||||
@@ -98,7 +91,7 @@ patch_release()
|
||||
remkdir "${tmpromdir%"/bin/$board"}"
|
||||
x_ tar -xf "$archive" -C "${tmpromdir%"/bin/$board"}"
|
||||
|
||||
for _hashes in $hashfiles; do
|
||||
for _hashes in "vendorhashes" "blobhashes"; do
|
||||
e "$tmpromdir/$_hashes" f && \
|
||||
has_hashes="y" && hashfile="$_hashes" && break; :
|
||||
done
|
||||
@@ -113,7 +106,7 @@ readkconfig()
|
||||
x_ rm -f "$xbmktmp/cbcfg"
|
||||
fx_ scankconfig x_ find "$boarddir/config" -type f
|
||||
eval "`setcfg "$xbmktmp/cbcfg" 1`"
|
||||
setvfile "$@" && return 1; :
|
||||
setvfile "$@" || return 1; :
|
||||
}
|
||||
|
||||
scankconfig()
|
||||
@@ -127,11 +120,12 @@ modify_mac()
|
||||
{
|
||||
x_ cp "${CONFIG_GBE_BIN_PATH##*../}" "$xbmklocal/gbe"
|
||||
[ -n "$new_mac" ] && [ "$new_mac" != "restore" ] && \
|
||||
x_ make -C util/nvmutil clean && x_ make -C util/nvmutil && \
|
||||
x_ "$nvm" "$xbmklocal/gbe" setmac "$new_mac"
|
||||
|
||||
fx_ newmac x_ find "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
|
||||
|
||||
printf "\nGbE NVM written to '%s':\n" "$archive"
|
||||
printf "\nThe following GbE NVM data will be written:\n"
|
||||
x_ "$nvm" "$xbmklocal/gbe" dump | grep -v "bytes read from file" || :
|
||||
}
|
||||
|
||||
@@ -145,7 +139,8 @@ remktar()
|
||||
{
|
||||
(
|
||||
x_ cd "${tmpromdir%"/bin/$board"}"
|
||||
mkrom_tarball "bin/$board"
|
||||
printf "Re-building tar archive (please wait)\n"
|
||||
mkrom_tarball "bin/$board" 1>/dev/null
|
||||
) || err "Cannot re-generate '$archive'"
|
||||
|
||||
mv "${tmpromdir%"/bin/$board"}/bin/${relname}_${board}.tar.xz" \
|
||||
|
||||
@@ -29,63 +29,6 @@ mktarball()
|
||||
x_ tar -c "$1" | xz -T$XBMK_THREADS -9e > "$2" || err "mktarball2, $1"
|
||||
}
|
||||
|
||||
mksha512sum()
|
||||
{
|
||||
(
|
||||
[ "${1%/*}" != "$1" ] && x_ cd "${1%/*}"
|
||||
sha512sum ./"${1##*/}" >> "$2" || err "!sha512sum \"$1\" > \"$2\""
|
||||
) || err "failed to create tarball checksum"
|
||||
}
|
||||
|
||||
rmgit()
|
||||
{
|
||||
x_ find "$1" -name ".git" -exec rm -Rf {} +
|
||||
x_ find "$1" -name ".gitmodules" -exec rm -Rf {} +
|
||||
}
|
||||
|
||||
# can grab from the internet, or copy locally.
|
||||
# if copying locally, it can only copy a file.
|
||||
xbmkget()
|
||||
{
|
||||
_ua="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
|
||||
|
||||
_dlop="curl" && [ $# -gt 4 ] && _dlop="$5"
|
||||
cached="$XBMK_CACHE/file/$4"
|
||||
dl_fail="n" # 1 url, 2 url backup, 3 destination, 4 checksum
|
||||
bad_checksum "$4" "$cached" 2>/dev/null && dl_fail="y"
|
||||
[ "$dl_fail" = "n" ] && e "$3" f && return 0
|
||||
x_ mkdir -p "${3%/*}" "$XBMK_CACHE/file"
|
||||
for url in "$1" "$2"; do
|
||||
[ "$dl_fail" = "n" ] && break
|
||||
[ -z "$url" ] && continue
|
||||
x_ rm -f "$cached"
|
||||
if [ "$_dlop" = "curl" ]; then
|
||||
curl --location --retry 3 -A "$_ua" "$url" \
|
||||
-o "$cached" || wget --tries 3 -U "$_ua" "$url" \
|
||||
-O "$cached" || continue
|
||||
elif [ "$_dlop" = "copy" ]; then
|
||||
[ -L "$url" ] && \
|
||||
printf "dl %s %s %s %s: '%s' is a symlink\n" \
|
||||
"$1" "$2" "$3" "$4" "$url" 1>&2 && continue
|
||||
[ ! -f "$url" ] && \
|
||||
printf "dl %s %s %s %s: '%s' not a file\n" \
|
||||
"$1" "$2" "$3" "$4" "$url" 1>&2 && continue
|
||||
cp "$url" "$cached" || continue
|
||||
else
|
||||
err "$1 $2 $3 $4: Unsupported dlop type: '$_dlop'"
|
||||
fi
|
||||
bad_checksum "$4" "$cached" || dl_fail="n"
|
||||
done
|
||||
[ "$dl_fail" = "y" ] && err "$1 $2 $3 $4: not downloaded"
|
||||
[ "$cached" = "$3" ] || x_ cp "$cached" "$3"; :
|
||||
}
|
||||
|
||||
bad_checksum()
|
||||
{
|
||||
[ "$(sha512sum "$2" | awk '{print $1}')" != "$1" ] || return 1
|
||||
printf "Bad checksum for file: %s\n" "$2" 1>&2; rm -f "$2" || :; :
|
||||
}
|
||||
|
||||
e()
|
||||
{
|
||||
es_t="e" && [ $# -gt 1 ] && es_t="$2"
|
||||
@@ -97,14 +40,6 @@ e()
|
||||
printf "%s %s\n" "$1" "$es2" 1>&2
|
||||
}
|
||||
|
||||
mk()
|
||||
{
|
||||
mk_flag="$1" || err "No argument given"
|
||||
shift 1 && for mk_arg in "$@"; do
|
||||
x_ ./mk $mk_flag $mk_arg
|
||||
done; :
|
||||
}
|
||||
|
||||
setvars()
|
||||
{
|
||||
_setvars=""
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
# Logic based on util/chromeos/crosfirmware.sh in coreboot cfc26ce278.
|
||||
# Modifications in this version are Copyright 2021, 2023 and 2024 Leah Rowe.
|
||||
# Modifications in this version are Copyright 2021,2023-2025 Leah Rowe.
|
||||
# Original copyright detailed in repo: https://review.coreboot.org/coreboot/
|
||||
|
||||
eval "`setvars "" MRC_url MRC_url_bkup MRC_hash MRC_board SHELLBALL`"
|
||||
@@ -9,7 +9,6 @@ eval "`setvars "" MRC_url MRC_url_bkup MRC_hash MRC_board SHELLBALL`"
|
||||
extract_mrc()
|
||||
{
|
||||
extract_shellball
|
||||
|
||||
x_ "$cbfstool" "$appdir/"bios.bin extract -n mrc.bin \
|
||||
-f "$_dest" -r RO_SECTION
|
||||
|
||||
|
||||
@@ -1,65 +1,81 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
|
||||
|
||||
eval "`setvars "" vdir src_dirname relsrcdir relmode`"
|
||||
eval "`setvars "" reldir reldest vdir relsrcdir relmode`"
|
||||
|
||||
release()
|
||||
{
|
||||
export XBMK_RELEASE="y"
|
||||
|
||||
vdir="release"
|
||||
reldir="release"
|
||||
|
||||
while getopts d:m: option; do
|
||||
[ -z "$OPTARG" ] && err "empty argument not allowed"
|
||||
case "$option" in
|
||||
d) vdir="$OPTARG" ;;
|
||||
d) reldir="$OPTARG" ;;
|
||||
m) relmode="$OPTARG" ;;
|
||||
*) err "invalid option '-$option'" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
vdir="$vdir/$version"
|
||||
src_dirname="${relname}_src"
|
||||
relsrcdir="$vdir/$src_dirname"
|
||||
reldest="$reldir/$version"
|
||||
[ -e "$reldest" ] && \
|
||||
err "already exists: \"$reldest\""
|
||||
|
||||
[ -e "$vdir" ] && err "already exists: \"$vdir\""
|
||||
x_ mkdir -p "$vdir"
|
||||
vdir="$XBMK_CACHE/relpwd/${xbmktmp##*/}/$version"
|
||||
relsrcdir="$vdir/${relname}_src"
|
||||
|
||||
remkdir "$vdir"
|
||||
x_ git clone . "$relsrcdir"
|
||||
x_ touch "$relsrcdir/lock"
|
||||
|
||||
build_release
|
||||
prep_release src
|
||||
prep_release tarball
|
||||
prep_release bin
|
||||
x_ rm -Rf "$relsrcdir"
|
||||
|
||||
printf "\n\nDONE! Check release files under %s\n" "$vdir"
|
||||
x_ mkdir -p "$reldir"
|
||||
x_ mv "$vdir" "$reldir"
|
||||
x_ rm -Rf "${vdir%"/$version"}"
|
||||
|
||||
printf "\n\nDONE! Check release files under %s\n" "$reldest"
|
||||
}
|
||||
|
||||
build_release()
|
||||
prep_release()
|
||||
{
|
||||
x_ touch "$relsrcdir/lock"
|
||||
(
|
||||
x_ cd "$relsrcdir"
|
||||
[ "$1" = "tarball" ] || x_ cd "$relsrcdir"
|
||||
prep_release_$1
|
||||
) || err "can't prep release $1"
|
||||
}
|
||||
|
||||
prep_release_src()
|
||||
{
|
||||
x_ ./mk -f
|
||||
rmgit .
|
||||
fx_ "x_ rm -Rf" x_ find . -name ".git"
|
||||
fx_ "x_ rm -Rf" x_ find . -name ".gitmodules"
|
||||
x_ mv src/docs docs
|
||||
) || err "can't create release files"
|
||||
}
|
||||
|
||||
prep_release_tarball()
|
||||
{
|
||||
git log --graph --pretty=format:'%Cred%h%Creset %s %Creset' \
|
||||
--abbrev-commit > "$relsrcdir/CHANGELOG" || err "!log $relsrcdir"
|
||||
x_ rm -f "$relsrcdir/lock"
|
||||
|
||||
x_ rm -Rf "$relsrcdir/cache" "$relsrcdir/tmp"
|
||||
(
|
||||
x_ cd "${relsrcdir%/*}"
|
||||
x_ mktarball "${relsrcdir##*/}" "${relsrcdir##*/}.tar.xz"
|
||||
) || err "can't create src tarball"
|
||||
[ "$relmode" = "src" ] && return 0
|
||||
) || err "can't create src tarball"; :
|
||||
}
|
||||
|
||||
x_ touch "$relsrcdir/lock"
|
||||
(
|
||||
x_ cd "$relsrcdir"
|
||||
prep_release_bin()
|
||||
{
|
||||
[ "$relmode" = "src" ] && return 0
|
||||
x_ ./mk -d coreboot
|
||||
mk -b coreboot pico-serprog stm32-vserprog pcsx-redux
|
||||
fx_ "x_ ./mk -b" printf \
|
||||
"coreboot\npico-serprog\nstm32-vserprog\npcsx-redux\n"
|
||||
|
||||
fx_ mkrom_tarball x_ find bin -maxdepth 1 -type d -name "serprog_*"
|
||||
x_ mv bin ../roms
|
||||
) || err "can't build rom images"
|
||||
|
||||
x_ rm -Rf "$relsrcdir"
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ mkpayload_grub()
|
||||
mkvendorfiles()
|
||||
{
|
||||
[ -z "$mode" ] && $dry cook_coreboot_config
|
||||
check_coreboot_utils "$tree"
|
||||
fx_ check_coreboot_util printf "cbfstool\nifdtool\n"
|
||||
printf "%s\n" "${version%%-*}" > "$srcdir/.coreboot-version" || \
|
||||
err "!mk $srcdir .coreboot-version"
|
||||
[ -z "$mode" ] && [ "$target" != "$tree" ] && \
|
||||
@@ -59,26 +59,24 @@ cook_coreboot_config()
|
||||
make -C "$srcdir" oldconfig || err "Could not cook $srcdir/.config"; :
|
||||
}
|
||||
|
||||
check_coreboot_utils()
|
||||
check_coreboot_util()
|
||||
{
|
||||
for util in cbfstool ifdtool; do
|
||||
[ "$badhash" = "y" ] && x_ rm -f "elf/$util/$1/$util"
|
||||
e "elf/$util/$1/$util" f && continue
|
||||
[ "$badhash" = "y" ] && x_ rm -f "elf/$1/$tree/$1"
|
||||
e "elf/$1/$tree/$1" f && return 0
|
||||
|
||||
utilelfdir="elf/$util/$1"
|
||||
utilsrcdir="src/coreboot/$1/util/$util"
|
||||
utilelfdir="elf/$1/$tree"
|
||||
utilsrcdir="src/coreboot/$tree/util/$1"
|
||||
|
||||
utilmode="" && [ -n "$mode" ] && utilmode="clean"
|
||||
x_ make -C "$utilsrcdir" $utilmode -j$XBMK_THREADS $makeargs
|
||||
if [ -z "$mode" ] && [ ! -f "$utilelfdir/$util" ]; then
|
||||
x_ mkdir -p "$utilelfdir"
|
||||
x_ cp "$utilsrcdir/$util" "$utilelfdir"
|
||||
[ "$util" = "cbfstool" ] || continue
|
||||
x_ cp "$utilsrcdir/rmodtool" "$utilelfdir"
|
||||
elif [ -n "$mode" ]; then
|
||||
x_ rm -Rf "$utilelfdir"
|
||||
fi; :
|
||||
done; :
|
||||
utilmode="" && [ -n "$mode" ] && utilmode="clean"
|
||||
x_ make -C "$utilsrcdir" $utilmode -j$XBMK_THREADS $makeargs
|
||||
[ -n "$mode" ] && x_ rm -Rf "$utilelfdir" && return 0
|
||||
[ -z "$mode" ] || return 0
|
||||
[ -f "$utilelfdir/$1" ] && return 0
|
||||
|
||||
x_ mkdir -p "$utilelfdir"
|
||||
x_ cp "$utilsrcdir/$1" "$utilelfdir"
|
||||
[ "$1" = "cbfstool" ] || return 0
|
||||
x_ cp "$utilsrcdir/rmodtool" "$utilelfdir"
|
||||
}
|
||||
|
||||
mkcorebootbin()
|
||||
|
||||
@@ -39,13 +39,11 @@ trees()
|
||||
fi
|
||||
|
||||
project="${OPTARG#src/}"
|
||||
project="${project#config/git/}"
|
||||
shift 2
|
||||
done
|
||||
[ -z "$_f" ] && err "missing flag ($flags)"
|
||||
if [ -z "$project" ]; then
|
||||
mk $_f $(ls -1 config/git)
|
||||
return 1
|
||||
fi
|
||||
[ -z "$project" ] && fx_ "x_ ./mk $_f" x_ ls -1 config/git && return 1
|
||||
|
||||
[ -f "config/git/$project/pkg.cfg" ] || \
|
||||
err "config/git/$project/pkg.cfg missing"
|
||||
|
||||
@@ -30,18 +30,17 @@ cvxbmk="CONFIG_ME_BIN_PATH CONFIG_SMSC_SCH5545_EC_FW_FILE CONFIG_KBC1126_FW1 \
|
||||
CONFIG_KBC1126_FW2 CONFIG_KBC1126_FW1_OFFSET CONFIG_KBC1126_FW2_OFFSET \
|
||||
CONFIG_VGA_BIOS_ID CONFIG_BOARD_DELL_E6400 CONFIG_FSP_S_CBFS \
|
||||
CONFIG_HAVE_REFCODE_BLOB CONFIG_REFCODE_BLOB_FILE CONFIG_FSP_FD_PATH \
|
||||
CONFIG_IFD_BIN_PATH CONFIG_MRC_FILE CONFIG_FSP_M_CBFS"
|
||||
CONFIG_IFD_BIN_PATH CONFIG_MRC_FILE CONFIG_FSP_M_CBFS \
|
||||
CONFIG_FSP_USE_REPO CONFIG_FSP_FULL_FD"
|
||||
|
||||
# lbmk-specific extensions; mostly used for downloading vendor files
|
||||
eval "`setvars "" has_hashes EC_hash DL_hash DL_url_bkup MRC_refcode_gbe vcfg \
|
||||
E6400_VGA_DL_hash E6400_VGA_DL_url E6400_VGA_DL_url_bkup E6400_VGA_offset \
|
||||
E6400_VGA_romname SCH5545EC_DL_url_bkup SCH5545EC_DL_hash _dest \
|
||||
mecleaner kbc1126_ec_dump MRC_refcode_cbtree _dl SCH5545EC_DL_url \
|
||||
EC_url rom DL_url nukemode cbfstoolref FSPFD_hash \
|
||||
_7ztest ME11bootguard ME11delta ME11version ME11sku ME11pch \
|
||||
_me _metmp mfs TBFW_url_bkup TBFW_url TBFW_hash \
|
||||
TBFW_size hashfile xromsize xchanged EC_url_bkup vfile \
|
||||
CONFIG_FSP_USE_REPO CONFIG_FSP_FULL_FD cbdir`"
|
||||
E6400_VGA_romname SCH5545EC_DL_url_bkup SCH5545EC_DL_hash _dest mecleaner \
|
||||
kbc1126_ec_dump MRC_refcode_cbtree _dl SCH5545EC_DL_url EC_url rom DL_url \
|
||||
nukemode cbfstoolref FSPFD_hash _7ztest ME11bootguard ME11delta xromsize \
|
||||
ME11version ME11sku ME11pch _me _metmp mfs TBFW_url_bkup TBFW_url cbdir \
|
||||
TBFW_hash TBFW_size hashfile EC_url_bkup`"
|
||||
|
||||
download()
|
||||
{
|
||||
@@ -91,7 +90,7 @@ fetch()
|
||||
done; :
|
||||
|
||||
dlop="curl" && [ $# -gt 5 ] && dlop="$6"
|
||||
xbmkget "$dl" "$dl_bkup" "$_dl" "$dlsum" "$dlop"
|
||||
xbmkget "$dlop" "$dl" "$dl_bkup" "$_dl" "$dlsum"
|
||||
|
||||
x_ rm -Rf "${_dl}_extracted"
|
||||
e "$_dest" f && return 0
|
||||
@@ -216,30 +215,18 @@ extract_fsp()
|
||||
|
||||
setvfile()
|
||||
{
|
||||
[ -n "$vcfg" ] && check_vcfg && for c in $cvchk; do
|
||||
eval "[ \"\${$c}\" = \"/dev/null\" ] && continue"
|
||||
eval "[ -z \"\${$c}\" ] && continue"
|
||||
|
||||
# valid vcfg. proceed to download files
|
||||
eval "`setcfg "$vfile"`"
|
||||
|
||||
bootstrap
|
||||
|
||||
[ $# -gt 0 ] && getfiles
|
||||
[ $# -gt 0 ] && return 1 # download
|
||||
|
||||
fx_ prep x_ find "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
|
||||
( check_vendor_hashes ) || err "$archive: Can't verify hashes"
|
||||
|
||||
return 1
|
||||
done && return 0; return 1
|
||||
[ -n "$vcfg" ] && for c in $cvchk; do
|
||||
vcmd="[ \"\${$c}\" != \"/dev/null\" ] && [ -n \"\${$c}\" ]"
|
||||
eval "$vcmd && getvfile \"\$@\" && return 0"
|
||||
done && return 1; :
|
||||
}
|
||||
|
||||
check_vcfg()
|
||||
getvfile()
|
||||
{
|
||||
vfile="config/vendor/$vcfg/pkg.cfg"
|
||||
[ -L "$vfile" ] && err "'$archive', '$board': $vfile is a symlink"; :
|
||||
[ -f "$vfile" ] || err "'$archive', '$board': $vfile missing"; :
|
||||
eval "`setcfg "config/vendor/$vcfg/pkg.cfg" 1`"
|
||||
bootstrap && [ $# -gt 0 ] && getfiles && return 0 # download
|
||||
fx_ prep x_ find "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
|
||||
( check_vendor_hashes ) || err "$archive: Can't verify hashes"; :
|
||||
}
|
||||
|
||||
bootstrap()
|
||||
@@ -251,7 +238,7 @@ bootstrap()
|
||||
rmodtool="elf/cbfstool/$tree/rmodtool"
|
||||
|
||||
x_ ./mk -f coreboot "${cbdir##*/}"
|
||||
mk -b uefitool biosutilities bios_extract
|
||||
fx_ "x_ ./mk -b" printf "uefitool\nbiosutilities\nbios_extract\n"
|
||||
[ -d "${kbc1126_ec_dump%/*}" ] && x_ make -C "$cbdir/util/kbc1126"
|
||||
[ -n "$MRC_refcode_cbtree" ] && \
|
||||
cbfstoolref="elf/cbfstool/$MRC_refcode_cbtree/cbfstool" && \
|
||||
@@ -290,6 +277,14 @@ prep()
|
||||
x_ rm -f "$_xrom"
|
||||
}
|
||||
|
||||
mksha512sum()
|
||||
{
|
||||
(
|
||||
[ "${1%/*}" != "$1" ] && x_ cd "${1%/*}"
|
||||
sha512sum ./"${1##*/}" >> "$2" || err "!sha512sum \"$1\" > \"$2\""
|
||||
) || err "failed to create tarball checksum"
|
||||
}
|
||||
|
||||
add_vfiles()
|
||||
{
|
||||
rom="$1"
|
||||
|
||||
Reference in New Issue
Block a user