From 102ce12cea023783729d6a2cd1576afc95bf7540 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 2 Jan 2024 11:37:25 +0000 Subject: [PATCH] rebase cbmk 9429287 per lbmk c4d90087..f5b04fa5 cbmk 9429287 is the present canoeboot revision, on this day, two commits after canoeboot 20231107 the cbmk revision was based on lbmk c4d90087, but lbmk has developed a lot since, right up to f5b04fa5. lbmk c4d90087 was four commits after libreboot 20231106 this patch brings cbmk up to date, versus lbmk f5b04fa5, which is 135 commits after libreboot 20231106 (not 4) therefore, the next canoeboot release shall import lbmk changes made *after* lbmk revision f5b04fa5. good day! In English (the above is for my reference, next time I make a new canoeboot release): This imports all of the numerous improvements from Libreboot, sans the non-FSDG-compliant changes. You can find a full list of such changes in the audit4 page: https://libreboot.org/news/audit4.html A full canoeboot-ised changelog will be available in the next canoeboot release, with these and subsequent changes. Most notable here is the update to the new GRUB 2.12 release (instead of 2.12-rc1), and the improvements Riku made to pico-serprog. And the build system improvements from lbmk, such as improved, more generic cmake and autoconf handling. Canoeboot-specific changes: I also tweaked the deblob logic, to make it less error-prone. The new design changes imported into cbmk (based on latest lbmk) somewhat broke the deblob logic; it was constantly reminding the user that blobs.list was missing for coreboot, at config/coreboot/blobs.list - coreboot is a multi-tree project in both cbmk and lbmk, and the deblob logic was tuned for single/multi, but was treating coreboot as both. for simplicity, i removed the check for whether blobs.list is present. this means that the operator must ensure that these files are present, in any given revision, where they are required on a given set of projects (and the files are all present, in this update to cbmk) Also of note: the grub.cfg improvements are included in this cbmk update. The improved grub.cfg can find grub/syslinux configs by default, not just grub anymore, also finds extlinux, and will also find them on EFI System Partition - in addition, UEFI-based install media is also more robust; although cbmk doesn't provide UEFI configurations on x86, our GRUB palyoad does still need to work with distro install media, and many of them now use UEFI-based GRUB configurations in their installation media, which just happen to work with our GRUB Signed-off-by: Leah Rowe --- build | 61 ++-- config/coreboot/d510mo/target.cfg | 5 +- config/coreboot/d510mo_16mb/target.cfg | 5 +- config/coreboot/d945gclf_512kb/target.cfg | 5 +- config/coreboot/d945gclf_8mb/target.cfg | 5 +- config/coreboot/default/target.cfg | 3 +- config/coreboot/dell/target.cfg | 3 +- config/coreboot/e6400_4mb/target.cfg | 4 +- config/coreboot/fam15h_rdimm/target.cfg | 5 +- config/coreboot/fam15h_udimm/target.cfg | 5 +- config/coreboot/g43t-am3/target.cfg | 5 +- config/coreboot/g43t-am3_16mb/target.cfg | 5 +- config/coreboot/ga-g41m-es2l/target.cfg | 5 +- config/coreboot/gru_bob/target.cfg | 5 +- config/coreboot/gru_kevin/target.cfg | 5 +- .../config/libgfxinit_txtmode | 7 +- config/coreboot/kcma-d8-rdimm_16mb/target.cfg | 6 +- .../config/libgfxinit_txtmode | 7 +- config/coreboot/kcma-d8-rdimm_2mb/target.cfg | 6 +- .../config/libgfxinit_txtmode | 7 +- config/coreboot/kcma-d8-udimm_16mb/target.cfg | 6 +- .../config/libgfxinit_txtmode | 7 +- config/coreboot/kcma-d8-udimm_2mb/target.cfg | 6 +- config/coreboot/kfsn4-dre_1mb/target.cfg | 6 +- config/coreboot/kfsn4-dre_2mb/target.cfg | 6 +- .../config/libgfxinit_txtmode | 8 +- .../coreboot/kgpe-d16-rdimm_16mb/target.cfg | 6 +- .../config/libgfxinit_txtmode | 8 +- config/coreboot/kgpe-d16-rdimm_2mb/target.cfg | 6 +- .../config/libgfxinit_txtmode | 8 +- .../coreboot/kgpe-d16-udimm_16mb/target.cfg | 6 +- .../config/libgfxinit_txtmode | 8 +- config/coreboot/kgpe-d16-udimm_2mb/target.cfg | 6 +- config/coreboot/macbook11/target.cfg | 5 +- config/coreboot/macbook11_16mb/target.cfg | 5 +- config/coreboot/macbook21/target.cfg | 5 +- config/coreboot/macbook21_16mb/target.cfg | 5 +- config/coreboot/qemu_arm64_12mb/target.cfg | 5 +- config/coreboot/qemu_x86_12mb/target.cfg | 5 +- config/coreboot/r400_16mb/target.cfg | 5 +- config/coreboot/r400_4mb/target.cfg | 5 +- config/coreboot/r400_8mb/target.cfg | 5 +- config/coreboot/r500_4mb/target.cfg | 5 +- config/coreboot/t400_16mb/target.cfg | 5 +- config/coreboot/t400_4mb/target.cfg | 5 +- config/coreboot/t400_8mb/target.cfg | 5 +- config/coreboot/t500_16mb/target.cfg | 5 +- config/coreboot/t500_4mb/target.cfg | 5 +- config/coreboot/t500_8mb/target.cfg | 5 +- .../config/libgfxinit_corebootfb | 2 +- .../config/libgfxinit_txtmode | 2 +- config/coreboot/t60_16mb_intelgpu/target.cfg | 5 +- .../t60_intelgpu/config/libgfxinit_corebootfb | 2 +- .../t60_intelgpu/config/libgfxinit_txtmode | 2 +- config/coreboot/t60_intelgpu/target.cfg | 5 +- config/coreboot/w500_16mb/target.cfg | 5 +- config/coreboot/w500_4mb/target.cfg | 5 +- config/coreboot/w500_8mb/target.cfg | 5 +- config/coreboot/x200_16mb/target.cfg | 5 +- config/coreboot/x200_4mb/target.cfg | 5 +- config/coreboot/x200_8mb/target.cfg | 5 +- config/coreboot/x301_16mb/target.cfg | 5 +- config/coreboot/x301_4mb/target.cfg | 5 +- config/coreboot/x301_8mb/target.cfg | 5 +- .../coreboot/x60/config/libgfxinit_corebootfb | 2 +- config/coreboot/x60/config/libgfxinit_txtmode | 2 +- config/coreboot/x60/target.cfg | 5 +- .../x60_16mb/config/libgfxinit_corebootfb | 2 +- .../x60_16mb/config/libgfxinit_txtmode | 2 +- config/coreboot/x60_16mb/target.cfg | 5 +- config/dependencies/debian | 4 +- config/dependencies/void | 11 +- ...-implicit-typecast-fixes-build-error.patch | 38 +++ config/git/flashrom | 2 +- config/git/grub | 2 +- config/git/pico-serprog | 2 +- config/grub/config/AUTHORS | 2 +- config/grub/config/grub.cfg | 75 ++--- config/grub/modules.list | 3 + ...-the-name-libreboot-in-the-grub-menu.patch | 4 +- config/grub/target.cfg | 3 + config/ifd/e6430/gbe | Bin 8192 -> 0 bytes config/ifd/e6430/ifd | Bin 4096 -> 0 bytes config/ifd/hp8200sff/gbe | Bin 8192 -> 0 bytes config/ifd/hp8200sff/ifd | Bin 4096 -> 0 bytes config/ifd/hp8200sff/ifd_4mb | Bin 4096 -> 0 bytes config/ifd/hp8300usdt/gbe | Bin 8192 -> 0 bytes config/ifd/hp8300usdt/ifd | Bin 4096 -> 0 bytes config/ifd/hp_ivybridge/gbe | Bin 8192 -> 0 bytes config/ifd/hp_ivybridge/ifd | Bin 4096 -> 0 bytes config/ifd/hp_sandybridge/gbe | Bin 8192 -> 0 bytes config/ifd/hp_sandybridge/ifd | Bin 4096 -> 0 bytes config/ifd/t1650/12_ifd | Bin 4096 -> 0 bytes config/ifd/t1650/gbe | Bin 8192 -> 0 bytes config/ifd/t440p/gbe | Bin 8192 -> 0 bytes config/ifd/t440p/ifd | Bin 4096 -> 0 bytes config/ifd/xx20/gbe | Bin 8192 -> 0 bytes config/ifd/xx20/ifd | Bin 4096 -> 0 bytes config/ifd/xx30/16_ifd | Bin 4096 -> 0 bytes config/ifd/xx30/gbe | Bin 8192 -> 0 bytes config/ifd/xx30/ifd | Bin 4096 -> 0 bytes config/seabios/default/target.cfg | 1 - config/u-boot/default/blobs.list | 1 + config/u-boot/default/target.cfg | 2 +- config/u-boot/gru_bob/target.cfg | 2 +- config/u-boot/gru_kevin/target.cfg | 2 +- config/u-boot/qemu_arm64_12mb/target.cfg | 2 +- config/u-boot/qemu_x86_12mb/target.cfg | 2 +- include/err.sh | 30 +- include/git.sh | 117 +++----- include/option.sh | 48 +-- script/build/grub | 82 ----- script/build/roms | 281 ++++++++---------- script/build/serprog | 42 ++- script/update/release | 82 ++--- script/update/trees | 268 ++++++++--------- util/dell-flash-unlock/README.md | 23 +- 117 files changed, 657 insertions(+), 881 deletions(-) create mode 100644 config/flashrom/patches/0001-fix-implicit-typecast-fixes-build-error.patch create mode 100644 config/grub/target.cfg delete mode 100644 config/ifd/e6430/gbe delete mode 100644 config/ifd/e6430/ifd delete mode 100644 config/ifd/hp8200sff/gbe delete mode 100644 config/ifd/hp8200sff/ifd delete mode 100644 config/ifd/hp8200sff/ifd_4mb delete mode 100644 config/ifd/hp8300usdt/gbe delete mode 100644 config/ifd/hp8300usdt/ifd delete mode 100644 config/ifd/hp_ivybridge/gbe delete mode 100644 config/ifd/hp_ivybridge/ifd delete mode 100644 config/ifd/hp_sandybridge/gbe delete mode 100644 config/ifd/hp_sandybridge/ifd delete mode 100644 config/ifd/t1650/12_ifd delete mode 100644 config/ifd/t1650/gbe delete mode 100644 config/ifd/t440p/gbe delete mode 100644 config/ifd/t440p/ifd delete mode 100644 config/ifd/xx20/gbe delete mode 100644 config/ifd/xx20/ifd delete mode 100644 config/ifd/xx30/16_ifd delete mode 100644 config/ifd/xx30/gbe delete mode 100644 config/ifd/xx30/ifd delete mode 100755 script/build/grub diff --git a/build b/build index 647b8d6..8341cd5 100755 --- a/build +++ b/build @@ -5,7 +5,6 @@ # SPDX-FileCopyrightText: 2015, 2016 Klemens Nanni # SPDX-FileCopyrightText: 2022, Caleb La Grange -[ "x${DEBUG+set}" = 'xset' ] && set -v set -u -e export LC_COLLATE=C @@ -19,12 +18,7 @@ eval "$(setvars "" option aur_notice tmpdir)" tmpdir_was_set="y" set | grep TMPDIR 1>/dev/null 2>/dev/null || tmpdir_was_set="n" if [ "${tmpdir_was_set}" = "y" ]; then - tmpdir="${TMPDIR##*/}" - tmpdir="${TMPDIR%_*}" - if [ "${tmpdir}" = "cbmk" ]; then - tmpdir="" - tmpdir_was_set="n" - fi + [ "${TMPDIR%_*}" = "/tmp/cbmk" ] || tmpdir_was_set="n" fi if [ "${tmpdir_was_set}" = "n" ]; then export TMPDIR="/tmp" @@ -32,8 +26,8 @@ if [ "${tmpdir_was_set}" = "n" ]; then export TMPDIR="${tmpdir}" else export TMPDIR="${TMPDIR}" + tmpdir="${TMPDIR}" fi -tmpdir="${TMPDIR}" linkpath="${0}" linkname="${linkpath##*/}" @@ -43,27 +37,30 @@ main() { xx_ id -u 1>/dev/null 2>/dev/null [ $# -lt 1 ] && fail "Too few arguments. Try: ${0} help" - [ "${1}" = "dependencies" ] && xx_ install_packages $@ && cbmk_exit 0 - initialise_command $@ && shift 1 + [ "$1" = "dependencies" ] && xx_ install_packages $@ && cbmk_exit 0 - check_git - check_project "fail" - git_init - - execute_command $@ + for cmd in initcmd check_git check_project git_init excmd; do + eval "${cmd} \$@" + done cbmk_exit 0 } -initialise_command() +initcmd() { [ "$(id -u)" != "0" ] || fail "this command as root is not permitted" + check_project + case "${1}" in - help) usage ${0} && cbmk_exit 0 ;; - list) items "${buildpath}" && cbmk_exit 0 ;; + help) usage ${0} ;; + list) items "${buildpath}" ;; + version) mkversion ;; + *) + option="${1}" + return 0 ;; esac - option="${1}" + cbmk_exit 0 } install_packages() @@ -81,7 +78,7 @@ install_packages() xx_ ${pkg_add} ${pkglist} [ -z "${aur_notice}" ] && return 0 - printf "You must install AUR packages: %s\n" "${aur_notice}" 1>&2 + printf "You must install AUR packages: %s\n" "$aur_notice" 1>&2 } # release archives contain .gitignore, but not .git. @@ -94,41 +91,53 @@ git_init() git init || fail "${PWD}: cannot initialise Git repository" git add -A . || fail "${PWD}: cannot add files to Git repository" - git commit -m "${projectname} ${version}" --date "${cdate}" || \ - fail "${PWD}: can't commit ${projectname}/${version}, date ${cdate}" + git commit -m "${projectname} ${version}" --date "${cdate}" \ + --author="cbmk " || \ + fail "$PWD: can't commit ${projectname}/${version}, date $cdate" git tag -a "${version}" -m "${projectname} ${version}" || \ fail "${PWD}: cannot git-tag ${projectname}/${version}" } -execute_command() +excmd() { cbmkcmd="${buildpath}/${option}" [ -f "${cbmkcmd}" ] || fail "Invalid command. Run: ${linkpath} help" - "${cbmkcmd}" $@ || fail "execute_command: ${cbmkcmd} ${@}" + shift 1; "$cbmkcmd" $@ || fail "excmd: ${cbmkcmd} ${@}" } usage() { progname=${0} cat <<- EOF + $(mkversion) + USAGE: ${progname}