usb start in uEnv.txt fails with test - minimal test >>> like /bin/sh

Bug #820116 reported by mahmoh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
u-boot-linaro (Ubuntu)
Fix Released
Medium
John Rigby

Bug Description

Build Version/Date: u-boot-linaro-omap4-panda_2011.07.2-0ubuntu1_armel.deb
Environment used for testing: pandaboard A2

Summary: usb start in uEnv.txt fails with test - minimal test >>> like /bin/sh

Steps to Reproduce: boot with no boot.scr, and uEnv.txt:
    autoload=no
    uenvcmd=usb start; pxe get; pxe boot; mmcinfo; fatload ...

Expected result: u-boot initializes usb devices and continues on

Actual result: u-boot fails to initialize usb devices and skips instructions

<START: no boot.scr, uEnv.txt: uenvcmd=usb start; pxe get; pxe boot; mmcinfo; fatload ... >
...
reading boot.scr

** Unable to read "boot.scr" from mmc 0:1 **
reading uEnv.txt

323 bytes read
Importing environment from mmc ...
test - minimal test like /bin/sh

Usage:
test [args..]
reading uImage

4174740 bytes read
Booting from mmc0 ...
## Booting kernel from Legacy Image at 82000000 ...
   Image Name: Ubuntu Kernel
   Image Type: ARM Linux Kernel Image (uncompressed)
   Data Size: 4174676 Bytes = 4 MiB
   Load Address: 80008000
   Entry Point: 80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK
...
<END>

Related branches

Revision history for this message
John Rigby (jcrigby) wrote :

with this uEnv.txt:
autoload=no
uenvcmd=usb start; bootp; pxe get; pxe boot

I get this:
Texas Instruments X-Loader 1.5.1 (Jul 26 2011 - 00:40:14)
Reading boot sector
Loading u-boot.bin from mmc

U-Boot 2011.06 (Jul 27 2011 - 00:58:33)

CPU : OMAP4430
Board: OMAP4 Panda
I2C: ready
DRAM: 1 GiB
MMC: OMAP SD/MMC: 0
Using default environment

In: serial
Out: serial
Err: serial
Net: No ethernet found.
Hit any key to stop autoboot: 0
reading boot.scr

** Unable to read "boot.scr" from mmc 0:1 **
reading uEnv.txt

78 bytes read
Importing environment from mmc ...
Running uenvcmd ...
(Re)start USB...
USB: Register 1313 NbrPorts 3
USB EHCI 1.00
scanning bus for devices... The request port(2) is not configured
The request port(2) is not configured
3 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
       scanning bus for ethernet devices... 1 Ethernet Device(s) found
Waiting for Ethernet connection... done.
BOOTP broadcast 1
EHCI timed out on TD - token=0x8008d80
BOOTP broadcast 2
*** Unhandled DHCP Option in OFFER/ACK: 28
*** Unhandled DHCP Option in OFFER/ACK: 28
DHCP client bound to address 10.42.43.50
missing environment variable: pxeuuid
missing environment variable: ethaddr
Retreiving file: pxelinux.cfg/2E-40-4F-F6-6C-0A
Waiting for Ethernet connection... done.
Using sms0 device
TFTP from server 10.42.43.1; our IP address is 10.42.43.50
Filename 'pxelinux.cfg/2E-40-4F-F6-6C-0A'.
Load address: 0x88000000
Loading: #
done
Bytes transferred = 508 (1fc hex)
Config file found
Ignoring malformed menu command: label
Ignoring malformed menu command: label
Hit any key to stop autoboot: 0
Label: linux-2.6.38
        kernel: kernels/linux-2.6.38.bin
        append: root=/dev/sdb1
Retreiving file: kernels/linux-2.6.38.bin
Waiting for Ethernet connection... done.
Using sms0 device
TFTP from server 10.42.43.1; our IP address is 10.42.43.50
Filename 'kernels/linux-2.6.38.bin'.
Load address: 0x80200000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
File not found
Skipping label
Label: install
        kernel: kernels/install.bin
        append: console=ttyAMA0,38400 debug earlyprintk
        initrd: initrds/uzInitrdDebInstall
