more cleanup

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-09-11 21:43:50 +01:00
parent 0fd3d72998
commit d0a1b40910
6 changed files with 17 additions and 42 deletions
+1 -2
View File
@@ -31,9 +31,8 @@ mr_edk2tree="chromebook" # tree name in xbmk
# mxlibreboot was here
prep_mr_import()
{
if [ -f "$xbmkpwd/CHANGELOG" ]; then
[ -f "$xbmkpwd/CHANGELOG" ] && \
err "Project import disabled on releases" "prep_mr_import" "$@"
fi
mr_tmpdir="`mktemp -d || err "can't make mrtmpdir"`" || \
err "can't make mrtmpdir" "prep_mr_coreboot" "$@"
+3 -15
View File
@@ -142,23 +142,12 @@ xbmk_set_env()
[ -n "${TMPDIR+x}" ] && \
is_child="y"
if [ "$is_child" = "y" ]
then
# child instance of xbmk, so we stop init after this point
# and execute the given user command upon return:
if [ "$is_child" = "y" ]; then
xbmk_child_set_env
return 1
return 1 # child instance. discontinue initialisation.
else
# parent instance of xbmk, so we continue initialising.
# a parent instance of xbmk never processes its own
# command directly; instead, it calls a child instance
# of xbmk, and exits with the corresponding return status.
xbmk_parent_set_env
return 0
return 0 # parent instance. continue initialisation.
fi
}
@@ -188,7 +177,6 @@ xbmk_child_set_tmp()
if [ "$locktmp" != "$xbtmpchk" ]; then
badtmp="TMPDIR '$xbtmpchk' changed; was '$locktmp'"
printf "bad TMPDIR init, '%s': %s\n" "$TMPDIR" "$badtmp" 1>&2
err "'$xbmklock' present with bad tmpdir. is a build running?"
fi
+1 -2
View File
@@ -104,9 +104,8 @@ check_target()
. "$boarddir/target.cfg" || \
err "Can't read '$boarddir/target.cfg'" "check_target" "$@"
if [ -z "$tree" ]; then
[ -z "$tree" ] && \
err "tree unset in '$boarddir/target.cfg'" "check_target" "$@"
fi
x_ ./mk -d coreboot "$tree"
+8 -14
View File
@@ -368,8 +368,7 @@ add_uboot()
ubtree="x86_64"
ubtarget="amd64coreboot"
if [ "$payload_uboot" = "i386" ]
then
if [ "$payload_uboot" = "i386" ]; then
ubpath="u-boot" # 32-bit
ubtree="x86"
ubtarget="i386coreboot"; :
@@ -378,18 +377,13 @@ add_uboot()
ubdir="elf/u-boot/$ubtree/$ubtarget/$uboot_config"
# aarch64 targets:
ubootelf="$ubdir/u-boot.elf"
if [ ! -f "$ubootelf" ]; then
ubootelf="$ubdir/u-boot"
fi
# override for x86/x86_64 targets:
if [ "$payload_uboot" = "i386" ]; then
ubootelf="$ubdir/u-boot-dtb.bin"
elif [ "$payload_uboot" = "amd64" ]; then
ubootelf="$ubdir/u-boot-x86-with-spl.bin" # EFI-compatible
fi
ubootelf="$ubdir/u-boot.elf" # aarch64
[ ! -f "$ubootelf" ] && \
ubootelf="$ubdir/u-boot" # aarch64 (fallback)
[ "$payload_uboot" = "i386" ] && \
ubootelf="$ubdir/u-boot-dtb.bin" # x86 override
[ "$payload_uboot" = "amd64" ] && \
ubootelf="$ubdir/u-boot-x86-with-spl.bin" # x86_64 override
cbfs "$tmprom" "$ubootelf" "$ubpath" $ubcbfsargs
[ "$payload_seabios" != "y" ] && \
+2 -5
View File
@@ -55,11 +55,8 @@ trees()
if_dry_build=""
if_not_do_make=""
if_not_dry_build=":"
if [ "$flag" = "-F" ]; then
# don't skip git fetch/pull on cached src
forcepull="y"
fi
[ "$flag" = "-F" ] && \
forcepull="y"; : # never skip git fetch/pull
;;
-s) mode="savedefconfig" ;;
-l) mode="olddefconfig" ;;
+2 -4
View File
@@ -123,8 +123,7 @@ fetch()
remkdir "${_pre_dest%/*}" "$appdir"
# HACK: if grabbing fsp from coreboot, fix the path for lbmk
if [ "$dl_type" = "fsp" ]
then
if [ "$dl_type" = "fsp" ]; then
dl="${dl##*../}"
_cdp="$dl"
@@ -474,9 +473,8 @@ bootstrap()
rmodtool="elf/coreboot/$tree/rmodtool"
mecleaner="$xbmkpwd/$cbdir/util/me_cleaner/me_cleaner.py"
if [ "$XBMKmecleaner" = "y" ]; then
[ "$XBMKmecleaner" = "y" ] && \
mecleaner="$xbmkpwd/src/me_cleaner/me_cleaner.py"
fi
x_ ./mk -f coreboot "${cbdir##*/}"
x_ ./mk -f me_cleaner