CreatorDev / u-boot

U-boot Project Based on "Das U-Boot" Source Tree
4 stars 12 forks source link

Unpack U-boot.img #43

Open ymkyu opened 6 years ago

ymkyu commented 6 years ago

Hello, CreatorDev.

I succeeded build U-boot-pistachio_marduk-[version].img file. And i tried to unpack U-boot.img and extract data file. BINWALK result was "CRC32 table + LZO Compressed data", it was wrong. I found the U-boot image build process.

u-boot-pistachio-nor.img: u-boot-dtb.img u-boot-spl-pistachio.bimg FORCE @dd if=/dev/zero of=$@ bs=4K count=384 conv=notrunc @dd if=u-boot-spl-pistachio.bimg of=$@ bs=4K count=128 conv=notrunc @dd if=u-boot-dtb.img of=$@ bs=4K count=256 seek=128 conv=notrunc

BIMG image file created by bimgtool made by Imagination Technologies.

u-boot-spl-pistachio.bimg: u-boot-spl-dtb.bin FORCE tools/bimgtool $< $@ $(CONFIG_SYS_GRAM_BASE) CONFIG_SYS_GRAM_BASE is used as base-address in bimgtool. CONFIG_SYS_GRAM is 0x9A000000. I don't know what it mean.

I tried to reverse engineering u-boot-pistachio_marduk-2015.10-v1.0.4.img via IDA. I took a few days to find BASE_ADDRESS, but i couldn't. I analyzed all of li(link immediate)operand and BSS initialize section to tried to found BASE_ADDRESS. But i couldn't