From e12304ece67ee834858e4a2f34d06f66ac110256 Mon Sep 17 00:00:00 2001 From: Tommaso Fonda Date: Thu, 25 Jan 2018 20:01:40 +0100 Subject: [PATCH] ak2-core.sh: fix repacking of Sony ELF kernels elftool fails to repack the ELF boot image on Sony devices when a custom dtb file is not provided within the AnyKernel2 zip, because the "dtb" variable, that contains the name of the dtb file, is overridden before the dtb filename is actually passed to the "rpm" variable. Swapping these two lines of code fixes the issue (tested by me on a Sony Xperia SP). --- tools/ak2-core.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ak2-core.sh b/tools/ak2-core.sh index 3995099..53b5fc0 100755 --- a/tools/ak2-core.sh +++ b/tools/ak2-core.sh @@ -214,8 +214,8 @@ flash_boot() { done; if [ ! "$dtb" -a -f *-dtb ]; then dtb=`ls *-dtb`; - dtb="--dt $split_img/$dtb"; rpm="$split_img/$dtb,rpm"; + dtb="--dt $split_img/$dtb"; fi; cd /tmp/anykernel; if [ -f "$bin/mkmtkhdr" ]; then