mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-09-19 21:20:31 +02:00
Compare commits
7 Commits
6a2e9a7919
...
2d1d7624e9
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d1d7624e9 | |||
| a32374f6cc | |||
| 897c2667af | |||
| 446eca846e | |||
| c3e2d8c8bc | |||
| b094c60a39 | |||
| 798cc79399 |
+27
-75
@@ -44,12 +44,10 @@ fetch_project()
|
||||
|
||||
clone_project()
|
||||
{
|
||||
if ! singletree "$project"; then
|
||||
singletree "$project" || \
|
||||
return 0
|
||||
fi
|
||||
|
||||
loc="src/$project"
|
||||
|
||||
[ -d "$loc" ] && \
|
||||
return 0
|
||||
|
||||
@@ -81,13 +79,7 @@ git_prep()
|
||||
fetch_submodule()
|
||||
{
|
||||
mcfgdir="$mdir/${1##*/}"
|
||||
|
||||
st=""
|
||||
subcurl=""
|
||||
subcurl_bkup=""
|
||||
subgit=""
|
||||
subgit_bkup=""
|
||||
subhash=""
|
||||
eval "`newvar st subcurl subcurl_bkup subgit subgit_bkup subhash`"
|
||||
|
||||
if e "$mcfgdir/module.cfg" f missing; then
|
||||
return 0
|
||||
@@ -95,39 +87,22 @@ fetch_submodule()
|
||||
. "$mcfgdir/module.cfg" || \
|
||||
err "Can't read '$mcfgdir/module.cfg'" "fetch_submodules" "$@"
|
||||
|
||||
if [ -n "$subgit" ] || [ -n "$subgit_bkup" ]; then
|
||||
st="$st git"
|
||||
fi
|
||||
if [ -n "$subcurl" ] || [ -n "$subcurl_bkup" ]; then
|
||||
st="$st curl"
|
||||
fi
|
||||
|
||||
st="${st# }"
|
||||
[ "$st" = "git curl" ] && \
|
||||
[ -n "$subgit" ] && [ -n "$subgit_bkup" ] && \
|
||||
st="git"
|
||||
[ -n "$subcurl" ] && [ -n "$subcurl_bkup" ] && \
|
||||
st="curl$st"
|
||||
[ "$st" = "curlgit" ] && \
|
||||
err "$mdir: git+curl defined" "fetch_submodule" "$@"
|
||||
|
||||
[ -z "$st" ] && \
|
||||
return 0
|
||||
|
||||
if [ "$st" = "curl" ]; then
|
||||
if [ -z "$subcurl" ] || [ -z "$subcurl_bkup" ]; then
|
||||
err "subcurl/subcurl_bkup not both set" \
|
||||
"fetch_submodule" "$@"
|
||||
fi
|
||||
elif [ -z "$subgit" ] || [ -z "$subgit_bkup" ]; then
|
||||
err "subgit/subgit_bkup not both set" "fetch_submodule" "$@"
|
||||
elif [ -z "$subhash" ]; then
|
||||
[ -z "$subhash" ] && \
|
||||
err "subhash not set" "fetch_submodule" "$@"
|
||||
fi
|
||||
|
||||
if [ "$st" = "git" ]; then
|
||||
[ "$st" = "git" ] && \
|
||||
x_ rm -Rf "$tmpgit/$1"
|
||||
xbget "$st" "$subgit" "$subgit_bkup" "$tmpgit/$1" \
|
||||
"$subhash" "$mdir/${1##*/}/patches"
|
||||
else
|
||||
xbget "$st" "$subcurl" "$subcurl_bkup" "$tmpgit/$1" \
|
||||
"$subhash" "$mdir/${1##*/}/patches"
|
||||
fi
|
||||
|
||||
eval "xbget \"\$st\" \"\$sub$st\" \"\$sub${st}_bkup\" \"\$tmpgit/\$1\" \
|
||||
\"\$subhash\" \"\$mdir/\${1##*/}/patches\""
|
||||
}
|
||||
|
||||
# TODO: in the following functions, argument numbers are used
|
||||
@@ -139,43 +114,18 @@ xbget()
|
||||
[ "$1" != "curl" ] && [ "$1" != "copy" ] && [ "$1" != "git" ] && \
|
||||
err "Bad dlop (arg 1)" "xbget" "$@"
|
||||
|
||||
for url in "$2" "$3"
|
||||
do
|
||||
if [ -z "$url" ]; then
|
||||
for url in "$2" "$3"; do
|
||||
[ -z "$url" ] && \
|
||||
err "empty URL given in" "xbget" "$@"
|
||||
elif ! try_fetch "$url" "$@"; then
|
||||
try_fetch_$1 "$url" "$@" || \
|
||||
continue
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
git)
|
||||
[ ! -d "$4" ] && \
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
[ ! -f "$4" ] && \
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
return 0 # successful download/copy
|
||||
[ -e "$4" ] && \
|
||||
return 0; : # successful download/copy
|
||||
done
|
||||
|
||||
err "failed to download file/repository" "xbget" "$@"; :
|
||||
}
|
||||
|
||||
try_fetch()
|
||||
{
|
||||
if [ "$2" = "git" ]; then
|
||||
if ! try_fetch_git "$@"; then
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
if ! try_fetch_file "$@"; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
try_fetch_git()
|
||||
{
|
||||
# 1st argument $1 is the current git remote being tried,
|
||||
@@ -190,11 +140,10 @@ try_fetch_git()
|
||||
|
||||
x_ xbmkdir "${5%/*}" "${cached%/*}"
|
||||
|
||||
if ! try_$2 "$cached" "$@"; then
|
||||
try_$2 "$cached" "$@" || \
|
||||
return 1
|
||||
elif [ ! -d "$cached" ]; then
|
||||
[ ! -d "$cached" ] && \
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$5" ]; then
|
||||
tmpclone "$cached" "$5" "$6" "$7" || \
|
||||
@@ -205,7 +154,12 @@ try_fetch_git()
|
||||
return 1; :
|
||||
}
|
||||
|
||||
try_fetch_file()
|
||||
try_fetch_copy()
|
||||
{
|
||||
try_fetch_curl "$@" || return 1; :
|
||||
}
|
||||
|
||||
try_fetch_curl()
|
||||
{
|
||||
cached="file/$6"
|
||||
cached="$XBMK_CACHE/$cached"
|
||||
@@ -216,10 +170,9 @@ try_fetch_file()
|
||||
x_ rm -f "$cached"
|
||||
fi
|
||||
|
||||
[ ! -f "$cached" ] && \
|
||||
if ! try_$2 "$cached" "$@"; then
|
||||
[ -f "$cached" ] || \
|
||||
try_$2 "$cached" "$@" || \
|
||||
return 1
|
||||
fi
|
||||
|
||||
[ -f "$5" ] && \
|
||||
if bad_checksum "$6" "$5" 2>/dev/null; then
|
||||
@@ -230,7 +183,6 @@ try_fetch_file()
|
||||
return 1
|
||||
elif bad_checksum "$6" "$cached"; then
|
||||
x_ rm -f "$cached"
|
||||
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
+17
-47
@@ -5,24 +5,6 @@
|
||||
# Copyright (c) 2020-2026 Leah Rowe <leah@libreboot.org>
|
||||
# Copyright (c) 2025 Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
||||
|
||||
utf_8="C.UTF-8"
|
||||
|
||||
export LANG="$utf_8"
|
||||
export LANGUAGE="$utf_8"
|
||||
export LC_CTYPE="$utf_8"
|
||||
export LC_NUMERIC="$utf_8"
|
||||
export LC_TIME="$utf_8"
|
||||
export LC_COLLATE="$utf_8"
|
||||
export LC_MONETARY="$utf_8"
|
||||
export LC_MESSAGES="$utf_8"
|
||||
export LC_PAPER="$utf_8"
|
||||
export LC_NAME="$utf_8"
|
||||
export LC_ADDRESS="$utf_8"
|
||||
export LC_TELEPHONE="$utf_8"
|
||||
export LC_MEASUREMENT="$utf_8"
|
||||
export LC_IDENTIFICATION="$utf_8"
|
||||
export LC_ALL="$utf_8"
|
||||
|
||||
projectname="libreboot"
|
||||
projectsite="https://libreboot.org/"
|
||||
|
||||
@@ -57,9 +39,8 @@ xbmk_init()
|
||||
x_ xbmkdir "cache"
|
||||
|
||||
for init_cmd in get_version set_env set_threads git_init child_exec; do
|
||||
if ! xbmk_$init_cmd "$@"; then
|
||||
break
|
||||
fi
|
||||
xbmk_$init_cmd "$@" || \
|
||||
break; :
|
||||
done
|
||||
}
|
||||
|
||||
@@ -165,9 +146,7 @@ xbmk_child_set_env()
|
||||
|
||||
xbmk_child_set_tmp()
|
||||
{
|
||||
badtmp=""
|
||||
locktmp=""
|
||||
xbtmpchk=""
|
||||
eval "`newvar badtmp locktmp xbtmpchk`"
|
||||
|
||||
xbtmpchk="`findpath "$TMPDIR" || err "!findpath $TMPDIR"`" || \
|
||||
err "!findpath '$TMPDIR'" "xbmk_child_set_tmp" "$@"
|
||||
@@ -299,14 +278,13 @@ xbmk_set_pyver()
|
||||
pyver="2"
|
||||
pyv="import sys; print(sys.version_info[:])"
|
||||
|
||||
if ! pybin python3 1>/dev/null; then
|
||||
pybin python3 1>/dev/null || \
|
||||
python="python"
|
||||
fi
|
||||
[ "$python" = "python3" ] && \
|
||||
pyver="3"
|
||||
if ! pybin "$python" 1>/dev/null; then
|
||||
pybin "$python" 1>/dev/null || \
|
||||
pyver=""
|
||||
fi
|
||||
|
||||
[ -z "$pyver" ] || \
|
||||
"`x_ pybin "$python"`" -c "$pyv" 1>/dev/null \
|
||||
2>/dev/null || \
|
||||
@@ -339,44 +317,37 @@ pybin()
|
||||
py="import sys; quit(1) if sys.prefix == sys.base_prefix else quit(0)"
|
||||
|
||||
venv=1
|
||||
if ! command -v "$1" 1>/dev/null 2>/dev/null; then
|
||||
command -v "$1" 1>/dev/null 2>/dev/null || \
|
||||
venv=0
|
||||
fi
|
||||
[ $venv -gt 0 ] && \
|
||||
if ! "$1" -c "$py" 1>/dev/null 2>/dev/null; then
|
||||
|
||||
[ $venv -lt 1 ] || \
|
||||
"$1" -c "$py" 1>/dev/null 2>/dev/null || \
|
||||
venv=0
|
||||
fi
|
||||
|
||||
# ideally, don't rely on PATH or hardcoded paths if python venv.
|
||||
# use the *real*, direct executable linked to by the venv symlink:
|
||||
|
||||
# try the direct path from PATH first. the binary specified by venv
|
||||
# can be called directly, which then removes use of the venv
|
||||
if [ $venv -gt 0 ] && [ -L "`command -v "$1" 2>/dev/null`" ]; then
|
||||
pypath="$(findpath \
|
||||
"$(command -v "$1" 2>/dev/null)" 2>/dev/null || :)"
|
||||
|
||||
if [ -e "$pypath" ] && [ ! -d "$pypath" ] && \
|
||||
[ -x "$pypath" ]; then
|
||||
|
||||
printf "%s\n" "$pypath"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# if python venv: fall back to common PATH directories for checking:
|
||||
|
||||
[ $venv -gt 0 ] && for pypath in "/usr/local/bin" "/usr/bin"; do
|
||||
if [ -e "$pypath/$1" ] && [ ! -d "$pypath/$1" ] && \
|
||||
[ -x "$pypath/$1" ]; then
|
||||
|
||||
printf "%s/%s\n" "$pypath" "$1"
|
||||
return 0
|
||||
fi
|
||||
done && return 1
|
||||
|
||||
# Defer to normal command -v if not a venv
|
||||
if ! command -v "$1" 2>/dev/null; then
|
||||
return 1
|
||||
fi
|
||||
command -v "$1" 2>/dev/null || \
|
||||
return 1; :
|
||||
}
|
||||
|
||||
xbmk_set_mirror()
|
||||
@@ -400,11 +371,9 @@ xbmk_git_init()
|
||||
# the git identity check is only needed for: ./mk -b coreboot [args]
|
||||
[ "${2-}" = "-b" ] && [ "${3-}" = "coreboot" ] && \
|
||||
for gitarg in "user.name" "user.email"; do
|
||||
gitcmd="git config --includes $gitarg"
|
||||
if ! $gitcmd 1>/dev/null 2>/dev/null; then
|
||||
git config --includes $gitarg 1>/dev/null 2>/dev/null || \
|
||||
err "Run this first: $gitcmd \"your ${gitcmd##*.}\"" \
|
||||
"xbmk_git_init" "$@"
|
||||
fi
|
||||
"xbmk_git_init" "$@"; :
|
||||
done
|
||||
|
||||
[ -L ".git" ] && \
|
||||
@@ -424,6 +393,7 @@ xbmk_git_init()
|
||||
x_ git -c user.name="xbmk" -c user.email="xbmk@example.com" \
|
||||
tag -a "$version" -m "$projectname $version" \
|
||||
1>/dev/null 2>/dev/null; :
|
||||
|
||||
) || err "Can't initialise workdir" xbmk_git_init "$@"; :
|
||||
}
|
||||
|
||||
|
||||
+11
-14
@@ -48,9 +48,8 @@ inject()
|
||||
|
||||
check_release
|
||||
if check_target; then
|
||||
if ! patch_release; then
|
||||
return 0
|
||||
fi
|
||||
patch_release || \
|
||||
return 0; :
|
||||
fi
|
||||
[ "$xchanged" = "y" ] && \
|
||||
remktar
|
||||
@@ -135,17 +134,16 @@ patch_release()
|
||||
fi
|
||||
done
|
||||
|
||||
if ! readkconfig; then
|
||||
readkconfig || \
|
||||
return 1
|
||||
elif [ -n "$new_mac" ] && [ -n "$CONFIG_GBE_BIN_PATH" ]; then
|
||||
modify_mac
|
||||
fi
|
||||
|
||||
[ -n "$new_mac" ] && [ -n "$CONFIG_GBE_BIN_PATH" ] && \
|
||||
modify_mac; :
|
||||
}
|
||||
|
||||
readkconfig()
|
||||
{
|
||||
x_ rm -f "$xbtmp/cbcfg"
|
||||
|
||||
fx_ scankconfig x_ find "$boarddir/config" -type f
|
||||
|
||||
if e "$xbtmp/cbcfg" f missing; then
|
||||
@@ -155,9 +153,8 @@ readkconfig()
|
||||
. "$xbtmp/cbcfg" || \
|
||||
err "Can't read '$xbtmp/cbcfg'" "readkconfig" "$@"
|
||||
|
||||
if ! setvfile "$@"; then
|
||||
return 1
|
||||
fi
|
||||
setvfile "$@" || \
|
||||
return 1; :
|
||||
}
|
||||
|
||||
scankconfig()
|
||||
@@ -195,10 +192,10 @@ newmac()
|
||||
remktar()
|
||||
{
|
||||
(
|
||||
x_ cd "${tmpromdir%"/bin/$board"}"
|
||||
x_ cd "${tmpromdir%"/bin/$board"}"
|
||||
|
||||
printf "Re-building tar archive (please wait)\n"
|
||||
mkrom_tarball "bin/$board" 1>/dev/null
|
||||
printf "Re-building tar archive (please wait)\n"
|
||||
mkrom_tarball "bin/$board" 1>/dev/null
|
||||
|
||||
) || err "Cannot re-generate '$archive'" "remktar" "$@"
|
||||
|
||||
|
||||
+1
-6
@@ -4,11 +4,7 @@
|
||||
# Modifications in this version are Copyright 2021,2023-2025 Leah Rowe.
|
||||
# Original copyright detailed in repo: https://review.coreboot.org/coreboot/
|
||||
|
||||
MRC_board=""
|
||||
MRC_hash=""
|
||||
MRC_url=""
|
||||
MRC_url_bkup=""
|
||||
SHELLBALL=""
|
||||
eval "`newvar MRC_board MRC_hash MRC_url MRC_url_bkup SHELLBALL`"
|
||||
|
||||
extract_refcode()
|
||||
{
|
||||
@@ -62,7 +58,6 @@ extract_partition()
|
||||
parted "${1%.zip}" 2>/dev/null | grep "ROOT-A" )
|
||||
|
||||
START=$(( $( echo $ROOTP | cut -f2 -d\ | tr -d "B" ) ))
|
||||
|
||||
SIZE=$(( $( echo $ROOTP | cut -f4 -d\ | tr -d "B" ) ))
|
||||
|
||||
x_ dd if="${1%.zip}" of="root-a.ext2" bs=1024 \
|
||||
|
||||
+8
-8
@@ -60,13 +60,13 @@ release()
|
||||
prep_release()
|
||||
{
|
||||
(
|
||||
if [ "$1" != "tarball" ]; then
|
||||
x_ cd "$rsrc"
|
||||
[ ! -e "cache" ] && \
|
||||
x_ ln -s "$XBMK_CACHE" "cache"; :
|
||||
fi
|
||||
if [ "$1" != "tarball" ]; then
|
||||
x_ cd "$rsrc"
|
||||
[ ! -e "cache" ] && \
|
||||
x_ ln -s "$XBMK_CACHE" "cache"; :
|
||||
fi
|
||||
|
||||
prep_release_$1
|
||||
prep_release_$1
|
||||
|
||||
) || err "can't prep release $1" "prep_release" "$@"
|
||||
}
|
||||
@@ -105,8 +105,8 @@ prep_release_tarball()
|
||||
x_ mv "$rsrc/util/sbase2" "$rsrc/util/sbase"
|
||||
|
||||
(
|
||||
x_ cd "${rsrc%/*}"
|
||||
x_ mktarball "${rsrc##*/}" "${rsrc##*/}.tar.xz"
|
||||
x_ cd "${rsrc%/*}"
|
||||
x_ mktarball "${rsrc##*/}" "${rsrc##*/}.tar.xz"
|
||||
|
||||
) || err "can't create src tarball" "prep_release_tarball" "$@"; :
|
||||
}
|
||||
|
||||
+31
-41
@@ -111,20 +111,18 @@ trees()
|
||||
|
||||
build_project()
|
||||
{
|
||||
if ! configure_project "$configdir"; then
|
||||
configure_project "$configdir" || \
|
||||
return 0
|
||||
elif [ -f "$listfile" ]; then
|
||||
if ! $if_not_dry_build elfcheck; then
|
||||
|
||||
[ ! -f "$listfile" ] || \
|
||||
$if_not_dry_build elfcheck || \
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
[ "$mode" = "distclean" ] && \
|
||||
mode="clean"
|
||||
|
||||
if ! run_make_command; then
|
||||
run_make_command || \
|
||||
return 0
|
||||
fi
|
||||
|
||||
[ -z "$mode" ] && \
|
||||
$if_not_dry_build \
|
||||
@@ -168,9 +166,9 @@ handle_defconfig()
|
||||
|
||||
[ ! -f "CHANGELOG" ] && \
|
||||
fetch_project "$project"
|
||||
if ! configure_project "$target_dir"; then
|
||||
|
||||
configure_project "$target_dir" || \
|
||||
return 0
|
||||
fi
|
||||
|
||||
[ -z "$tree" ] && \
|
||||
err "$configdir: 'tree' not set" "handle_defconfig" "$@"
|
||||
@@ -304,10 +302,9 @@ build_dependencies()
|
||||
delete_old_project_files()
|
||||
{
|
||||
# delete an entire source tree along with its builds:
|
||||
if ! project_up_to_date hash "$tree" badhash "$datadir" \
|
||||
"$configdir/$tree" "$mdir"; then
|
||||
project_up_to_date hash "$tree" badhash "$datadir" \
|
||||
"$configdir/$tree" "$mdir" || \
|
||||
x_ rm -Rf "src/$project/$tree" "elf/$project/$tree"
|
||||
fi
|
||||
|
||||
x_ cp "$xbtmp/new.hash" "$XBMK_CACHE/hash/$project$tree"
|
||||
|
||||
@@ -320,10 +317,8 @@ delete_old_project_files()
|
||||
# this is useful when only the target config changes, for
|
||||
# example x200_8mb coreboot configs change, but not coreboot:
|
||||
|
||||
if ! project_up_to_date tghash "$target" badtghash "$configdir/$target"
|
||||
then
|
||||
project_up_to_date tghash "$target" badtghash "$configdir/$target" || \
|
||||
x_ rm -Rf "elf/$project/$tree/$target"
|
||||
fi
|
||||
|
||||
x_ cp "$xbtmp/new.hash" "$XBMK_CACHE/tghash/$project$target"
|
||||
}
|
||||
@@ -414,9 +409,8 @@ check_cross_compiler()
|
||||
|
||||
check_gnu_path()
|
||||
{
|
||||
if ! command -v "$1" 1>/dev/null; then
|
||||
command -v "$1" 1>/dev/null || \
|
||||
err "Host '$1' unavailable" "check_gnu_path" "$@"
|
||||
fi
|
||||
|
||||
eval "`newvar gccdir gccfull gccver gnatdir gnatfull gnatver`"
|
||||
|
||||
@@ -431,9 +425,8 @@ check_gnu_path()
|
||||
|
||||
host_gcc_gnat_match()
|
||||
{
|
||||
if ! gnu_setver "$1" "$1"; then
|
||||
gnu_setver "$1" "$1" || \
|
||||
err "Command '$1' unavailable." "check_gnu_path" "$@"
|
||||
fi
|
||||
gnu_setver "$2" "$2" || :
|
||||
|
||||
eval "[ -z \"\$$1ver\" ] && err \"Cannot detect host '$1' version\""
|
||||
@@ -458,11 +451,10 @@ match_gcc_gnat_versions()
|
||||
fi
|
||||
done
|
||||
|
||||
if ! gnu_setver "$2" "$_gnudir/$2-$_gnuver"; then
|
||||
gnu_setver "$2" "$_gnudir/$2-$_gnuver" || \
|
||||
return 1
|
||||
elif [ "$gnatfull" != "$gccfull" ]; then
|
||||
[ "$gnatfull" != "$gccfull" ] && \
|
||||
return 1
|
||||
fi
|
||||
|
||||
( link_gcc_gnat_versions "$@" "$_gnudir" "$_gnuver" ) || \
|
||||
err "Can't link '$2-$_gnuver' '$_gnudir'" "check_gnu_path" "$@"; :
|
||||
@@ -555,14 +547,13 @@ run_make_command()
|
||||
[ -z "$mode" ] && \
|
||||
x_ $premake
|
||||
|
||||
if $if_not_dry_build check_cmake "$srcdir"; then
|
||||
$if_not_dry_build check_cmake "$srcdir" && \
|
||||
[ -z "$mode" ] && \
|
||||
$if_not_dry_build \
|
||||
check_autoconf "$srcdir"; :
|
||||
fi
|
||||
if ! $if_not_dry_build check_makefile "$srcdir"; then
|
||||
check_autoconf "$srcdir"
|
||||
|
||||
$if_not_dry_build check_makefile "$srcdir" || \
|
||||
return 1
|
||||
fi
|
||||
|
||||
$if_not_dry_build \
|
||||
x_ make -C "$srcdir" $mode -j$XBMK_THREADS $makeargs
|
||||
@@ -570,30 +561,29 @@ run_make_command()
|
||||
[ -z "$mode" ] && \
|
||||
x_ $mkhelper
|
||||
|
||||
if ! check_makefile "$srcdir"; then
|
||||
check_makefile "$srcdir" || \
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ "$mode" = "clean" ]; then
|
||||
$if_dry_build \
|
||||
return 0
|
||||
if ! make -C "$srcdir" $cleanargs distclean; then
|
||||
x_ make -C "$srcdir" $cleanargs clean
|
||||
fi
|
||||
fi
|
||||
[ "$mode" = "clean" ] || \
|
||||
return 0
|
||||
$if_dry_build \
|
||||
return 0
|
||||
|
||||
make -C "$srcdir" $cleanargs distclean || \
|
||||
x_ make -C "$srcdir" $cleanargs clean; :
|
||||
}
|
||||
|
||||
check_cmake()
|
||||
{
|
||||
$if_dry_build \
|
||||
return 0
|
||||
if [ ! -n "$cmakedir" ]; then
|
||||
[ ! -n "$cmakedir" ] && \
|
||||
return 0
|
||||
elif ! check_makefile "$1"; then
|
||||
if ! cmake -B "$1" "$1/$cmakedir"; then
|
||||
|
||||
check_makefile "$1" || \
|
||||
cmake -B "$1" "$1/$cmakedir" || \
|
||||
x_ check_makefile "$1"
|
||||
fi
|
||||
fi
|
||||
|
||||
x_ check_makefile "$1"; :
|
||||
}
|
||||
|
||||
|
||||
+3
-10
@@ -168,10 +168,9 @@ fetch()
|
||||
# the given hashsum. So, search for a matching file via bruteforce:
|
||||
( fx_ "mkdst $binsum" x_ find "${_pre_dest%/*}" -type f ) || :
|
||||
|
||||
if ! bad_checksum "$binsum" "$_dest"; then
|
||||
[ -f "$_dest" ] && \
|
||||
bad_checksum "$binsum" "$_dest" || \
|
||||
[ ! -f "$_dest" ] || \
|
||||
return 0; :
|
||||
fi
|
||||
|
||||
[ -z "$binsum" ] && \
|
||||
printf "'%s': checksum undefined\n" "$_dest" 1>&2
|
||||
@@ -266,11 +265,6 @@ find_me()
|
||||
mfs="" # no MFS whitelist needed, due to -r:
|
||||
fi
|
||||
if [ "$MEclean" = "n" ] || [ "$MEshrink" != "y" ]; then
|
||||
# MEclean can still be y, this just means don't shrink,
|
||||
# so deleted modules would become padded space. this
|
||||
# could also be used alongside --whitelist, if
|
||||
# MEclean is otherwise enabled.
|
||||
|
||||
_r="" # don't re-locate ME modules
|
||||
_trunc="" # don't shrink the me.bin file size
|
||||
fi
|
||||
@@ -523,9 +517,8 @@ prep()
|
||||
( mksha512 "$_xrom" "vendorhashes" ) || err; :
|
||||
fi
|
||||
|
||||
if ! add_vfiles "$_xrom"; then
|
||||
add_vfiles "$_xrom" || \
|
||||
return 1 # no need to insert files
|
||||
fi
|
||||
|
||||
if [ "$nuke" = "nuke" ]; then
|
||||
pad_one_byte "$_xrom"
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
|
||||
set -u -e
|
||||
|
||||
eval "`printf "%s\n" "LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE \
|
||||
LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE \
|
||||
LC_MEASUREMENT LC_IDENTIFICATION LC_ALL" | \
|
||||
awk '{ for (i=1; i<=NF; i++) $i = "export " $i "=C.UTF-8;"; print }'`"
|
||||
|
||||
(
|
||||
xbarg0="$0"
|
||||
[ "${xbarg0##*/}" = "$xbarg0" ] && \
|
||||
|
||||
Reference in New Issue
Block a user