Skip to contentSkip to conversation

ARM: tegra: jetson-tk1: Increase console buffer size

U-Boot New Peter Chubb 3 participants 11 messages Aug 22, 2016 – Sep 1, 2016 Tegra architecture support

lore
Share & tools
lore
#0 lore raw

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.

---
 include/configs/tegra-common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/tegra-common.h +1 -1
index 7b0940a..8e874d3 100644
@@ -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)
Signature · 6 lines
2.9.3


-- 
Dr Peter Chubb	       Tel: +61 2 9490 5852      http://www.data61.csiro.au
http://ts.data61.csiro.au      Software Systems Research Group/NICTA/Data61
#1 lore raw
Quoted 7 lines · Peter Chubb

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 ...

Quoted 1 line
include/configs/tegra-common.h +0 -0

...

include/configs/tegra-common.h line 79

Quoted 2 lines
include/configs/tegra-common.h +1 -1
-#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.

Quoted 1 line

http://nv-tegra.nvidia.com/gitweb/?p=3rdparty/u-boot.git;a=commit;h=d03e1b861b9eaaf13fa37a8d4251d78b3814eaaf

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

#2 lore raw

PATCH 1/1 ARM: tegra: increase console buffer size and sys args num

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)

---
 include/configs/tegra-common.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
include/configs/tegra-common.h +3 -2
index 7b0940a..6bfd7b2 100644
@@ -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)
 
Signature · 5 lines
2.9.3

-- 
Dr Peter Chubb	       Tel: +61 2 9490 5852      http://www.data61.csiro.au
http://ts.data61.csiro.au      Software Systems Research Group/NICTA/Data61
#3 lore raw

PATCH 1/1 ARM: tegra: increase console buffer size and sys args num

Quoted 2 lines · Peter Chubb

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.

#4 lore raw

PATCH 1/1 ARM: tegra: increase console buffer size and sys args num

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Stephen" == Stephen Warren <[email protected]> writes:

Quoted 2 lines · Peter Chubb
Quoted 2 lines

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?)

Signature · 2 lines
Dr Peter Chubb	       Tel: +61 2 9490 5852      http://www.data61.csiro.au
http://ts.data61.csiro.au      Software Systems Research Group/NICTA/Data61
#5 lore raw

PATCH 1/1 ARM: tegra: increase console buffer size and sys args num

Quoted 12 lines · Peter Chubb
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Stephen" == Stephen Warren <[email protected]> writes:

Quoted 2 lines · Peter Chubb
Quoted 2 lines

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.

Quoted 3 lines

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.

Quoted 4 lines

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 at nvidia.com on a future posting.

#6 lore raw
In reply to Stephen Warren

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

Quoted 36 lines

-----Original Message-----
From: Stephen Warren [mailto:swarren at wwwdotorg.org]
Sent: Monday, August 22, 2016 4:11 PM
To: Peter Chubb <[email protected]>
Cc: u-boot at lists.denx.de; Stephen Warren <[email protected]>; Tom Warren <[email protected]>
Subject: Re: [U-Boot] ARM: tegra: jetson-tk1: Increase console buffer size

Quoted 7 lines · Peter Chubb

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 ...

Quoted 2 lines
include/configs/tegra-common.h +0 -0

...

include/configs/tegra-common.h line 79

Quoted 2 lines
include/configs/tegra-common.h +1 -1
-#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.

Quoted 2 lines

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

#7 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Tom" == Tom Warren <[email protected]> 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 at data61.csiro.au

Peter C

Signature · 2 lines
Dr Peter Chubb	       Tel: +61 2 9490 5852      http://www.data61.csiro.au
http://ts.data61.csiro.au      Software Systems Research Group/NICTA/Data61
#8 lore raw

Peter,

Quoted 17 lines

-----Original Message-----
From: Peter.Chubb at data61.csiro.au [mailto:Peter.Chubb at data61.csiro.au]
Sent: Thursday, September 01, 2016 3:54 PM
To: Tom Warren <[email protected]>
Cc: swarren at wwwdotorg.org; Peter.Chubb at data61.csiro.au; u- boot at lists.denx.de; Stephen Warren <[email protected]>
Subject: Re: [U-Boot] ARM: tegra: jetson-tk1: Increase console buffer size

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Tom" == Tom Warren <[email protected]> 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.

Quoted 6 lines

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 at data61.csiro.au

Looking at Patchwork, I see only one version of 'ARM: tegra: increase

Quoted 1 line

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 at 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 at data61.csiro.au

Tom

Quoted 5 lines

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.
-----------------------------------------------------------------------------------

#9 lore raw
In reply to Peter.Chubb at data61.csiro.au
Quoted 9 lines · On 09/01/2016 04:53 PM, Peter.Chubb at data61.csiro.au wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Tom" == Tom Warren <[email protected]> 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.

Quoted 7 lines

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 at data61.csiro.au

I don't have that message either, and Google can't find it.

#10 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Stephen" == Stephen Warren <[email protected]> writes:

Stephen> I don't have that message either, and Google can't find it.

I'll send it again.

Thanks.

Signature · 2 lines
Dr Peter Chubb	       Tel: +61 2 9490 5852      http://www.data61.csiro.au
http://ts.data61.csiro.au      Software Systems Research Group/NICTA/Data61