Message ID | 5cf027cfb8cb490a8c13408be1469100@APczBrno16.ysoft.local |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
On Thu, Mar 17, 2016 at 02:05:59PM +0000, Sáreník Ján wrote: > Instead of `bootm ${loadaddr}#conf@1` > one uses `bootm ${loadaddr}_conf@1` > > This fixes the bug with using just `bootm #conf@2` > without $loadaddr where text starting with # is > interpreted as a comment. [snip] > diff --git a/doc/uImage.FIT/command_syntax_extensions.txt b/doc/uImage.FIT/command_syntax_extensions.txt > index 6c99b1c..ef4db80 100644 > --- a/doc/uImage.FIT/command_syntax_extensions.txt > +++ b/doc/uImage.FIT/command_syntax_extensions.txt > @@ -36,7 +36,7 @@ Old uImage: > New uImage: > 8. bootm <addr1> > 9. bootm [<addr1>]:<subimg1> > -10. bootm [<addr1>]#<conf> > +10. bootm [<addr1>]_<conf> > 11. bootm [<addr1>]:<subimg1> [<addr2>]:<subimg2> > 12. bootm [<addr1>]:<subimg1> [<addr2>]:<subimg2> [<addr3>]:<subimg3> > 13. bootm [<addr1>]:<subimg1> [<addr2>]:<subimg2> <addr3> So the bug you've found is that we don't parse "bootm #conf@2" correctly. We cannot change what has been working and is likely in the wild of "bootm ${loadaddr}#conf@2". I think what we have to do here is correct the syntax file here to note that addr1 is not optional in that case and add a new form. I would first suggest seeing how it looks in code to have "bootm conf@2" just work. If it ends up being too tricky or complex, "bootm _conf@" is OK as the new one.
diff --git a/cmd/bootm.c b/cmd/bootm.c index 555ccbc..23740c5 100644 --- a/cmd/bootm.c +++ b/cmd/bootm.c @@ -124,7 +124,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) * * Right now we assume the first arg should never be '-' */ -if ((*endp != 0) && (*endp != ':') && (*endp != '#')) +if ((*endp != 0) && (*endp != ':') && (*endp != '_')) return do_bootm_subcommand(cmdtp, flag, argc, argv); } diff --git a/common/image-fit.c b/common/image-fit.c index 25f8a11..e23796f 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -75,7 +75,7 @@ static int fit_parse_spec(const char *spec, char sepc, ulong addr_curr, int fit_parse_conf(const char *spec, ulong addr_curr, ulong *addr, const char **conf_name) { -return fit_parse_spec(spec, '#', addr_curr, addr, conf_name); +return fit_parse_spec(spec, '_', addr_curr, addr, conf_name); } /** diff --git a/doc/uImage.FIT/command_syntax_extensions.txt b/doc/uImage.FIT/command_syntax_extensions.txt index 6c99b1c..ef4db80 100644 --- a/doc/uImage.FIT/command_syntax_extensions.txt +++ b/doc/uImage.FIT/command_syntax_extensions.txt @@ -36,7 +36,7 @@ Old uImage: New uImage: 8. bootm <addr1> 9. bootm [<addr1>]:<subimg1> -10. bootm [<addr1>]#<conf> +10. bootm [<addr1>]_<conf> 11. bootm [<addr1>]:<subimg1> [<addr2>]:<subimg2> 12. bootm [<addr1>]:<subimg1> [<addr2>]:<subimg2> [<addr3>]:<subimg3> 13. bootm [<addr1>]:<subimg1> [<addr2>]:<subimg2> <addr3> diff --git a/include/configs/baltos.h b/include/configs/baltos.h index b8c915c..8a01fe8 100644 --- a/include/configs/baltos.h +++ b/include/configs/baltos.h @@ -80,7 +80,7 @@ "ubifsmount ubi0:kernel; " \ "ubifsload $loadaddr kernel-fit.itb;" \ "ubifsumount; " \ -"bootm ${loadaddr}#conf${board_name}; " \ +"bootm ${loadaddr}_conf${board_name}; " \ "if test $? -ne 0; then echo Using default FIT config; " \ "bootm ${loadaddr}; fi;\0" #else