Unpacking and repacking the Scrolls BOOT partition

Talk about Scroll Tablet Software Upgrades/Mods/Hacks here.

Unpacking and repacking the Scrolls BOOT partition

Postby RichardP » April 29th, 2011, 11:21 am

Hi all,

I have Unpacked the scrolls boot image, (original size is 10MB)

10M mymtd0.img

After unpacking.. the sizes come no-where near 10M
9b mymtd0.img-base
45b mymtd0.img-cmdline
9b mymtd0.img-pagesize
304K mymtd0.img-ramdisk.gz
4.8M mymtd0.img-zImage

And Repacking... using the zImage kernel
5.3M 2011-04-29 12:08 mynewimage.img
306K 2011-04-29 12:07 newramdisk.cpio.gz

The original image is 10M ... should the image I create be padded to 10M ? or is a cat /dev/zero > /dev/mtd/mtd0 be sufficient to clear out the spaces? or will flash_image boot myImage.img be enough to sort out the free spaces?

Code: Select all
mkbootimg  --base 0x40000000 --cmdline 'console=ttySAC0 androidboot.hardware=tcc92xx' --kernel mymtd0.img-zImage --ramdisk newramdisk.cpio.gz -o mynewimage.img


I had to change the mkbootimage to allow for a 8192 pagesize as it did not by default.
Scroll v2 (SCR051624) - Another MAPLIN device destined for the scrapheap
Firmware 1.02s
z4Root
LauncherPro
RichardP
Scroll Apprentice
Scroll Apprentice
 
Posts: 46
Joined: April 3rd, 2011, 12:47 pm

Re: Unpacking and repacking the Scrolls BOOT partition

Postby bloggs » April 29th, 2011, 1:12 pm

The original image is 10M ... should the image I create be padded to 10M ? or is a cat /dev/zero > /dev/mtd/mtd0 be sufficient to clear out the spaces? or will flash_image boot myImage.img be enough to sort out the free spaces?


On the basis that the boot image header should define everything that is used in the boot partition, I don't think it matters whether or not you null out the unused area. I just flashed the 5Mbytes or so of the new image and it boots okay! I dumped the resulting partition and it appears that flash_image has padded with nulls out to exactly 6Mbytes, then the rest of the partition is filled with 0xFF (that's what was there before, so it may just have left this untouched).

What version of mkbootimg did you modify, and did you rebuild it specifically for an 8k pagesize? I came across a version that took the pagesize as a parameter (--pagesize) but only accepted options of 2048 and 4096. I simply modified this to accept 8192 as another alternative. I don't know how or where to submit this as a new "version", but given that the scroll has at least two versions, it might be of use to others.

Eddie
bloggs
Scroll Sergeant
Scroll Sergeant
 
Posts: 55
Joined: April 25th, 2011, 10:51 am

Re: Unpacking and repacking the Scrolls BOOT partition

Postby RichardP » April 29th, 2011, 1:19 pm

Hi Eddie,

The mkbootimage I used came from the android repo, so its the standard one. I just changed the default value to 8192; I was lazy and seemed to be work to add the code for something I was not sure of.

Richard

Sent from my GT-P1010 using Tapatalk
Scroll v2 (SCR051624) - Another MAPLIN device destined for the scrapheap
Firmware 1.02s
z4Root
LauncherPro
RichardP
Scroll Apprentice
Scroll Apprentice
 
Posts: 46
Joined: April 3rd, 2011, 12:47 pm


Return to SOFTWARE & Operating Systems

Who is online

Users browsing this forum: No registered users and 2 guests

cron