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.
This commit is contained in:
2015-08-09 08:50:39 -04:00
parent 604abc11be
commit 6c538e723d

View File

@@ -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`