[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with padflashimage



Hi all!

A few months ago we created our own build environment for building flash 
images for dev board 82. We extracted the commands necessary to produce the 
image from Axis build system. This work well and we were able to produce 
bootable (workable) images. In the last days we decided that we will 
reconstruct our build system and when we tried to migrate our script for 
building flash images we found that there might be a problem with 
padflashimage program.

If you compare the outputs from both scripts you will see that they match, 
except for one small thing - the size of the image as seen by padflashimage 
program. In the working output padflashimage thinks that image  size is 
1002500 and in the one that that does not work 1002365 - while ls -s 
--block-size=1 claims that the size is (in both cases) 1004544. We also found 
that some files seams to be missing from the broken image (it looks like they 
were truncated) - so we suspect that padflashimage pads to much of our 
image...

Everything - except the (attached) final scripts for building the flash image 
is the same in both cases. We would be very grateful if anybody could tell us 
what is wrong or what are we doing wrong... Thank you!

	Regards Simon

---------------------------------------------------------
*** The output from the working script: ***
---------------------------------------------------------

0x010000 0x200000 0x3F0000 rescue.img flash1.img flash2.img
Using a blocksize of 8192 bytes.
Directory data: 6036 bytes
Everything: 472 kilobytes
Edition timestamp: 1077194492 = Thu Feb 19 13:41:32 2004

Super block: 76 bytes
CRC: eea977f2
483840 cramfs.img
Target is: flash2.img
hex: 4128768 size: 4128768
**** Adding 0 $ff-bytes as alignment to get 4128768 (0x3F0000)
0x200000 flash1.img
1004544 flash1.img
Target is: flash1.img
hex: 2097152 size: 1002500
**** Adding 1094652 $ff-bytes as alignment to get 2097152 (0x200000)

Creating partition table ...

Ignoring rescue (only size is used)

Check flash1 0x200000 rw          kernel    flash1.img
partition starts at 0
partition size is 2097152
partition checksum is        408062934

Check flash2 0x3F0000 rw          jffs2     flash2.img
partition starts at 2097152
partition size is 4128768
partition checksum is       1049924904

partition table csum size is 68, sum is 2007
Updated branch-skip offset to 88
1004544 flash1.img
0x200000 flash1.img
Target is: flash1.img
hex: 2097152 size: 1002500
**** Adding 1094652 $ff-bytes as alignment to get 2097152 (0x200000)
Target is: rescue.img
hex: 65536 size: 664
**** Adding 64872 $ff-bytes as alignment to get 65536 (0x010000)

        ***     Image sizes:    ****

vmlinuz   : 520704 /stuff1/4Pot/tmp/distribucija/build/linux-2.4.22/arch/cris/
boot/compressed/vmlinuz
cramfs.img: 473K /stuff1/4Pot/tmp/distribucija/build//cramfs.img
flash1.img: 2.1M /stuff1/4Pot/tmp/distribucija/build//flash1.img
flash2.img: 4.0M /stuff1/4Pot/tmp/distribucija/build//flash2.img
kimage    : 1.5M /stuff1/4Pot/tmp/distribucija/build//kimage
fimage    : 6.1M /stuff1/4Pot/tmp/distribucija/build//fimage

        ***     ***     ***     ***     ***

-----------------------------------
*** From the new one:  ***
-----------------------------------
0x010000 0x200000 0x3F0000 rescue.img flash1.img flash2.img
Using a blocksize of 8192 bytes.
Directory data: 6036 bytes
Everything: 472 kilobytes
Edition timestamp: 1077194501 = Thu Feb 19 13:41:41 2004

Super block: 76 bytes
CRC: 3dd2c2fa
483840 cramfs.img
Target is: flash2.img
hex: 4128768 size: 4128768
**** Adding 0 $ff-bytes as alignment to get 4128768 (0x3F0000)
0x200000 flash1.img
1004544 flash1.img
Target is: flash1.img
hex: 2097152 size: 1002365
**** Adding 1094787 $ff-bytes as alignment to get 2097152 (0x200000)

Creating partition table ...

Ignoring rescue (only size is used)

Check flash1 0x200000 rw          kernel    flash1.img
partition starts at 0
partition size is 2097152
partition checksum is        408151302

Check flash2 0x3F0000 rw          jffs2     flash2.img
partition starts at 2097152
partition size is 4128768
partition checksum is       1049923625

partition table csum size is 68, sum is 1886
Updated branch-skip offset to 88
1004544 flash1.img
0x200000 flash1.img
Target is: flash1.img
hex: 2097152 size: 1002365
**** Adding 1094787 $ff-bytes as alignment to get 2097152 (0x200000)
Target is: rescue.img
hex: 65536 size: 664
**** Adding 64872 $ff-bytes as alignment to get 65536 (0x010000)

        ***     Image sizes:    ****

vmlinuz   : 520704 /stuff1/buildroot/carneol/temp/linux-2.4.22-sp0/arch/cris/
boot/compressed/vmlinuz
cramfs.img: 473K /stuff1/buildroot/carneol/temp//cramfs.img
flash1.img: 2.1M /stuff1/buildroot/carneol/temp//flash1.img
flash2.img: 4.0M /stuff1/buildroot/carneol/temp//flash2.img
kimage    : 1.5M /stuff1/buildroot/carneol/temp//kimage
fimage    : 6.1M /stuff1/buildroot/carneol/temp//fimage

        ***     ***     ***     ***     ***

Attachment: make_disk-4Way.sh-broken
Description: application/shellscript

Attachment: make_disk-4Way.sh-working
Description: application/shellscript

Attachment: padflashimage
Description: Perl program