[U-Boot] common/update.c ITB update code refactoring
Wolfgang Denk
wd at denx.de
Sun Mar 13 20:09:30 CET 2011
Dear Dvorkin Dmitry,
In message <4D74E9A1.1000800 at tibbo.com> you wrote:
> common/update.c used to update flash with ITB image.
> With this patch it can also use any templated nash commands to load and
> save blobs.
> Also it adds nand as possible target for update.
>
> Usage example:
> // to load itb from usb mass-storage device and save it into nand using
> nash commands
What exactly are "nash commands" ?
> setenv updatefile updateimage.itb
> setenv loadaddr 0x72000000
> setenv upditb_load_method cmd
> setenv upditb_cmd_load_pre usb start
> setenv upditb_cmd_load fatload usb 0:1 {load_to} {file}
> setenv upditb_save_method cmd
> setenv upditb_cmd_save nand write {addr_src} {addr_dst} {img_size}
>
> // better way to do the same task:
> setenv updatefile updateimage.itb
> setenv loadaddr 0x72000000
> setenv upditb_load_method cmd
> setenv upditb_cmd_load_pre usb start
> setenv upditb_cmd_load fatload usb 0:1 {load_to} {file}
> setenv upditb_save_method nand
This seems to be pretty much hardwired and thus inflexible to me.
Why do you consider this a better approach in general, and why do you
consider the upper example to be better than the lower one?
> seems, common/upditb.c filname better fits it's perpose then
> common/update.c. and it sounds more general. old function names are
> changed also.
"upditb" is pretty much unreadable; I don't like it.
Please split renames and functional changes into separate patches. And
make sure to use correct git options so git detects renames.
...
> + * (C) Copyright 2011 Tibbo Tech.
> + * Code refactoring, Cmd and Nand load/save features:
> + * Dvorkin Dmitry <dvorkin at tibbo.com>
Don't add history of changes to the code; we have this in the git
commit messages.
Also, why add nand-specific code? What about dataflash, spiflash, or
any other storage devices?
If you generalize this, then please make it as generic as possible.
My review stops here, as it's impossible to see what you changed
because the changes appear as complere file removal / file addition.
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
"Buy land. They've stopped making it." - Mark Twain
More information about the U-Boot
mailing list