New IT forum
27 June 2022, 11:03:34 am *
Welcome, %1$s. Please login or register.

: CubieBoard 2 and Cubietruck both now in stock.
 
Pages: [1]

Author Topic: Whats wrong in the u-boot here...  (Read 4770 times)

ghat

  • Newbie
  • *
  • Posts: 22
Whats wrong in the u-boot here...
« on: 05 January 2014, 10:42:35 pm »

hi
I upgraded u-boot to the one in debian stable

Code: [Select]
Marvell>> version

U-Boot 2012.04.01 (Jun 01 2012 - 02:17:08)
Marvell-DreamPlug
gcc (Debian 4.6.3-5) 4.6.3
GNU ld (GNU Binutils for Debian) 2.22
Marvell>>

Next I was able to install debian stable to the micro-sd card (removable)
and I am able to set the u-boot env as follows.. I can get the debian to boot sort of manually
but I am not able to configure the u-boot env to boot it automatically. I have purposely set bootdelay to -1 so
it does not autofail...


Code: [Select]
Marvell>> printenv
baudrate=115200
bootargs=console=ttyS0,115200 root=/dev/sdb2 rootdelay=10
bootcmd=${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x00800000 0x01100000
bootdelay=-1
eth0addr=f0:ad:4e:00:xx:xx
eth1addr=f0:ad:4e:00:xx:xx
ethact=egiga0
ethaddr=f0:ad:4e:00:xx:xx
stderr=serial
stdin=serial
stdout=serial
x_bootargs=console=ttyS0,115200
x_bootargs_root=root=/dev/sdb2 rootdelay=10
x_bootcmd_ethernet=ping 192.168.2.1
x_bootcmd_kernel=ext2load usb 1:1 0x00800000 /uImage; ext2load usb 1:1 0x01100000 /uInitrd
x_bootcmd_usb=usb start

Environment size: 607/4092 bytes

Now look at the variable bootcmd

Code: [Select]
Marvell>> run bootcmd
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 5 USB Device(s) found
       scanning bus for storage devices... 2 Storage Device(s) found
ext2load - load binary file from a Ext2 filesystem

Usage:
ext2load <interface> <dev[:part]> [addr] [filename] [bytes]
    - load binary file 'filename' from 'dev' on 'interface'
      to address 'addr' from ext2 filesystem
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Marvell>> printenv
baudrate=115200
bootargs=console=ttyS0,115200 root=/dev/sdb2 rootdelay=10
bootcmd=${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x00800000 0x01100000
bootdelay=-1
eth0addr=f0:ad:4e:00:xx:xx
eth1addr=f0:ad:4e:00:xx:xx
ethact=egiga0
ethaddr=f0:ad:4e:00:xx:xx
stderr=serial
stdin=serial
stdout=serial
x_bootargs=console=ttyS0,115200
x_bootargs_root=root=/dev/sdb2 rootdelay=10
x_bootcmd_ethernet=ping 192.168.2.1
x_bootcmd_kernel=ext2load usb 1:1 0x00800000 /uImage; ext2load usb 1:1 0x01100000 /uInitrd
x_bootcmd_usb=usb start

Environment size: 607/4092 bytes

Marvell>> run x_bootcmd_usb
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 5 USB Device(s) found
       scanning bus for storage devices... 2 Storage Device(s) found
Marvell>> run x_bootcmd_kernel
Loading file "/uImage" from usb device 1:1 (usbdb1)
1609472 bytes read
Loading file "/uInitrd" from usb device 1:1 (usbdb1)
7450139 bytes read
Marvell>> setenv bootargs ${x_bootargs} ${x_bootargs_root}
Marvell>> bootm 0x00800000 0x01100000
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   kernel 3.2.0-4-kirkwood
   Created:      2014-01-04  18:56:57 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1609408 Bytes = 1.5 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   ramdisk 3.2.0-4-kirkwood
   Created:      2014-01-04  18:56:58 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7450075 Bytes = 7.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...
...
..
..
AND THE SYSTEM BOOTS UP...

basically the ext2load fails initially but works when done in steps...

can anyone tell where I m going wrong ?

G



« Last Edit: 06 January 2014, 11:33:07 am by ghat »
Logged

Confusticated

  • New IT customer
  • Hero Member
  • *
  • Posts: 663
Re: Whats wrong in the u-boot here...
« Reply #1 on: 06 January 2014, 12:13:23 am »

Quote
Usage:
ext2load <interface> <dev[:part]> [addr] [filename] [bytes]
    - load binary file 'filename' from 'dev' on 'interface'
      to address 'addr' from ext2 filesystem
The command arguments to 'ext2load' are incorrect (search this forum for examples).
I have not checked the validity of the rest of your u-boot settings.....
Logged
Advocatus Diaboli - My agenda is not to give you the answer, but to guide your thoughts so you derive it for yourself!

ghat

  • Newbie
  • *
  • Posts: 22
Re: Whats wrong in the u-boot here...
« Reply #2 on: 06 January 2014, 02:20:10 am »

please read the last code block, the ext2load params are correct they just dont work when they are part of the bootcmd variable

Is there a way to echo the commands as they are executed in u-boot like one does in "#!/bin/bash -xv"

G
« Last Edit: 06 January 2014, 10:39:47 am by ghat »
Logged

ghat

  • Newbie
  • *
  • Posts: 22
Re: Whats wrong in the u-boot here...
« Reply #3 on: 06 January 2014, 11:26:06 am »

Huh....

Well the thing is if you put 2 ext2loads in the env variable it wont work...
If I split it into two variables it works...

Code: [Select]
[email protected]:~# fw_printenv
baudrate=115200
bootdelay=-1
eth1addr=f0:ad:4e:00:xx:xx
ethact=egiga0
ethaddr=f0:ad:4e:00:xx:xx
stderr=serial
stdin=serial
stdout=serial
x_bootargs=console=ttyS0,115200
x_bootargs_root=root=/dev/sdb2 rootdelay=10
x_bootcmd_ethernet=ping 192.168.1.1
x_bootcmd_kernel=ext2load usb 1:1 0x00800000 /uImage; ext2load usb 1:1 0x01100000 /uInitrd
x_bootcmd_kernel_img=ext2load usb 1:1 0x00800000 /uImage
x_bootcmd_kernel_ini=ext2load usb 1:1 0x01100000 /uInitrd
x_bootcmd_usb=usb start
bootcmd=${x_bootcmd_usb}; ${x_bootcmd_kernel_img}; ${x_bootcmd_kernel_ini}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x00800000 0x01100000
[email protected]:~#

Thanks for all the help..
« Last Edit: 06 January 2014, 11:33:34 am by ghat »
Logged
Pages: [1]
 
 

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!