Duncan Hare 714 931 7952
----- Forwarded Message ----- From: "d...@synoia.com" <d...@synoia.com> To: "u-boot@lists.denx.de" <u-boot@lists.denx.de> Cc: Cédric Schieli <cschi...@gmail.com> Sent: Sunday, November 13, 2016 4:08 PM Subject: FDT retrived varaibles appear to have different properties fom other u-boot variables - and are corrupted on get, set, get sequence Cédric I move the fdt to 0x100 fdt move ${fdt_addr} 100 fdt addr 100 then fdt get value bootargs /chosen bootargs printenv bootargs bootargs=8250.nr_uarts=1 dma.dmachans=........all the boot args....... (note the space after "uarts=1) setenv abc $bootargs fails...as does printenv $bootargs They I tried fdt set bootargs /chosen bootargsfdt get value bootargs /chosen bootargsbootargs=8250.nr_uarts=1 The bootargs parameter list is truncated after the first blank. Something is not right in the world of fdt code. Duncan Hare 714 931 7952 From: Cédric Schieli <cschi...@gmail.com> To: d...@synoia.com Sent: Sunday, November 13, 2016 2:21 AM Subject: Re: Fw: [U-Boot] Fw: FDT pointer value, passed by the PI firmware, is not set in u-boot Hello Duncan, 2016-11-13 3:04 GMT+01:00 <d...@synoia.com>: > If appending to "/chosen bootargs" (making it longer), does the fdt command > automatically relocate the fdt, or does the u-boot script have to do that > itself? > > The fdt doc at http://www.denx.de/wiki/view/ DULG/UBootCmdFDT > Is quite unclear on how the fdt size is managed, especially when the fdt is > located close to the end of memory. I'm not an expert here, but looking at cmd/fdt.c I didn't find any kind of relocation code. So I guess the safe bet is to move the blob before making any (growing) change to the tree: # load the blob from the firmware provided address (at the end of memory) fdt addr ${fdt_addr} # move the blob to the (previously) default location (0x100) fdt move ${fdt_addr_r} # make needed changes setenv bootargs "......." # boot from the new location bootz ${kernel_addr_r} - ${fdt_addr_r} Another solution is to force the firmware to load the blob at a fixed location (as before) by updating config.txt: device_tree_address=0x100 Regards, Cédric _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot