summaryrefslogtreecommitdiff
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
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>
-rw-r--r--include/lib.sh12
-rw-r--r--include/rom.sh12
2 files changed, 12 insertions, 12 deletions
diff --git a/include/lib.sh b/include/lib.sh
index 34d8b8b9..dea015e0 100644
--- a/include/lib.sh
+++ b/include/lib.sh
@@ -118,15 +118,3 @@ check_defconfig()
[ -f "$x" ] && printf "%s\n" "$x" && return 1
done; :
}
-
-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
-}
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