mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <sha@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/7] state: make first boot less verbose
Date: Tue, 30 Nov 2021 14:52:30 +0100	[thread overview]
Message-ID: <2281e96d-43b0-35b6-00fa-0bd75829c2de@pengutronix.de> (raw)
In-Reply-To: <20211130104748.GV28260@pengutronix.de>

Hello Sascha,

On 30.11.21 11:47, Sascha Hauer wrote:
> On Thu, Nov 25, 2021 at 05:10:37PM +0100, Ahmad Fatoum wrote:
>> First boot with uninitialized state is needlessly verbose:
>>
>>   state: New state registered 'state'
>>   state: Detected old on-storage format
>>   ERROR: state: Error, invalid header crc in raw format, calculated 0x7bd5c66f, found 0x00000000
>>   state: Ignoring broken bucket 0@0x00000000...
>>   state: Detected old on-storage format
>>   ERROR: state: Error, invalid header crc in raw format, calculated 0x7bd5c66f, found 0x00000000
>>   state: Ignoring broken bucket 1@0x00040000...
>>   state: Detected old on-storage format
>>   ERROR: state: Error, invalid header crc in raw format, calculated 0x7bd5c66f, found 0x00000000
>>   state: Ignoring broken bucket 2@0x00080000...
>>   ERROR: state: Failed to find any valid state copy in any bucket
>>   ERROR: state: Failed to read state with format raw, -2
>>
>> This has confused barebox-state novices more than once. Let's handle
>> the zeroed state case specially and reduce output in that case, so
>> it now looks like this:
>>
>>   state: New state registered 'state'
>>   state: Detected old on-storage format
>>   state: Detected old on-storage format
>>   state: Detected old on-storage format
>>   state state.of: Fresh state detected, continuing with defaults
>>
>> This is only the output when CRC is zero (hinting at zeroed state
>> partition). If crc != zero, then output is a little more verbose than
>> before:
> 
> Should we handle crc == 0xffffffff in the same way for flash devices?

I never minded it in practice, because it's only there the very first
time. The problem is with emulated targets, where you see it every time
and sometimes from people who don't know it's expected. I've tested this
with cfi-flash and mtd-ram in QEMU and TinyEMU and there I read zeroes, so
that's what's addressed.

If you think it's worthwhile to do it for crc == ~0 as well, feel free to fix up
on apply. :-)

Cheers,
Ahmad

> 
> Sascha
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2021-11-30 13:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25 16:10 [PATCH 0/7] ARM/RISC-V: qemu-virt: share common cleaned up state/env support Ahmad Fatoum
2021-11-25 16:10 ` [PATCH 1/7] state: mark state init errors specially Ahmad Fatoum
2021-11-25 16:10 ` [PATCH 2/7] state: make first boot less verbose Ahmad Fatoum
2021-11-30 10:47   ` Sascha Hauer
2021-11-30 13:52     ` Ahmad Fatoum [this message]
2021-11-25 16:10 ` [PATCH 3/7] of: overlay: rescan aliases calling of_overlay_apply_tree on live tree Ahmad Fatoum
2021-11-25 16:10 ` [PATCH 4/7] ARM: qemu: enable deep probe support Ahmad Fatoum
2021-11-25 16:10 ` [PATCH 5/7] ARM: qemu: move board code to central location Ahmad Fatoum
2021-11-25 16:10 ` [PATCH 6/7] common: boards: qemu-virt: genericize to support non-ARM architectures Ahmad Fatoum
2021-11-25 16:10 ` [PATCH 7/7] RISC-V: qemu-virt: add overlay for environment and state Ahmad Fatoum
2021-12-07 14:04 ` [PATCH 0/7] ARM/RISC-V: qemu-virt: share common cleaned up state/env support Sascha Hauer

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=2281e96d-43b0-35b6-00fa-0bd75829c2de@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=sha@pengutronix.de \
    --subject='Re: [PATCH 2/7] state: make first boot less verbose' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox