summaryrefslogtreecommitdiff
path: root/include/rom.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-04-26 19:16:40 +0100
committerLeah Rowe <leah@libreboot.org>2025-04-26 19:16:40 +0100
commit703fe444312ad9087cddd322c00d15e5a2c9700f (patch)
tree15ca74d8ab5c63d54909d8ecee3d35c510c05c5c /include/rom.sh
parentb57952e90d2ec3515a1287bfa1129dbcbcef08c0 (diff)
lib.sh: move cbfs() to rom.sh
it is only ever used there, so move it there Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/rom.sh')
-rw-r--r--include/rom.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/rom.sh b/include/rom.sh
index 710df853..b1698ee1 100644
--- a/include/rom.sh
+++ b/include/rom.sh
@@ -277,6 +277,18 @@ cprom()
cbfs "$newrom" "config/data/grub/bootorder_uboot" bootorder raw; :
}
+cbfs()
+{
+ ccmd="add-payload" && [ $# -gt 3 ] && [ $# -lt 5 ] && ccmd="add"
+ lzma="-c lzma" && [ $# -gt 3 ] && [ $# -lt 5 ] && lzma="-t $4"
+
+ [ $# -gt 4 ] && [ "$5" = "0x1110000" ] && \
+ ccmd="add-flat-binary" && \
+ lzma="-c lzma -l 0x1110000 -e 0x1110000"
+
+ x_ "$cbfstool" "$1" $ccmd -f "$2" -n "$3" $lzma
+}
+
mkcoreboottar()
{
[ "$target" = "$tree" ] && return 0