Script: support build kernel image in lzma format [1/1]
PD#SWPL-129222
Problem:
there is no dts for ac214 to bringup Newton gpt on kernel 5.15 + uboot 2015
we need the dts for ac214 first
Solution:
support build kernel image and boot.img in lzma format
Verify:
local
Change-Id: I60b6bd9b974abe3114ba3ad557013963c122b3b3
Signed-off-by: Dezhen Wang <dezhen.wang@amlogic.com>
diff --git a/amlogic_utils.sh b/amlogic_utils.sh
index 4e53613..3152dc5 100644
--- a/amlogic_utils.sh
+++ b/amlogic_utils.sh
@@ -1963,3 +1963,23 @@
}
export -f build_android_32bit
+
+function clear_files_compressed_with_lzma_in_last_build () {
+ file_lzma="Image.lzma boot-lzma.img boot.img.lzma"
+ for remove_file in ${file_lzma}
+ do
+ file_path=`find -name $remove_file`
+ if [[ -n ${file_path} ]]; then
+ rm ${file_path}
+ fi
+ done
+}
+export -f clear_files_compressed_with_lzma_in_last_build
+
+function generate_lzma_format_image () {
+ pushd ${DIST_DIR}
+ lzma -z -k -f -9 Image Image.lzma
+ lzma -z -k -f -9 boot.img
+ popd
+}
+export -f generate_lzma_format_image