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).
This commit is contained in:
Tommaso Fonda authored and GitHub committed 2018-01-25 20:01:40 +01:00
1 parent 153567dcaf
commit e12304ece6
1 file changed
+1 -1
+1 -1
View File
@@ -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