[U-Boot-Users] Running w/o flash

Wolfgang Denk wd at denx.de
Thu Mar 29 00:36:05 CEST 2007


Dear Dave,

in message <C8F551D39A7C724E987CF8DD11D31783A76767 at svr3.sixnetio.com> you wrote:
>
> > CFG_NO_FLASH means no flash memory at all. It is mutually exclusive
> > with CFG_CMD_FLASH, although this is not checked anywhere.
>  
> I agree that's what it should mean, but then it would also be
> mutually exclusive with CFG_CMD_NAND and CONFIG_HAS_DATAFLASH, and

No, not really. Because NAND and DataFlash are not flash MEMORY, they
are STORAGE devices based on some flash technology.

You may find I'm nitpicking here, but please read the lengthy  thread
"Running  w/o  flash" where I've been discussing exactly this problem
with Ulf Samuelsson again and again.

[It's quite some coincidence that your patch is posted just now.]

> that's not how it is actually used. All the uses I see are to
> avoid using things that require CFG_CMD_FLASH.

This makes sense to me.

> I'd like to eliminate CFG_NO_FLASH and replace it with 
> !(CONFIG_COMMANDS & CFG_CMD_FLASH). Would you accept that?

I think I would if you change only this, i. e. leave the basic  logic
in "common/cmd_flash.c" as is. But I guess Ulf would jump in squares.

> The only problem configurations are the MPC8xxx configurations.
> Many of them are based on MPC8540ADS.h and MPC8560ADS.h, which
> define CFG_NO_FLASH when CFG_RAMBOOT is defined, but don't
> disable CFG_CMD_FLASH. I would make those like MPC8641HPCN.h,
> which does disable CFG_CMD_FLASH.

This is definitely not a good idea. One pretty common usage patttern
is to load anU-Boot image to RAM and use this to load and program the
"real" image to flash, so flash command support should be kept.

For me the question is why the boards define CFG_NO_FLASH  then.  You
will have to check this with the board maintainers and the custodian.

> If you (and the mpc8xxx custodians) agree with this approach
> I'll prepare a patch.

Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It is easier to write an incorrect program than understand a  correct
one.




More information about the U-Boot mailing list