From 6c538e723d75499fe477d57a94865baece307406 Mon Sep 17 00:00:00 2001 From: <> Date: Sun, 9 Aug 2015 08:50:39 -0400 Subject: [PATCH] Output Boot Magic Address - Check if magic address is not at 0x0. - If magic is found elsewhere in image then output it's location in hex and dec, otherwise ignore. - User needs to know it's location as some OEM images require that location in order to boot. - The magic output is only cosmetic and the user is responsible for the location after image is built. --- ARM/mkboot | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ARM/mkboot b/ARM/mkboot index 94583b4..dc2c5fe 100755 --- a/ARM/mkboot +++ b/ARM/mkboot @@ -74,6 +74,7 @@ usage() print_info() { + [ $boot_magic_addr -gt 0 ] && pout " boot magic : ANDROID!"; pout " magic address : $boot_magic ($boot_magic_addr)" [ ! -z "$board" ] && pout " board : $board" pout " kernel : $kernel" pout " ramdisk : $ramdisk" @@ -253,8 +254,9 @@ pout "\nUnpack & decompress $1 to $2\n" cp -f $1 $tempdir/ cd $tempdir bootimg=$($busybox basename $1) -# Find BOOT_MAGIC address in dec +# Find BOOT_MAGIC address in dec and hex boot_magic_addr=$($grep -abo ANDROID! $bootimg | $busybox cut -f 1 -d : | head -1) +boot_magic=`printf 0x%08x $boot_magic_addr` # Find standard QCDT address in hex qcdt_addr=$($grep -abo QCDT $bootimg | $busybox cut -f 1 -d : | head -1) qcdt_addr=`printf 0x%x $qcdt_addr`