Compare commits

..

5 Commits

Author SHA1 Message Date
Leah Rowe
c46a71138c Libreboot 25.06 release
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-06-30 14:08:48 +01:00
Leah Rowe
b1ef562b76 tree.sh: add sha512 error for check_project_hashes
handle errors on sha512sum - also handle awk errors inside
the mini subshell, and provide overall error handling.

we know that the project.hash file should always exist, and
always be read no matter what; technically, the find command
that proceeds it might not yield any results, but an empty
file would then be produced.

the edge case of an empty file would have lead to an error
beforehand, when configuring the project in function,
configure_project(), so we've already got that covered.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-06-05 23:41:09 +01:00
Leah Rowe
04bee3834d tree.sh: add error check in check_project_hashes()
when reading old_pjhash, we need to error out where a read
error occurs. such an error is unlikely, but could occur under
certain edge cases.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-06-05 23:41:03 +01:00
Leah Rowe
677dfc4d10 tree.sh: more reliable clean in run_make_command
Don't do no-op if it fails; fall back to "clean" instead,
and fail if that fails.

The no-op was there was not all projects have distclean,
but we do intend for them all to be cleaned.

We mitigate further error by only running make-clean if
a makefile exists.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-06-05 23:40:33 +01:00
Leah Rowe
267d4c9034 inject.sh: add missing semicolons
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-06-05 23:39:57 +01:00
14 changed files with 88 additions and 55 deletions

View File

@@ -16,7 +16,7 @@ index 04d058f55..b1cc8f236 100644
grub_term_cls (term);
- msg_formatted = grub_xasprintf (_("GNU GRUB version %s"), PACKAGE_VERSION);
+ msg_formatted = grub_xasprintf (_("Libreboot 25.04 rev1 (GRUB menu): https://libreboot.org/"));
+ msg_formatted = grub_xasprintf (_("Libreboot 25.06 Luminous Lemon (GRUB menu): https://libreboot.org/"));
if (!msg_formatted)
return;

View File

@@ -16,7 +16,7 @@ index 04d058f55..b1cc8f236 100644
grub_term_cls (term);
- msg_formatted = grub_xasprintf (_("GNU GRUB version %s"), PACKAGE_VERSION);
+ msg_formatted = grub_xasprintf (_("Libreboot 25.04 rev1 (GRUB menu): https://libreboot.org/"));
+ msg_formatted = grub_xasprintf (_("Libreboot 25.06 Luminous Lemon (GRUB menu): https://libreboot.org/"));
if (!msg_formatted)
return;

View File

@@ -16,7 +16,7 @@ index 04d058f55..b1cc8f236 100644
grub_term_cls (term);
- msg_formatted = grub_xasprintf (_("GNU GRUB version %s"), PACKAGE_VERSION);
+ msg_formatted = grub_xasprintf (_("Libreboot 25.04 rev1 (GRUB menu): https://libreboot.org/"));
+ msg_formatted = grub_xasprintf (_("Libreboot 25.06 Luminous Lemon (GRUB menu): https://libreboot.org/"));
if (!msg_formatted)
return;

View File

@@ -17,7 +17,7 @@ index 538b316d..9eed0b12 100644
// Write to screen.
- printf("SeaBIOS (version %s)\n", VERSION);
+ printf("Libreboot 25.04 rev1 (SeaBIOS menu): https://libreboot.org/\n");
+ printf("Libreboot 25.06 Luminous Lemon (SeaBIOS menu): https://libreboot.org/\n");
display_uuid();
}

View File

@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
subhash="47c993cba483ff23a4c7b866c6cedcc905e9a2bd"
subhash="2fc8efd375aef58d6c5d6b8e4ffe87b3bd2ff3d4"
subgit="https://codeberg.org/libreboot/lbwww"
subgit_bkup="https://git.disroot.org/libreboot/lbwww"

View File

@@ -18,7 +18,7 @@ index 84831915a2..8e26ec2aef 100644
ret |= scene_obj_set_pos(scn, OBJ_MENU, MARGIN_LEFT, 100);
ret |= scene_txt_str(scn, "title", OBJ_MENU_TITLE, STR_MENU_TITLE,
- "U-Boot - Boot Menu", NULL);
+ "Libreboot 25.04 rev1 (U-Boot menu): https://libreboot.org/", NULL);
+ "Libreboot 25.06 Luminous Lemon (U-Boot menu): https://libreboot.org/", NULL);
ret |= scene_menu_set_title(scn, OBJ_MENU, OBJ_PROMPT);
logo = video_get_u_boot_logo();

