[U-Boot] [PATCH 2/9] smi driver support for SPEAr SoCs
Wolfgang Denk
wd at denx.de
Sat Dec 19 22:37:51 CET 2009
Dear Vipin Kumar,
In message <83d1d72b0912182356u6b140b24g8ee1e97becc6285b at mail.gmail.com> you wrote:
>
> >> >> + /* Assume that all sectors are unprotected by default */
> >> >> + for (i = 0; i < CONFIG_SYS_MAX_FLASH_SECT; i++)
> >> >> + info->protect[i] = 0;
> >> >
> >> > Um... is this assumption correct?
> >>
> >> It is intentional
> >
> > Why don;t you protect sectors where the U-Bootimage and environment
> > are stored?
>
> Since the code is being developed for a development board, erasing and
> flashing the uboot is frequent. This is done only to save unprotect every
> time before erasing/flashing uboot
That's what I expected. Please do add proper protection, so that
everybody who copies the code for a real production board has a sane
implementation.
If you are worried about having to type too many commands for update,
please consider pre-defining useful macros like we do in so many other
boards; for example:
"include/configs/aria.h":
"u-boot=aria/u-boot.bin\0"
...
"load=tftp ${u-boot_addr_r} ${u-boot}\0"
...
"update=protect off ${u-boot_addr} +${filesize};" \
"era ${u-boot_addr} +${filesize};" \
"cp.b ${u-boot_addr_r} ${u-boot_addr} ${filesize}\0"
so you only have to type "run load update".
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Unix is simple, but it takes a genius to understand the simplicity."
- Dennis Ritchie
More information about the U-Boot
mailing list