linaro-image-tools bootargs broke panda LEB in revision 342

Bug #788765 reported by Alexander Sack
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Fix Released
Critical
Mouna SAID
Linaro U-Boot
Invalid
Undecided
John Rigby

Bug Description

Problem
-------

l-m-c currently generates a boot.scr that contains too many arguments to "setenv bootargs".

This can be avoided by quoting some of the arguments in to groups, removing unneeded ones, or
building up the list in parts.

Workaround
----------

Use rev 341 of lp:linaro-image-tools.

Solution
--------

1) Identify any unneeded panda bootargs and drop them from linaro-media-create (and somewhere else
as consoleblank=0 doesn't seem to come from linaro-image-tools)
2) Use double quotes around the whole of bootargs, as that still allows variable expansion, but can contain
any number(?) of arguments
3) Build up the bootargs in parts

setenv bootargs1 some arguments
setenv bootargs2 some other arguments
setenv bootargs ${bootargs1} ${bootargs2}

To make this general we would have to decide how many to put in one line (N), and know what to do
if we exceed N^2 (can we go multiple levels deep?)

Related branches

Revision history for this message
Alexander Sack (asac) wrote :

blocks 11.05

Changed in linaro-image-tools:
importance: Undecided → Critical
milestone: none → 0.4.8
status: New → Confirmed
James Westby (james-w)
description: updated
Revision history for this message
Andy Doan (doanac) wrote :

We had a discussion on IRC and I did a little digging. Not sure the exact issue, but I think its actually in u-boot. It seems to be some buffer limitation. Here's what I'm seeing:

== Works ==
setenv bootargs console=tty0 console=ttyO2,115200n8 rootwait ro earlyprintk fixrtc nocompcache vram=48M omapfb.vram=0:24M mem=456M@0x80000000 mem=512M@0xA0000000 init=/init androidboot.console=ttyO2 omapdss.def_disp=hdmi
Panda # setenv bootargs console=tty0 console=ttyO2,115200n8 rootwait ro earlyprintk fixrtc nocompcache vram=48M omapfb.vram=0:24M mem=456M@0x80000000 mem=512M@0xA0000000 init=/init androidboot.console=ttyO2 omapdss.def_disp=hdmi1
Panda # setenv bootargs console=tty0 console=ttyO2,115200n8 rootwait ro earlyprintk fixrtc nocompcache vram=48M omapfb.vram=0:24M mem=456M@0x80000000 mem=512M@0xA0000000 init=/init androidboot.console=ttyO2 omapdss.def_disp=hdmi12
Panda # setenv bootargs console=tty0 console=ttyO2,115200n8 rootwait ro earlyprintk fixrtc nocompcache vram=48M omapfb.vram=0:24M mem=456M@0x80000000 mem=512M@0xA0000000 init=/init androidboot.console=ttyO2 omapdss.def_disp=hdmi123
Panda # setenv bootargs console=tty0 console=ttyO2,115200n8 rootwait ro earlyprintk fixrtc nocompcache vram=48M omapfb.vram=0:24M mem=456M@0x80000000 mem=512M@0xA0000000 init=/init androidboot.console=ttyO2 omapdss.def_disp=hdmi1234567890

== FAILS ==
Panda # setenv bootargs console=tty0 console=ttyO2,115200n8 rootwait ro earlyprintk fixrtc nocompcache vram=48M omapfb.vram=0:24M mem=456M@0x80000000 mem=512M@0xA0000000 init=/init androidboot.console=ttyO2 omapdss.def_disp=hdmi a
setenv - set environment variables

Usage:
setenv name value ...
    - set environment variable 'name' to 'value ...'
setenv name
    - delete environment variable 'name'

So it looks like u-boot is choking when adding that last parameter ("a" in this example). I then did another test on this assumption. I think we might be at u-boot limit. I think it can only take a certain number of arguments in setenv:
 this works: setenv foo 1 2 3 4 5 6 7 8 9 A B C D E
 this fails: setenv foo 1 2 3 4 5 6 7 8 9 A B C D E F

James Westby (james-w)
description: updated
Revision history for this message
Andy Doan (doanac) wrote :

I don't think updating u-boot is the right approach (15 kernel arguments seems a little excessive). I recommend one of these two approaches within L-M-C:

1) use less options in the board class:
  console=tty0 doesn't seem needed for an android build?
  I'm also not sure about "vram=48M". i'm thinking "omapfb.vram=0:24M" is what the kernel uses?
 "consoleblank=0" that ogra_ mentioned

2) put double quotes (") around the arguments. This still allows for variable expansion. it was the single quotes that really caused the original problem

James Westby (james-w)
Changed in linaro-image-tools:
status: Confirmed → Fix Committed
assignee: nobody → James Westby (james-w)
James Westby (james-w)
Changed in linaro-image-tools:
status: Fix Committed → Fix Released
Fathi Boudra (fboudra)
Changed in u-boot-linaro:
assignee: nobody → John Rigby (jcrigby)
John Rigby (jcrigby)
Changed in u-boot-linaro:
status: New → Invalid
Mouna SAID (medmouna)
Changed in linaro-image-tools:
assignee: James Westby (james-w) → Mouna SAID (medmouna)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.