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>
25.04_branch
Leah Rowe 2025-04-26 19:16:40 +01:00
parent a16d9f35a2
commit 7943fab580
2 changed files with 12 additions and 12 deletions

View File

@ -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
}

View File

@ -275,6 +275,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