[U-Boot] ARM: tegra: jetson-tk1: Increase console buffer size

U-Boot's console buffer size needs to be bigger to allow the default image on NVIDIA's Linux4Tegra to boot.
Otherwise one sees: bootarg overflow 602+0+0+1 > 512 on the console, and the board refuses to boot.
Signed-off-by: Peter Chubb peter.chubb@data61.csiro.au --- include/configs/tegra-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h index 7b0940a..8e874d3 100644 --- a/include/configs/tegra-common.h +++ b/include/configs/tegra-common.h @@ -76,7 +76,7 @@ * Increasing the size of the IO buffer as default nfsargs size is more * than 256 and so it is not possible to edit it */ -#define CONFIG_SYS_CBSIZE (256 * 2) /* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE (256 * 3) /* Console I/O Buffer Size */ /* Print Buffer Size */ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + 16)

On 08/22/2016 04:46 PM, Peter Chubb wrote:
U-Boot's console buffer size needs to be bigger to allow the default image on NVIDIA's Linux4Tegra to boot.
Otherwise one sees: bootarg overflow 602+0+0+1 > 512 on the console, and the board refuses to boot.
This is probably fine, but ...
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
...
-#define CONFIG_SYS_CBSIZE (256 * 2) /* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE (256 * 3) /* Console I/O Buffer Size */
... "3" feels odd since it's not a power of 2:-) Perhaps you could try cherry-picking the following commit from our L4T U-Boot and if it works for you, submit that instead. That would also reduce the mainline<->L4T U-Boot delta.
http://nv-tegra.nvidia.com/gitweb/?p=3rdparty/u-boot.git;a=commit;h=d03e1b86...
git remote add nv-tegra-u-boot \ git://nv-tegra.nvidia.com/3rdparty/u-boot.git git fetch nv-tegra-u-boot git cherry-pick -s 81df4b5097ef72b9e1565c8f3fb45a9c14a9984e

The Linux-for-Tegra kernel uses a very long command line.
The default value of CONFIG_SYS_CBSIZE is too small to print out the long command line and causes a message like: bootarg overflow 602+0+0+1 > 512 on the console, and the board refuses to boot.
The default value of CONFIG_SYS_MAXARGS is too small to add a long long command line, and the kernel won't boot without the complete bootargs.
Increasing these two config options solves this problem.
(patch cherry-picked from the NVIDIA u-boot source; original author Bryan Wu)
Signed-off-by: Bryan Wu pengw@nvidia.com Signed-off-by: Peter Chubb Peter.Chubb@data61.csiro.au --- include/configs/tegra-common.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h index 7b0940a..6bfd7b2 100644 --- a/include/configs/tegra-common.h +++ b/include/configs/tegra-common.h @@ -76,11 +76,12 @@ * Increasing the size of the IO buffer as default nfsargs size is more * than 256 and so it is not possible to edit it */ -#define CONFIG_SYS_CBSIZE (256 * 2) /* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE (1024 * 2) /* Console I/O Buffer Size */ /* Print Buffer Size */ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + 16) -#define CONFIG_SYS_MAXARGS 32 /* max number of command args */ +#define CONFIG_SYS_MAXARGS 64 /* max number of command args */ + /* Boot Argument Buffer Size */ #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)

On 08/22/2016 06:00 PM, Peter Chubb wrote:
The Linux-for-Tegra kernel uses a very long command line.
There should be a From: line here indicating that Bryan is the author; did you actually "git cherry-pick" this, or apply it in some other manner? Perhaps you're notusing "git send-email" to send the message? That might explain the unexpected extra blank line right at the top of the message.
Aside from those issues, this looks fine.

"Stephen" == Stephen Warren swarren@wwwdotorg.org writes:
Stephen> On 08/22/2016 06:00 PM, Peter Chubb wrote:
The Linux-for-Tegra kernel uses a very long command line.
Stephen> There should be a From: line here indicating that Bryan is Stephen> the author; did you actually "git cherry-pick" this, or apply Stephen> it in some other manner? Perhaps you're notusing "git Stephen> send-email" to send the message? That might explain the Stephen> unexpected extra blank line right at the top of the message.
I can't use git send-mail, because our corporate emailer refuses to send with a From line that isn't me. So I did git format-patch and imported it into my email client.
Stephen> Aside from those issues, this looks fine.
So can I add an acked-by line from you, and resubmit (with, if I can work out how to do it, the original From line?)

On 08/23/2016 04:21 PM, Peter Chubb wrote:
"Stephen" == Stephen Warren swarren@wwwdotorg.org writes:
Stephen> On 08/22/2016 06:00 PM, Peter Chubb wrote:
The Linux-for-Tegra kernel uses a very long command line.
Stephen> There should be a From: line here indicating that Bryan is Stephen> the author; did you actually "git cherry-pick" this, or apply Stephen> it in some other manner? Perhaps you're notusing "git Stephen> send-email" to send the message? That might explain the Stephen> unexpected extra blank line right at the top of the message.
I can't use git send-mail, because our corporate emailer refuses to send with a From line that isn't me. So I did git format-patch and imported it into my email client.
git send-email always uses your own name/address for the SMTP sender and RFC822 header From:. The From: line I'm talking about here is something in the message body. git send-email automatically generates that if the From: line in the patch file it's sending doesn't match your configured name/email.
Or tl;dr, I think you'll find the git send-email works fine for you.
Stephen> Aside from those issues, this looks fine.
So can I add an acked-by line from you, and resubmit (with, if I can work out how to do it, the original From line?)
Well, I didn't ack the patch explicitly since it had some issues I'd like to be addressed, but I suppose if you do address them then you can add acked-by from swarren@nvidia.com on a future posting.

