From: U.Mutlu <for-gmane@mutluit.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Bug in saveenv handling?
Date: Tue, 9 Apr 2019 21:05:17 +0200 [thread overview]
Message-ID: <q8iqdd$1pq4$1@blaine.gmane.org> (raw)
I just made this unpleasant observation while playing with u-boot:
On the u-boot CLI I changed an envvar and saved the env:
setenv bootdelay 5 ; saveenv
Then I issued, just for fun, the command "scsi scan", but it crashed
and rebooted the device. But this time on the display only the tuxx logo
and the very first u-boot line is displayed, nothing else happens.
It seems u-boot has overwritten parts of itself on the storage medium (uSD
with FAT boot partition).
I had this experience some more times in the past; after writing u-boot anew
to the uSD it continued working again.
Btw, I once even had the case where saveenv overwrote boot.cmd (but nothing
else) with garbage (IIRC it was filled full with the char @ ).
I mention this just because it seems that there's maybe a bug in u-boot's
saveenv handling (maybe data was not completely flushed, file handle
was not closed, or maybe the fat write routine is buggy?...).
=> setenv bootdelay 5 ; saveenv
Saving Environment to FAT... OK
=> printenv bootdelay
bootdelay=5
=> scsi scan
scanning bus for devices...
data abort
pc : [<7ef94f8e>] lr : [<7ef911a1>]
reloc pc : [<4a01af8e>] lr : [<4a0171a1>]
sp : 7af51bf8 ip : 0000001c fp : 000000c0
r10: 00000000 r9 : 7af59ed8 r8 : 00000000
r7 : 7af51e78 r6 : 7efd3f54 r5 : 7efdb9b8 r4 : 7efdb9b8
r3 : 00000000 r2 : 00000000 r1 : ea000016 r0 : 7efdb9b8
Flags: nZcv IRQs off FIQs off Mode SVC_32
Code: e92dbd10 f8d045f0 b0858080 1000f8d8 (f8d14604)
Resetting CPU ...
resetting ...
next reply other threads:[~2019-04-09 19:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-09 19:05 U.Mutlu [this message]
2019-04-09 19:39 ` [U-Boot] Bug in saveenv handling? Frank Wunderlich
2019-04-09 20:53 ` U.Mutlu
2019-04-09 21:01 ` U.Mutlu
2019-04-09 21:21 ` U.Mutlu
2019-04-10 8:00 ` Frank Wunderlich
2019-04-10 18:32 ` U.Mutlu
2019-04-09 21:09 ` Tom Rini
2019-04-09 23:10 ` U.Mutlu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='q8iqdd$1pq4$1@blaine.gmane.org' \
--to=for-gmane@mutluit.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox