mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
Revert "lbmk: use mkhtemp in libreboot's build system"
This reverts commit e54862fccc.
nope. not ready yet. will fix it later.
This commit is contained in:
+5
-27
@@ -128,7 +128,7 @@ findpath()
|
||||
|
||||
pad_one_byte()
|
||||
{
|
||||
paddedfile="`"$mkhtemp" || err ""$mkhtemp" pad_one_byte"`" || \
|
||||
paddedfile="`mktemp || err "mktemp pad_one_byte"`" || \
|
||||
err "can't make tmp file" "pad_one_byte" "$@"
|
||||
|
||||
x_ cat "$1" config/data/coreboot/0 > "$paddedfile" || \
|
||||
@@ -146,39 +146,17 @@ unpad_one_byte()
|
||||
err "too small, $xromsize: $1" "unpad_one_byte" "$@"
|
||||
fi
|
||||
|
||||
unpaddedfile="`"$mkhtemp" || err ""$mkhtemp" unpad_one_byte"`" || \
|
||||
unpaddedfile="`mktemp || err "mktemp unpad_one_byte"`" || \
|
||||
err "can't make tmp file" "unpad_one_byte" "$@"
|
||||
|
||||
x_ dd if="$1" of="$unpaddedfile" bs=$xromsize count=1
|
||||
x_ mv "$unpaddedfile" "$1"
|
||||
}
|
||||
|
||||
# certain utils in lbmk are needed
|
||||
# BEFORE sha512sum-based verification
|
||||
# can be done, and before TMPDIR
|
||||
# generation can be done. these are:
|
||||
# sha512sum and "$mkhtemp". we will use:
|
||||
# libreboot's own mkhtemp and:
|
||||
# suckless sbase's sha512sum
|
||||
#
|
||||
bootstrap_utils()
|
||||
{
|
||||
bootstrap_sbase
|
||||
bootstrap_mkhtemp
|
||||
}
|
||||
bootstrap_sbase()
|
||||
build_sbase()
|
||||
{
|
||||
if [ ! -f "$sha512sum" ]; then
|
||||
( x_ make -C "$xbmkpwd/util/sbase" 1>/dev/null 2>/dev/null ) || \
|
||||
err "can't build sbase"
|
||||
fi
|
||||
}
|
||||
bootstrap_mkhtemp()
|
||||
{
|
||||
if [ ! -f "$mkhtemp" ]; then
|
||||
( x_ make -C "$xbmkpwd/util/libreboot-utils" 1>/dev/null \
|
||||
2>/dev/null) || \
|
||||
err "could not build mkhtemp"
|
||||
x_ make -C "$xbmkpwd/util/sbase"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -205,7 +183,7 @@ fx_()
|
||||
xchk fx_ "$@"
|
||||
xcmd="$1"
|
||||
|
||||
xfile="`"$mkhtemp" || err "can't create tmpfile"`" || \
|
||||
xfile="`mktemp || err "can't create tmpfile"`" || \
|
||||
err "can't make tmpfile" "fx_" "$@"
|
||||
|
||||
x_ rm -f "$xfile"
|
||||
|
||||
Reference in New Issue
Block a user