Peter,
It appears that this got rolled into 'ARM: tegra: increase console buffer size and sys args num', so I'm going to mark it as Superseded in my Patchwork queue.
What's the status of the 'increase console buffer size and sys args num' patch? I've currently got it marked as 'Changes Requested'.
Thanks,
Tom -- nvpublic
-----Original Message----- From: Stephen Warren [mailto:swarren@wwwdotorg.org] Sent: Monday, August 22, 2016 4:11 PM To: Peter Chubb Peter.Chubb@data61.csiro.au Cc: u-boot@lists.denx.de; Stephen Warren swarren@nvidia.com; Tom Warren TWarren@nvidia.com Subject: Re: [U-Boot] ARM: tegra: jetson-tk1: Increase console buffer size
On 08/22/2016 04:46 PM, Peter Chubb wrote:
U-Boot's console buffer size needs to be bigger to allow the default image on NVIDIA's Linux4Tegra to boot.
Otherwise one sees: bootarg overflow 602+0+0+1 > 512 on the console, and the board refuses to boot.
This is probably fine, but ...
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
...
-#define CONFIG_SYS_CBSIZE (256 * 2) /* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE (256 * 3) /* Console I/O Buffer Size */
... "3" feels odd since it's not a power of 2:-) Perhaps you could try cherry- picking the following commit from our L4T U-Boot and if it works for you, submit that instead. That would also reduce the mainline<->L4T U-Boot delta.
http://nv-tegra.nvidia.com/gitweb/?p=3rdparty/u-boot.git;a=commit;h=d0 3e1b861b9eaaf13fa37a8d4251d78b3814eaaf
git remote add nv-tegra-u-boot \ git://nv-tegra.nvidia.com/3rdparty/u-boot.git git fetch nv-tegra-u-boot git cherry-pick -s 81df4b5097ef72b9e1565c8f3fb45a9c14a9984e

"Tom" == Tom Warren TWarren@nvidia.com writes:
Tom> Peter, It appears that this got rolled into 'ARM: tegra: increase Tom> console buffer size and sys args num', so I'm going to mark it as Tom> Superseded in my Patchwork queue.
Yes, Stephen asked me to cherrypick instead from the tegra u-boot repo, and I did and submitted it.
Tom> What's the status of the 'increase console buffer size and sys Tom> args num' patch? I've currently got it marked as 'Changes Tom> Requested'.
Maybe you missed it, but the changed version was sent to the U-Boot list. I'll send it again if need be. Message ID: 20160825011915.4767-1-Peter.Chubb@data61.csiro.au
Peter C

Peter,
-----Original Message----- From: Peter.Chubb@data61.csiro.au [mailto:Peter.Chubb@data61.csiro.au] Sent: Thursday, September 01, 2016 3:54 PM To: Tom Warren TWarren@nvidia.com Cc: swarren@wwwdotorg.org; Peter.Chubb@data61.csiro.au; u- boot@lists.denx.de; Stephen Warren swarren@nvidia.com Subject: Re: [U-Boot] ARM: tegra: jetson-tk1: Increase console buffer size
"Tom" == Tom Warren TWarren@nvidia.com writes:
Tom> Peter, It appears that this got rolled into 'ARM: tegra: increase Tom> console buffer size and sys args num', so I'm going to mark it as Tom> Superseded in my Patchwork queue.
Yes, Stephen asked me to cherrypick instead from the tegra u-boot repo, and I did and submitted it.
Tom> What's the status of the 'increase console buffer size and sys args Tom> num' patch? I've currently got it marked as 'Changes Requested'.
Maybe you missed it, but the changed version was sent to the U-Boot list. I'll send it again if need be. Message ID: 20160825011915.4767-1-Peter.Chubb@data61.csiro.au
Looking at Patchwork, I see only one version of 'ARM: tegra: increase
Tom> console buffer size and sys args num', with the last comment being from Stephen:
"Well, I didn't ack the patch explicitly since it had some issues I'd like to be addressed, but I suppose if you do address them then you can add acked-by from swarren@nvidia.com on a future posting."
Not sure how to use the 'Message ID' to find a particular patch/conversation (I searched my Outlook u-boot folder, and don't see any entry with that exact Message ID). The one that Patchwork lists for the change I'm looking at is: 844m6cwe09.wl-Peter.Chubb@data61.csiro.au
Tom
Peter C
Dr Peter Chubb Tel: +61 2 9490 5852 http://www.data61.csiro.au http://ts.data61.csiro.au Software Systems Research Group/NICTA/Data61
----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------

On 09/01/2016 04:53 PM, Peter.Chubb@data61.csiro.au wrote:
"Tom" == Tom Warren TWarren@nvidia.com writes:
Tom> Peter, It appears that this got rolled into 'ARM: tegra: increase Tom> console buffer size and sys args num', so I'm going to mark it as Tom> Superseded in my Patchwork queue.
Yes, Stephen asked me to cherrypick instead from the tegra u-boot repo, and I did and submitted it.
Tom> What's the status of the 'increase console buffer size and sys Tom> args num' patch? I've currently got it marked as 'Changes Tom> Requested'.
Maybe you missed it, but the changed version was sent to the U-Boot list. I'll send it again if need be. Message ID: 20160825011915.4767-1-Peter.Chubb@data61.csiro.au
I don't have that message either, and Google can't find it.

"Stephen" == Stephen Warren swarren@wwwdotorg.org writes:
Stephen> I don't have that message either, and Google can't find it.
I'll send it again.
Thanks.
participants (4)
-
Peter Chubb
-
Peter.Chubb@data61.csiro.au
-
Stephen Warren
-
Tom Warren