summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-10-10 06:04:47 +0100
committerLeah Rowe <leah@libreboot.org>2023-10-10 06:21:34 +0100
commit67ffb5134c5238295591bbc3f3260d5651a0a89a (patch)
treeb65efcdae61fce6af44297f6c39d68df3e3c6f3b /script
parent634aac0b69cbad5e25174c93f29f1ccb3d878194 (diff)
build/fw/coreboot: warning about bin/ versus elf/
also rename elf/coreboot to something scary some users were flashing roms built under elf/, which lack payloads. lbmk builds no-payload roms (and payloads) under elf/ then inserts them, creating full (flashable) images under bin/ Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script')
-rwxr-xr-xscript/build/fw/coreboot8
-rwxr-xr-xscript/update/project/trees9
2 files changed, 16 insertions, 1 deletions
diff --git a/script/build/fw/coreboot b/script/build/fw/coreboot
index 8efa39c3..ba66d856 100755
--- a/script/build/fw/coreboot
+++ b/script/build/fw/coreboot
@@ -62,6 +62,12 @@ main()
[ -z "${targets}" ] && err "No ROM images were compiled"
printf "\nROM images available in these directories:\n"
printf "${targets}^^ ROM images available in these directories.\n\n"
+
+ printf "WARNING!!!!!!! PLEASE READ:\n\n"
+
+ printf "DO NOT flash ROM images contained under elf/, because they lack"
+ printf "payloads and will BRICK your machine. Please flash ROM images"
+ printf "contained under bin/ instead. YOU HAVE BEEN WARNED.\n\n"
}
check_target()
@@ -216,7 +222,7 @@ build_roms()
x_ ./update project trees -b coreboot ${board}
- _cbrom="elf/coreboot/${board}/${initmode}_${displaymode}"
+ _cbrom="elf/coreboot_nopayload_DO_NOT_FLASH/${board}/${initmode}_${displaymode}"
[ "${initmode}" = "normal" ] && \
_cbrom="${_cbrom%_${displaymode}}"
_cbrom="${_cbrom}/coreboot.rom"
diff --git a/script/update/project/trees b/script/update/project/trees
index 7df3c8bf..97b12954 100755
--- a/script/update/project/trees
+++ b/script/update/project/trees
@@ -72,6 +72,8 @@ build_projects()
build_targets()
{
elfdir="elf/${project}"
+ [ "${elfdir}" = "elf/coreboot" ] && \
+ elfdir="elf/coreboot_nopayload_DO_NOT_FLASH"
cfgsdir="config/${project}"
[ -d "${cfgsdir}" ] || err "directory, ${cfgsdir}, does not exist"
@@ -88,6 +90,13 @@ build_targets()
[ $# -gt 0 ] && targets=$@
[ -z "${mode}" ] && x_ mkdir -p "${elfdir}/"
+ if [ "${project}" != "coreboot" ]; then
+ printf "DO NOT flash coreboot images under elf/. Use ROMs"
+ printf "under bin/. The elf/ ones DO NOT contain payloads"
+ printf "will brick your machine.\n" > \
+ "${elfdir}/WARNING.txt" || :
+ fi
+
handle_targets
}