[U-Boot] ext4: crash when writing a file
Stefan Bruens
stefan.bruens at rwth-aachen.de
Sun Dec 11 18:10:25 CET 2016
On Dienstag, 29. November 2016 16:23:28 CET Sébastien Szymanski wrote:
> On 11/29/2016 03:38 PM, Brüns, Stefan wrote:
> > On Dienstag, 29. November 2016 14:10:54 CET Sébastien Szymanski wrote:
> >>> Btw, which u-boot version are you using?
> >>
> >> I first noticed the issue on U-Boot 2016.05 so I rebase on master from
> >> http://git.denx.de/u-boot.git
> >>
> >> Regards,
> >
> > That still doesn't make clear on which version you see this issue.
> > 2016.05?
> > Master? Which date/tag/hash?
> >
> > U-Boot 2016.11 has received a huge number of fixes, and current master has
> > some more.
>
> Sorry for being unclear.
>
> I was working with U-Boot 2016.05 (commit
> aeaec0e682f45b9e0c62c522fafea353931f73ed) when I saw this issue. Then, I
> rebased on current master (commit
> e94793c844a40606252f2e3f6428063e057b3fd2) and I still see this issue.
>
> I hope it's clearer now.
>
> Regards,
>
> > Regards,
> >
> > Stefan
>
> Sébastien Szymanski
So to restate what you are doing:
1. You have a partitioned MMC, where the 2nd partition starts at block
264192/0x40800
2. You load a 93958144 byte (~90 MB) file via TFTP to ${loadaddr}
3. You write this partition image to 0x40800 using "mmc write"
4. You load another 5345128 byte (5 MB) file via TFTP to $loadaddr
5. You try to write this file to the 2nd partition, which now is ext4
formatted, and already contains a file of the same name, i.e. boot/opos6ul-
linux.bin
Actually, I can't reproduce the crash. Maybe you have corrupted part of the
memory when loading the image, e.g. overwritten part of u-boot or its heap.
Things you can try:
a) reboot the system after loading/writing the partion image.
b) checking the fs contents after the reboot, e.g "ls mmc 0:2 /boot"
c) overwriting opos6ul-linux.bin with just a single byte, e.g "ext4write mmc
0:2 0x0 /boot/opos6ul-linux.bin 1"
d) transferring back the partition image to your host and running fschk on it
You may also able to reproduce this using the u-boot sandbox.
Kind regards,
Stefan
--
Stefan Brüns / Bergstraße 21 / 52062 Aachen
home: +49 241 53809034 mobile: +49 151 50412019
work: +49 2405 49936-424
More information about the U-Boot
mailing list