Retreiving file: initrds/uzInitrdDebInstall
Waiting for Ethernet connection... done.
Using sms0 device
TFTP from server 10.42.43.1; our IP address is 10.42.43.50
Filename 'initrds/uzInitrdDebInstall'.
Load address: 0x81600000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
File not found
Skipping label
Label: local
        append: root=/dev/sdb1
missing environment variable: localcmd
reading uImage

3610768 bytes read
Booting from mmc0 ...
## Booting kernel from Legacy Image at 82000000 ...
   Image Name: Ubuntu Kernel
   Image Type: ARM Linux Kernel Image (uncompressed)
   Data Size: 3610704 Bytes = 3.4 MiB
   Load Address: 80008000
   Entry Point: 80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Revision history for this message
John Rigby (jcrigby) wrote :

mahmoh, can you pastebin your uEnv.txt file?

Revision history for this message
mahmoh (mahmoh) wrote :

#pxecfg_ram=0x82000000
#ethaddr=00:02:03:04:05:06
#usbethaddr=00:02:03:04:05:06
autoload=no
bootargs=ro root=/dev/sda2 console=ttyO2,115200 debug earlyprintk elevator=deadline
uenvcmd=usb start; pxe get; pxe boot; mmcinfo; fatload mmc 0:1 0x80000000 uimage; fatload mmc 0:1 0x81600000 uinitrd; bootm 0x80000000 0x81600000

Revision history for this message
John Rigby (jcrigby) wrote :

mahmoh, ok weird problems in u-boot, the uenvcmd variable does not get expanded properly. Working on that.

Another issue, your uenvcmd is missing a "bootp" after "usb start".

Changed in u-boot-linaro (Ubuntu):
assignee: nobody → John Rigby (jcrigby)
status: New → Confirmed
Revision history for this message
John Rigby (jcrigby) wrote :

U-Boot is getting an error parsing the uenvcmd env setting. The current limit of number of tokens in a command line is 16, normally you can get around this by quoting things to put them in a single token but for some reason the import env doesn't grok that correctly so as an alternate work around you can split the command. Looks like you want to do a normal mmc boot if the pxe boot does not work so this should do the trick (works for me at least):

#pxecfg_ram=0x82000000
#ethaddr=00:02:03:04:05:06
#usbethaddr=00:02:03:04:05:06
autoload=no
bootargs=ro root=/dev/sda2 console=ttyO2,115200 debug earlyprintk elevator=deadline
#uenvcmd=usb start; bootp; pxe get; pxe boot; mmcinfo; fatload mmc 0:1 0x80000000 uimage; fatload mmc 0:1 0x81600000 uinitrd; bootm 0x80000000 0x81600000
mmcbootcmd=mmcinfo; fatload mmc 0:1 0x80000000 uimage; fatload mmc 0:1 0x81600000 uinitrd; bootm 0x80000000 0x81600000
uenvcmd=usb start; bootp; pxe get; pxe boot; run mmcbootcmd

The next release of u-boot-linaro will change the max args from 16 to 32 so this will be fixed but the work around is still a good idea because separating env commands into named subcommands serves to document what you are doing.

Revision history for this message
mahmoh (mahmoh) wrote :

Unsure if you meant that you were going to add it to the documentation but that may be a good idea too? I'll try the above out, Thank you.

Revision history for this message
John Rigby (jcrigby) wrote :

Not sure what you want documented here? The bogus handling of long env commands?

Changed in u-boot-linaro (Ubuntu):
importance: Undecided → Medium
Revision history for this message
John Rigby (jcrigby) wrote :

The MAX_ARGS change from 16 to 32 was committed 19Sep2011 so marking this fix released.

Changed in u-boot-linaro (Ubuntu):
status: Confirmed → Fix Released
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.