From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Tue, 11 Aug 2009 18:32:13 -0400 Subject: [U-Boot] LIBFDT - changing command line In-Reply-To: <4A81C88B.3090808@monstr.eu> References: <4A81C88B.3090808@monstr.eu> Message-ID: <4A81F16D.9070001@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Michal Michal Simek wrote: > Hi All, > > I would like to use fdt for changing command line in DTB but > I found there is one problem if I have longer command line which contains > any spaces. > Below is my workflow. > If I understand correctly the problem is in cmd_fdt.c:fdt_parse_prop:593-603. > It will be worth to add case for supporting > fdt set /chosen bootargs "console=ttyUL root=/dev/mtdblock0" > copy from first " to next " > > Or is it there any solution which I miss for this case? > > Thanks, > Michal It is somewhat ugly, but the you can use "\" to escape the spaces: fdt set /chosen bootargs console=ttyUL\ root=/dev/mtdblock0 I did this originally (IIRC) so that I wouldn't have to deal with handling quotes in the parsing (Are they there? Are they balanced? What to do if not balanced?). Add in a dash of lazy... [snip] Best regards, gvb