[U-Boot] [PATCH 1/3] ARM: don't panic if no flash is there

Alessandro Rubini rubini-list at gnudd.com
Sun Apr 17 19:32:05 CEST 2011


> Sorry, but I reject this patch.

Please let me restate the point once more. Maybe i've not been clear.

> If you do not have NOR flash, then you should not enable it (and
> define CONFIG_SYS_NO_FLASH). Otherwise, you are supposed to have
> flash memory.

I expect a serious boot loader to work in all possible situations and
to be a development tool, the thing that was called a monitor ages ago
(why do you have "mw" and "md" otherwise?). I've always loved u-boot
usefulness as opposed to the crappy "do nothing at all" wince or
freecale boot loaders.

Thus, I see three reasons to revert the older behaviour.

- even if flash got broken over time, the machine should be useable.
hang() here gains nothing, as I may still be able to boot though the net
and see what happens, without the need to recompile and reflesh a special
recovery boot loader

- during initial development it's common to have some parameter
misconfigured (and thus see no flash) while still using u-boot to
md/mw/whatever and see how's flash really mapepd.  It makes no sense
to be being forced to flash twice at each development loop (one trying
new code and hang() and another to get an interactive session).

- there may be board build both with and without NOR flash. On one
side you added relocation to support boards with different memory
sizes with a single u-boot binary, on the other you are now forbidding
a single binary to work on two similar boards with a different set of
peripherals.

This is policy to me, and I see no reason to force policy in a boot
loader.  I expect only simple and uniform behaviour: do we hang() if
no network is found?

> If there are problems with the Qemu emulation of NOR flash these
> should be fixed there.

Sure, if you want flash. I'm not asking non-compliant code the be added
in u-boot to deal with a flaky implementation elsewhere. I'd love a
perfectly working, though incomplete, emulation to be supported just
like real hardware prototypes with production bugs in the NOR mounting.

Amicalment (even though this message sounds harsh it isn't meant to be)
/alessandro


More information about the U-Boot mailing list