Skip to contentSkip to conversation

image-fit: Change FIT prefix for configurations

PATCH New Sáreník Ján 2 participants 2 messages Mar 17, 2016 – Apr 1, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 image-fit: Change FIT prefix for configurations

Instead of bootm ${loadaddr}#conf at 1
one uses bootm ${loadaddr}_conf at 1

This fixes the bug with using just bootm #conf at 2 without $loadaddr where text starting with # is interpreted as a comment.

---
 cmd/bootm.c                                  | 2 +-
 common/image-fit.c                           | 2 +-
 doc/uImage.FIT/command_syntax_extensions.txt | 2 +-
 include/configs/baltos.h                     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
cmd/bootm.c +1 -1
index 555ccbc..23740c5 100644
@@ -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);
 }
 
common/image-fit.c +1 -1
index 25f8a11..e23796f 100644
@@ -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);
 }
 
 /**
doc/uImage.FIT/command_syntax_extensions.txt +1 -1
index 6c99b1c..ef4db80 100644
@@ -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>
include/configs/baltos.h +1 -1
index b8c915c..8a01fe8 100644
@@ -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

--
2.7.3

________________________________

CONFIDENTIALITY NOTICE
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information.
If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify us by email to info at ysoft.com with a copy of this message. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. Y Soft and any of its subsidiaries each reserves the right to monitor all e-mail communications through its networks. Y Soft is neither liable for the proper, complete transmission of the information contained in this communication nor any delay in its receipt. This email was scanned for the presence of computer viruses. In the unfortunate event of infection Y Soft does not accept liability.
Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them.

#1 lore raw

PATCH 1/1 image-fit: Change FIT prefix for configurations

Quoted 6 lines · S?ren?k J?n

Instead of bootm ${loadaddr}#conf at 1
one uses bootm ${loadaddr}_conf at 1

This fixes the bug with using just bootm #conf at 2 without $loadaddr where text starting with # is interpreted as a comment.

[snip]

doc/uImage.FIT/command_syntax_extensions.txt Old uImage: · line 42

Quoted 13 lines
doc/uImage.FIT/command_syntax_extensions.txt +1 -1
index 6c99b1c..ef4db80 100644
@@ -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 at 2" correctly. We cannot change what has been working and is likely in the wild of "bootm ${loadaddr}#conf at 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 at 2" just work. If it ends up being too tricky
or complex, "bootm _conf@" is OK as the new one.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160401/77573300/attachment.sig>