View File

@@ -18,7 +18,7 @@ index 84831915a2..8e26ec2aef 100644
ret |= scene_obj_set_pos(scn, OBJ_MENU, MARGIN_LEFT, 100);
ret |= scene_txt_str(scn, "title", OBJ_MENU_TITLE, STR_MENU_TITLE,
- "U-Boot - Boot Menu", NULL);
+ "Libreboot 25.04 rev1 (U-Boot menu): https://libreboot.org/", NULL);
+ "Libreboot 25.06 Luminous Lemon (U-Boot menu): https://libreboot.org/", NULL);
ret |= scene_menu_set_title(scn, OBJ_MENU, OBJ_PROMPT);
logo = video_get_u_boot_logo();

View File

@@ -18,7 +18,7 @@ index 84831915a2..8e26ec2aef 100644
ret |= scene_obj_set_pos(scn, OBJ_MENU, MARGIN_LEFT, 100);
ret |= scene_txt_str(scn, "title", OBJ_MENU_TITLE, STR_MENU_TITLE,
- "U-Boot - Boot Menu", NULL);
+ "Libreboot 25.04 rev1 (U-Boot menu): https://libreboot.org/", NULL);
+ "Libreboot 25.06 Luminous Lemon (U-Boot menu): https://libreboot.org/", NULL);
ret |= scene_menu_set_title(scn, OBJ_MENU, OBJ_PROMPT);
logo = video_get_u_boot_logo();

View File

@@ -106,7 +106,8 @@ try_file()
eval "[ -$echk \"$cached\" ] || return 1"
if [ "$2" = "git" ]; then
[ -d "$5" ] || tmpclone "$cached" "$5" "$6" "$7" || err; :
[ -d "$5" ] || tmpclone "$cached" "$5" "$6" "$7" || \
err "Can't clone final repo in command: try_file $*"; :
else
bad_checksum "$6" "$cached" && x_ rm -f "$cached" && return 1
[ "$cached" != "$5" ] && x_ cp "$cached" "$5"

View File

@@ -38,7 +38,7 @@ inject()
esac
[ "$new_mac" = "keep" ] && new_mac=""
x_ e "$archive" f && check_release
check_release
check_target && patch_release
[ "$xchanged" = "y" ] && remktar
@@ -52,14 +52,20 @@ inject()
check_release()
{
[ -L "$archive" ] && err "'$archive' is a symlink"
e "$archive" f missing && err "'$archive' missing"
archivename="`basename "$archive"`" || err "Can't get '$archive' name"
[ -z "$archivename" ] && err "Can't determine archive name"
case "$archivename" in
*_src.tar.xz) err "'$archive' is a src archive, silly!" ;;
*_src.tar.xz)
err "'$archive' is a src archive, silly!" ;;
grub_*|seagrub_*|custom_*|seauboot_*|seabios_withgrub_*)
err "'$archive' is a ROM image (it must be a tarball)" ;;
*.tar.xz) _stripped_prefix="${archivename#*_}"
board="${_stripped_prefix%.tar.xz}" ;;
*) err "'$archive': could not detect board type" ;;
*)
err "'$archive': could not detect board type" ;;
esac; :
}

View File

@@ -19,7 +19,8 @@ release()
done
reldest="$reldir/$version"
[ -e "$reldest" ] && err "already exists: \"$reldest\""
[ -e "$reldest" ] && \
err "already exists: \"$reldest\""
vdir="$XBMK_CACHE/relpwd/${xbtmp##*/}/$version"
rsrc="$vdir/${relname}_src"

View File

