From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatolij Gustschin Date: Wed, 23 Nov 2016 09:33:11 +0100 Subject: [U-Boot] FDT retrived raspberry pi bootargs length > 350 characters cause setenv errors, sequemce fdt get/ set/ get truncates at the first blank in the string. In-Reply-To: <1036568598.78702.1479864382151@mail.yahoo.com> References: <1521360278.969111.1478746084415@mail.yahoo.com> <1803431681.1017120.1478753042164@mail.yahoo.com> <1877254354.2540034.1478911787854@mail.yahoo.com> <1282684168.2965147.1479002677632@mail.yahoo.com> <1018758449.3321827.1479082103455@mail.yahoo.com> <20161117150726.GA2546@bill-the-cat> <956355993.2194594.1479405341872@mail.yahoo.com> <781895081.265469.1479575219454@mail.yahoo.com> <1036568598.78702.1479864382151@mail.yahoo.com> Message-ID: <20161123093311.65c171bf@crub> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 23 Nov 2016 01:26:22 +0000 (UTC) dh at synoia.com dh at synoia.com wrote: ... > 8250.nr_uarts=0 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=3840 bcm2708_fb.fbheight=2160 bcm2709.boardrev=0xa02082 bcm2709.serial=0x998f552d smsc95xx.macaddr=B8:27:EB:8F:55:2D bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000? dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait > 1 ) Note: bootargs is over 480 characters long > > setenv abc $bootargs fails...when bootargs is over 350 (approx) characters long.? > fdt set bootargs /chosen bootargs > fdt get value bootargs /chosen bootargsbootargs=8250.nr_uarts=0Bootargs is truncated > The PI firmware generated bootargs parameters have blanks in the bootargs line.? > nvalue.c implements setenv in the _do_env_set()? routine, but I cannot find a length limit in that routine. > I'm willing to make the changes and test them. please check CONFIG_SYS_MAXARGS and CONFIG_SYS_BARGSIZE and increase them in your board config file (include/configs/rpi.h ?). See README for description of these macros. If CONFIG_SYS_BARGSIZE is not defined, the default value 512 is used. Define a bigger value and test if it works. Also if you set long environment strings manually with console commands, the console input buffer might be to small. In that case check CONFIG_SYS_CBSIZE in your board config file. -- Anatolij