From 92f9828619c1803d9ca7a7bde12e5a4222c49e41 Mon Sep 17 00:00:00 2001 From: osm0sis Date: Tue, 8 Jun 2021 16:15:52 -0300 Subject: [PATCH] AK3: add vendor_ramdisk support to simple vendor_boot support - use vendor_ramdisk and vendor_patch directories in zip root to specify changes for vendor_boot flash --- tools/ak3-core.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/ak3-core.sh b/tools/ak3-core.sh index fceeca2..88c57bf 100755 --- a/tools/ak3-core.sh +++ b/tools/ak3-core.sh @@ -706,14 +706,16 @@ setup_ak() { ;; esac; - # automate multi-partition setup for boot_img_hdr_v3 + vendor_boot + # automate simple multi-partition setup for boot_img_hdr_v3 + vendor_boot cd $home; - if [ -e "/dev/block/bootdevice/by-name/vendor_boot$slot" -a -f dtb -a ! -f vndr_setup ]; then + if [ -e "/dev/block/bootdevice/by-name/vendor_boot$slot" -a ! -f vendor_setup ] && [ -f dtb -o -d vendor_ramdisk -o -d vendor_patch ]; then mkdir boot-files; mv -f Image* ramdisk patch boot-files; mkdir vendor_boot-files; mv -f dtb vendor_boot-files; - touch vndr_setup; + mv -f vendor_ramdisk vendor_boot-files/ramdisk; + mv -f vendor_patch vendor_boot-files/patch; + touch vendor_setup; fi; # allow multi-partition ramdisk modifying configurations (using reset_ak) @@ -722,7 +724,7 @@ setup_ak() { if [ "$(ls $blockfiles 2>/dev/null)" ]; then cp -af $blockfiles/* $home; else - mkdir -p $blockfiles; + mkdir $blockfiles; fi; touch $blockfiles/current; fi;