@@ -48,7 +48,8 @@ corebootpremake()
[ -n "$mode" ] || [ ! -f "$srcdir/.config" ] || $dry printf \
"CONFIG_CCACHE=y\n" >> "$srcdir/.config" || err "$srcdir: !cook"; :
fx_ check_coreboot_util printf "cbfstool\nifdtool\n"
printf "%s\n" "${version%%-*}" > "$srcdir/.coreboot-version" || err
printf "%s\n" "${version%%-*}" > "$srcdir/.coreboot-version" || \
err "!mk $srcdir .coreboot-version"
[ -z "$mode" ] && [ "$target" != "$tree" ] && \
x_ ./mk download "$target"; :
}
@@ -64,9 +65,13 @@ check_coreboot_util()
utilmode="" && [ -n "$mode" ] && utilmode="clean"
x_ make -C "$utilsrcdir" $utilmode -j$XBMK_THREADS $makeargs
[ -n "$mode" ] && x_ rm -Rf "$utilelfdir" && return 0
[ ! -f "$utilelfdir/$1" ] && x_ mkdir -p "$utilelfdir" && \
x_ cp "$utilsrcdir/$1" "$utilelfdir" && [ "$1" = "cbfstool" ] && \
x_ cp "$utilsrcdir/rmodtool" "$utilelfdir"; :
[ -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()

View File

@@ -45,7 +45,8 @@ trees()
[ -z "$_f" ] && err "missing flag ($flags)"
[ -z "$project" ] && fx_ "x_ ./mk $_f" x_ ls -1 config/git && return 1
e "config/git/$project/pkg.cfg" f missing && err "$project: no pkg.cfg"
[ -f "config/git/$project/pkg.cfg" ] || \
err "config/git/$project/pkg.cfg missing"
for d in "elf" "config/data" "config" "src"; do
eval "${d#*/}dir=\"$d/$project\""
@@ -74,7 +75,9 @@ build_project()
[ ! -f "$listfile" ] || $dry elfcheck || return 0
[ "$mode" = "distclean" ] && mode="clean"
run_make_command && [ -z "$mode" ] && $dry copy_elf; :
run_make_command || return 0
[ -n "$mode" ] || $dry copy_elf; :
}
build_targets()
@@ -86,9 +89,13 @@ build_targets()
unset CROSS_COMPILE
export PATH="$xbmkpath"
[ "$x" = "list" ] && x_ ls -1 "config/$project" && \
listfile="" && break; target="$x"
listfile="" && break
target="$x"
printf "'make %s', '%s', '%s'\n" "$mode" "$project" "$target"
x_ handle_defconfig && [ -z "$mode" ] && x_ $postmake; :
x_ handle_defconfig
[ -n "$mode" ] || x_ $postmake
done; :
}
@@ -113,7 +120,8 @@ handle_defconfig()
[ "$_f" = "-d" ] || defconfig="$y"
[ -n "$mode" ] || check_defconfig || continue
handle_makefile && [ -z "$mode" ] && $dry copy_elf; :
handle_makefile
[ -n "$mode" ] || $dry copy_elf
done; :
}
@@ -122,7 +130,8 @@ configure_project()
eval "`setvars "" cleanargs build_depend autoconfargs xtree postmake \
makeargs btype mkhelper bootstrapargs premake release xlang xarch \
badhash`"
_tcfg="$1/target.cfg" && [ ! -f "$_tcfg" ] && btype="auto"
_tcfg="$1/target.cfg"
[ -f "$_tcfg" ] || btype="auto"
e "$datadir/mkhelper.cfg" f && eval "`setcfg "$datadir/mkhelper.cfg"`"
while e "$_tcfg" f || [ "$cmd" != "build_project" ]; do
@@ -135,7 +144,8 @@ configure_project()
[ "$do_make" != "n" ] && break
[ "${_tcfg%/*/target.cfg}" = "${_tcfg%"/$tree/target.cfg"}" ] \
&& break; _tcfg="${_tcfg%/*/target.cfg}/$tree/target.cfg"
&& break
_tcfg="${_tcfg%/*/target.cfg}/$tree/target.cfg"
done
[ "$XBMK_RELEASE" = "y" ] && [ "$release" = "n" ] && return 1
[ -z "$btype" ] || [ "${mode%config}" = "$mode" ] || return 1
@@ -167,17 +177,20 @@ check_project_hashes()
{
old_pjhash="" && x_ mkdir -p "$XBMK_CACHE/hash"
[ ! -f "$XBMK_CACHE/hash/$project$tree" ] || \
read -r old_pjhash < "$XBMK_CACHE/hash/$project$tree"
read -r old_pjhash < "$XBMK_CACHE/hash/$project$tree" || \
err "old_pjhash: Can't read '$XBMK_CACHE/hash/$project$tree'"
fx_ "x_ sha512sum" find "$datadir" "$configdir/$tree" "$mdir" \
-type f -not -path "*/.git*/*" | awk '{print $1}' > \
"$xbtmp/project.hash" || err "!h $project $tree"
pjhash="$(sha512sum "$xbtmp/project.hash" | awk '{print $1}')" || :
pjhash="$(x_ sha512sum "$xbtmp/project.hash" | awk '{print $1}' || \
err)" || err "pjhash: Can't read sha512 of '$xbtmp/project.hash'"
[ "$pjhash" != "$old_pjhash" ] && badhash="y"
[ -f "$XBMK_CACHE/hash/$project$tree" ] || badhash="y"
printf "%s\n" "$pjhash" > "$XBMK_CACHE/hash/$project$tree" || err
printf "%s\n" "$pjhash" > "$XBMK_CACHE/hash/$project$tree" || \
err "!mk $XBMK_CACHE/hash/$project$tree"
[ "$badhash" != "y" ] || x_ rm -Rf "src/$project/$tree" \
"elf/$project/$tree" "elf/$project/$target"; :
@@ -284,8 +297,8 @@ run_make_command()
{
[ -n "$mode" ] || x_ $premake
$dry check_cmake "$srcdir"
[ -n "$mode" ] || ( $dry check_autoconf "$srcdir" ) || err
$dry check_cmake "$srcdir" && [ -z "$mode" ] && \
$dry check_autoconf "$srcdir"
$dry check_makefile "$srcdir" || return 1
$dry x_ make -C "$srcdir" $mode -j$XBMK_THREADS $makeargs
@@ -306,10 +319,12 @@ check_cmake()
check_autoconf()
{
(
x_ cd "$1"
[ -f "bootstrap" ] && x_ ./bootstrap $bootstrapargs
[ -f "autogen.sh" ] && x_ ./autogen.sh $autogenargs
[ -f "configure" ] && x_ ./configure $autoconfargs; :
) || err "can't bootstrap project: $1"; :
}
check_makefile()

View File

@@ -21,15 +21,16 @@ appdir="$vendir/app"
vfix="DO_NOT_FLASH_YET._FIRST,_INJECT_FILES_VIA_INSTRUCTIONS_ON_LIBREBOOT.ORG_"
# lbmk-specific extension to the "cv" variable (not suitable for cbmk)
cvchk="CONFIG_SMSC_SCH5545_EC_FW_FILE CONFIG_MRC_FILE CONFIG_ME_BIN_PATH \
cvchk="CONFIG_INCLUDE_SMSC_SCH5545_EC_FW CONFIG_HAVE_MRC CONFIG_HAVE_ME_BIN \
CONFIG_LENOVO_TBFW_BIN CONFIG_VGA_BIOS_FILE CONFIG_FSP_M_FILE \
CONFIG_FSP_S_FILE CONFIG_KBC1126_FW1 CONFIG_KBC1126_FW2"
# lbmk-specific extensions to the "cv" variable (not suitable for cbmk)
cvxbmk="CONFIG_FSP_FULL_FD CONFIG_IFD_BIN_PATH CONFIG_FSP_M_CBFS \
cvxbmk="CONFIG_ME_BIN_PATH CONFIG_SMSC_SCH5545_EC_FW_FILE CONFIG_FSP_FULL_FD \
CONFIG_KBC1126_FW1_OFFSET CONFIG_KBC1126_FW2_OFFSET CONFIG_FSP_USE_REPO \
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_HAVE_REFCODE_BLOB CONFIG_REFCODE_BLOB_FILE CONFIG_FSP_FD_PATH \
CONFIG_IFD_BIN_PATH CONFIG_MRC_FILE CONFIG_FSP_M_CBFS"
# lbmk-specific extensions; mostly used for downloading vendor files
eval "`setvars "" has_hashes EC_hash DL_hash DL_url_bkup MRC_refcode_gbe vcfg \
@@ -51,28 +52,32 @@ download()
getfiles()
{
fetch intel_me "$DL_url" "$DL_url_bkup" "$DL_hash" \
"$CONFIG_ME_BIN_PATH" curl "$ME_bin_hash"
fetch sch5545ec "$SCH5545EC_DL_url" "$SCH5545EC_DL_url_bkup" \
"$SCH5545EC_DL_hash" "$CONFIG_SMSC_SCH5545_EC_FW_FILE" curl \
"$SCH5545EC_bin_hash"
fetch kbc1126ec "$EC_url" "$EC_url_bkup" "$EC_hash" \
"$CONFIG_KBC1126_FW1" curl "$EC_FW1_hash"
fetch kbc1126ec "$EC_url" "$EC_url_bkup" "$EC_hash" \
"$CONFIG_KBC1126_FW2" curl "$EC_FW2_hash"
fetch e6400vga "$E6400_VGA_DL_url" "$E6400_VGA_DL_url_bkup" \
"$E6400_VGA_DL_hash" "$CONFIG_VGA_BIOS_FILE" curl \
"$E6400_VGA_bin_hash"
fetch mrc "$MRC_url" "$MRC_url_bkup" "$MRC_hash" "$CONFIG_MRC_FILE" \
curl "$MRC_bin_hash"
fetch refcode "$MRC_url" "$MRC_url_bkup" "$MRC_hash" \
"$CONFIG_REFCODE_BLOB_FILE" curl "$REF_bin_hash"
fetch tbfw "$TBFW_url" "$TBFW_url_bkup" "$TBFW_hash" \
"$CONFIG_LENOVO_TBFW_BIN" curl "$TBFW_bin_hash"
fetch fsp "$CONFIG_FSP_FD_PATH" "$CONFIG_FSP_FD_PATH" "$FSPFD_hash" \
"$CONFIG_FSP_M_FILE" copy "$FSPM_bin_hash"
fetch fsp "$CONFIG_FSP_FD_PATH" "$CONFIG_FSP_FD_PATH" "$FSPFD_hash" \
"$CONFIG_FSP_S_FILE" copy "$FSPS_bin_hash"; :
[ -z "$CONFIG_HAVE_ME_BIN" ] || fetch intel_me "$DL_url" \
"$DL_url_bkup" "$DL_hash" "$CONFIG_ME_BIN_PATH" curl "$ME_bin_hash"
[ -z "$CONFIG_INCLUDE_SMSC_SCH5545_EC_FW" ] || fetch sch5545ec \
"$SCH5545EC_DL_url" "$SCH5545EC_DL_url_bkup" "$SCH5545EC_DL_hash" \
"$CONFIG_SMSC_SCH5545_EC_FW_FILE" "curl" "$SCH5545EC_bin_hash"
[ -z "$CONFIG_KBC1126_FW1" ] || fetch kbc1126ec "$EC_url" \
"$EC_url_bkup" "$EC_hash" "$CONFIG_KBC1126_FW1" curl "$EC_FW1_hash"
[ -z "$CONFIG_KBC1126_FW2" ] || fetch kbc1126ec "$EC_url" \
"$EC_url_bkup" "$EC_hash" "$CONFIG_KBC1126_FW2" curl "$EC_FW2_hash"
[ -z "$CONFIG_VGA_BIOS_FILE" ] || fetch e6400vga "$E6400_VGA_DL_url" \
"$E6400_VGA_DL_url_bkup" "$E6400_VGA_DL_hash" \
"$CONFIG_VGA_BIOS_FILE" "curl" "$E6400_VGA_bin_hash"
[ -z "$CONFIG_HAVE_MRC" ] || fetch "mrc" "$MRC_url" "$MRC_url_bkup" \
"$MRC_hash" "$CONFIG_MRC_FILE" "curl" "$MRC_bin_hash"
[ -z "$CONFIG_REFCODE_BLOB_FILE" ] || fetch "refcode" "$MRC_url" \
"$MRC_url_bkup" "$MRC_hash" "$CONFIG_REFCODE_BLOB_FILE" "curl" \
"$REF_bin_hash"
[ -z "$CONFIG_LENOVO_TBFW_BIN" ] || fetch "tbfw" "$TBFW_url" \
"$TBFW_url_bkup" "$TBFW_hash" "$CONFIG_LENOVO_TBFW_BIN" "curl" \
"$TBFW_bin_hash"
[ -z "$CONFIG_FSP_M_FILE" ] || fetch "fsp" "$CONFIG_FSP_FD_PATH" \
"$CONFIG_FSP_FD_PATH" "$FSPFD_hash" "$CONFIG_FSP_M_FILE" "copy" \
"$FSPM_bin_hash"
[ -z "$CONFIG_FSP_S_FILE" ] || fetch "fsp" "$CONFIG_FSP_FD_PATH" \
"$CONFIG_FSP_FD_PATH" "$FSPFD_hash" "$CONFIG_FSP_S_FILE" "copy" \
"$FSPS_bin_hash"; :
}
fetch()
@@ -81,7 +86,7 @@ fetch()
dl="$2"
dl_bkup="$3"
dlsum="$4"
_dest="${5##*../}" && [ -z "$_dest" ] && return 0
_dest="${5##*../}"
_pre_dest="$XBMK_CACHE/tmpdl/check" || err "!fetch, mktemp, $*"
dlop="$6"
binsum="$7"