diff options
author | Leah Rowe <leah@libreboot.org> | 2024-06-15 20:22:19 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-06-15 23:15:25 +0100 |
commit | ed9c90e59d959bab544598d330c724e44afcc096 (patch) | |
tree | bd87dd4ee2544365cac93fc4c1f66da072338d16 /include | |
parent | 26451775d5c81949793f57010b0449b4f540ef11 (diff) |
roms: unify all add-payload commands
add a generic function that can insert payloads with lzma
compression, or raw files without compression
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rwxr-xr-x | include/lib.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/lib.sh b/include/lib.sh index 3de05c24..bf734f3a 100755 --- a/include/lib.sh +++ b/include/lib.sh @@ -245,3 +245,10 @@ vendor_checksum() printf "Bad checksum for file: %s\n" "$2" 1>&2 rm -f "$2" || : } + +cbfs() +{ + ccmd="add-payload" && [ $# -gt 3 ] && ccmd="add" + lzma="-c lzma" && [ $# -gt 3 ] && lzma="-t raw" + x_ "$cbfstool" "$1" $ccmd -f "$2" -n "$3" $lzma +} |