summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorosm0sis <osm0sis@outlook.com>2019-06-15 21:27:44 -0300
committerosm0sis <osm0sis@outlook.com>2019-06-15 21:27:44 -0300
commit3685456911eb58a5d705375662e8e676df038249 (patch)
tree852c2afd6a4cec14d0ca65bef3279e6ceefb76a8
parent6b8b178c12818e3f791a8d46cd50be8a9cc707d7 (diff)
AK3: fix support for forced uncompressed cpio ramdisk repacks
- resolves https://github.com/osm0sis/AnyKernel3/commit/698682123053cab9e3277c9c9df783a97b3e8958 "IMPORTANT NOTE" 1
-rwxr-xr-xtools/ak3-core.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/ak3-core.sh b/tools/ak3-core.sh
index 4b4c86b..8e05e08 100755
--- a/tools/ak3-core.sh
+++ b/tools/ak3-core.sh
@@ -209,7 +209,7 @@ repack_ramdisk() {
# flash_boot (build, sign and write image only)
flash_boot() {
- local varlist kernel ramdisk cmdline part0 part1 signfail pk8 cert avbtype;
+ local varlist kernel ramdisk cmdline part0 part1 nocompflag signfail pk8 cert avbtype;
cd $split_img;
if [ -f "$bin/mkimage" ]; then
@@ -287,7 +287,10 @@ flash_boot() {
for i in dtb recovery_dtbo; do
test "$(eval echo \$$i)" -a -f $i && cp -f $(eval echo \$$i) $i;
done;
- $bin/magiskboot repack $bootimg $home/boot-new.img;
+ case $ramdisk_compression in
+ none|cpio) nocompflag="-n";;
+ esac;
+ $bin/magiskboot repack $nocompflag $bootimg $home/boot-new.img;
fi;
if [ $? != 0 ]; then
abort "Repacking image failed. Aborting...";