• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Howto update u-boot on guruplug plus?  (Read 7061 times)
firehawk
Newbie
*

Karma: 1
Posts: 10


View Profile
« on: May 22, 2010, 12:25:02 AM »

Hi,

I'm brand new to the guruplug. My plans are to install debian lenny on a SD card. But the shipped u-boot doesn't know the mmc and ext2load commands.

So I read many forum threads and it is clear now that I need to update the u-boot.

1. Can I use the prebuild u-boot from here: http://www.newit.co.uk/u-boot/uboot-3.4.27.bin ?

2. How can I build a custom u-boot for the guruplug? I think I need to follow the instructions on http://plugcomputer.org/plugwiki/index.php/Re-building_the_kernel_and_U-Boot.

BUT how can I cross compile on my Ubuntu notebook?

best regards,
FireHawk
Logged

ryazor
Newbie
*

Karma: 1
Posts: 14



View Profile
« Reply #1 on: May 22, 2010, 07:22:13 AM »

Same here!

I got my guru-plus few days ago and now want to boot the previous installed debian filesystem from NAND which I copied to an ext2 formatted microSD card from this microSD device. See: http://plugcomputer.org/plugwiki/index.php/SD_Card_As_Root_File_System

As firehawk pointed out, the default u-boot from the guruplug does not either offer 'mmc' nor 'ext2load' (version: 2009-11-rc1-00602-g28a9c08-dirty), so I'm enforced to compile a new u-boot for the plug.

The Link firehawk posted in his second point seems to be exactly the solution we need, but in this wiki article every CROSS_COMPILE argument is listed as a variable (<cross_compiler_prefix>), now I'm wondering which is the right value to this parameter (I use Arch Linux [2.6.33] as host system).

Thanks and regards,
ryazor
Logged

Mimoza
Newbie
*

Karma: 0
Posts: 16



View Profile
« Reply #2 on: May 23, 2010, 06:34:34 AM »

Here there everything for Guruplug(+), U-Boot, rootFS, Kernel and documentation ....

After it's the same way to upgrade a sheevaplug, so see here
Logged

ryazor
Newbie
*

Karma: 1
Posts: 14



View Profile
« Reply #3 on: May 24, 2010, 04:33:26 AM »

@ Mimoza: Thanks for your reply, I did the u-boot upgrade process described at cyrius.com with the USB method and I think I just bricked my plug  Roll Eyes
I could imagine, that the addresses described for the sheevaplug are invalid for the guruplug:
Code:
nand erase 0x0 0xa0000
nand write 0x0800000 0x0 0xa0000
But in fact I have no idea, whether this is correct or not. This is what now happens after I wrote the uboot image from plugcomputer.org (md5 d60aff3db94132d611413efab31ce373: uboot.guruplug.bin) and reset the plug:

Code:
U-Boot 2010.03-01161-gd91b0a9 (Apr 22 2010 - 03:24:41)
Marvell-GuruPlug

SoC:   Kirkwood 88F6281_A0
DRAM:  512 MB
NAND:  512 MiB
*** Warning - bad CRC or NAND, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0, egiga1
88E1121 Initialized on egiga0
88E1121 Initialized on egiga1
Hit any key to stop autoboot:  0
Marvell>> boot
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 4 USB Device(s) found
       scanning bus for storage devices... Device NOT ready
   Request Sense returned 02 3A 00
2 Storage Device(s) found

NAND read: device 0 offset 0x100000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 06400000 ...
   Image Name:   Linux-2.6.32-00007-g56678ec
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2789756 Bytes =  2.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

And that was it.. The kernel seems to be uncompressed but not bootable.. Any suggestions?

Thanks and regards,
ryazor
Logged

aszi1977
Newbie
*

Karma: 0
Posts: 1


View Profile
« Reply #4 on: May 24, 2010, 05:37:33 AM »

Sorry! I do not speak English!!! I am Hungarian.

http://plugcomputer.org/plugwiki/index.php/Reflashing_images_on_the_GuruPlug

kernel img: http://openplug.org/index.php/us/resources/downloads?func=fileinfo&id=66

tftp 0x6400000 <kernel image name>
nand erase 0x100000 0x400000
nand write.e 0x6400000 0x100000 0x400000

Rootfs img: http://openplug.org/index.php/us/resources/downloads?func=fileinfo&id=78

tftp 0x6400000 <rootfs image name>
nand erase 0x500000 0x1fb00000
nand write.e 0x6400000 0x500000 0x<number-of-hex-bytes-tftp-ed>

Nekem a rootfs img nem működött tftp-n
így oldottam meg:

USB pendrive. FAT32
rámásoltam a rootfs image-t utánna bele a guruplug server plusba

usb start
fatload usb 1:1 0x6400000 <kernel image name>
inne meg már ugyan az:
nand erase 0x500000 0x1fb00000
nand write.e 0x6400000 0x500000 0x<number-of-hex-bytes-tftp-ed>




Logged

firehawk
Newbie
*

Karma: 1
Posts: 10


View Profile
« Reply #5 on: May 24, 2010, 05:48:19 AM »

@ryazor

I updated to the same uboot version
Code:
Marvell>> version

U-Boot 2010.03-01161-gd91b0a9 (Apr 22 2010 - 03:24:41)
Marvell-GuruPlug

The "Warning - bad CRC or NAND, using default environment" seems to be ok after an u-boot update. This only states that the environment variables (see printenv) are reset to default.

I used following commands to update uboot (depends on running network and running tftp on host system):
Code:
tftp 0x6400000 uboot.guruplug.bin
nand erase 0x00000000 0x0100000
nand write 0x6400000 0x0000000 0x80000

http://oinkzwurgl.org/guruplug is very helpful!


The following environment (snippet) enables me to boot in the the factory kernel and rootfs.
Code:
bootcmd=${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000;
x_bootcmd_usb=usb start
x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000
x_bootargs=console=ttyS0,115200
x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs


In case you overriden your kernel in the nand, you can update the kernel with:
http://openplug.org/index.php/us/resources/downloads?func=fileinfo&id=66

Code:
tftp 0x6400000 uImage-guruplug
nand erase 0x100000 0x400000
nand write.e 0x6400000 0x100000 0x400000


hope this helps,
FireHawk
Logged

firehawk
Newbie
*

Karma: 1
Posts: 10


View Profile
« Reply #6 on: May 24, 2010, 05:56:49 AM »

Just in case you try to boot from sd card...

The following u-boot version has some limitations:
http://openplug.org/index.php/us/resources/downloads?func=fileinfo&id=71

Version:
Code:
U-Boot 2010.03-01161-gd91b0a9 (Apr 22 2010 - 03:24:41)
Marvell-GuruPlug

This version does not support:
 * loading from SD Cards
 * ext2 filesystems

You can :
 * load the kernel from a fat partition from usb or nand.
 * load the the rootfs from sd.

FireHawk
Logged

ryazor
Newbie
*

Karma: 1
Posts: 14



View Profile
« Reply #7 on: May 24, 2010, 07:05:27 AM »

In case you overriden your kernel in the nand, you can update the kernel with:
http://openplug.org/index.php/us/resources/downloads?func=fileinfo&id=66

Code:
tftp 0x6400000 uImage-guruplug
nand erase 0x100000 0x400000
nand write.e 0x6400000 0x100000 0x400000

Thank you very much firehawk! I just wrote the kernel to the NAND at these addresses, but from FAT32 USB device. I used the following command, instead of the 'tftp' line:
Code:
usb start
fatload usb 1:1 0x6400000 uImage-guruplug     # usb 1:1 is the _second_ usb interface, use usb 0:1 in the other case

I already recognized, that unfortunately the 'mmc' and the 'ext2load' commands are still lacking in this version of uboot. However, I'm now able to boot my previous configured debian.

I will now try to load the rootfs from SD.

Edit: I did not figure out how to load the rootfs from the microSD device right now. It always aborts booting with a kernel panic (not syncing). It tells, I have to correct the root parameter, and I got only mtdblock0 - 2 as available options. Although, a few lines above, it prints out 'mmc0: new high speed SDIO card at address 0001'. So I tried 'setenv x_bootargs_root root=/dev/mmc0' and '/dev/sdb1' (which is the SD card when booted from NAND). Could you give me a hint, where my fault is? :-)

Edit 2: Sorry for editing again. I found the solution, it is posted in this thread: http://plugcomputer.org/plugforum/index.php?topic=1642.0#msg10009 .
Code:
setenv x_bootargs_root root=/dev/sdb1 rootdelay=10
saveenv

Thanks again,
ryazor
« Last Edit: May 24, 2010, 10:39:46 AM by ryazor » Logged

firehawk
Newbie
*

Karma: 1
Posts: 10


View Profile
« Reply #8 on: May 24, 2010, 01:58:29 PM »

hi,

it seems that the SD is assigned to /dev/sdb*.
The internal SD (not working; no slot mounted) is assigned to /dev/sda*.
One USB port is assigned to /dev/sdc*.

ext2load is contained in the uboot of http://oinkzwurgl.org/guruplug_uboot.
But this doesn't support SD as well. Maybe the usb driver in u-boot doesn't recognize the sd.
AFAIK the sd on sheevaplug is connected differently (not via usb).

BTW:
I use the kernel 2.6.33.4 from http://sheeva.with-linux.com/sheeva/
This is booting on guruplug and U-Boot 2010.03-01161-gd91b0a9. Even without arcNumber & mainlineLinux environment.
I didn't check all devices and there are some error messages during boot. I'll work on this later.

I didn't manage to run the Debian Installer (http://www.cyrius.com/debian/kirkwood/sheevaplug/install.html)
But I got the rootfs from http://www.cyrius.com/debian/kirkwood/sheevaplug/unpack.html running with the default kernel and the sheeva.with-linux.com kernel.

FireHawk
Logged

ryazor
Newbie
*

Karma: 1
Posts: 14



View Profile
« Reply #9 on: May 25, 2010, 01:43:17 PM »

Thanks for your posts firehawk.

I tried kernel 2.6.33.4 and 2.6.34 from that mentioned website. Unfortunately the versions seem to have a lack of esata functionality (because the sheevaplug does not have an esata interface, I guess). However, I successfully built an image for the guruplug with all the needed features.

Actually I did the steps from [ http://plugcomputer.org/plugwiki/index.php/Re-building_the_kernel_and_U-Boot ] without mention any CROSS_COMPILE arguments on the guruplug. Thanks to oinkzwurgl.org, it offers a few great and helpful notes for mastering the device.

ryazor
Logged

flipflip
Jr. Member
**

Karma: 4
Posts: 50


Hopplaschorsch!


View Profile
« Reply #10 on: May 26, 2010, 12:59:24 AM »

Edit 2: Sorry for editing again. I found the solution, it is posted in this thread: http://plugcomputer.org/plugforum/index.php?topic=1642.0#msg10009 .
Code:
setenv x_bootargs_root root=/dev/sdb1 rootdelay=10
saveenv

Or you can use the "rootwait" option instead of "rootdelay=10". That waits until the root devicce becomes available.
Logged

GPS+ Debian Squeeze AP router firewall dhcpd named NAS Squeezebox OpenVPN All running fine.

ryazor
Newbie
*

Karma: 1
Posts: 14



View Profile
« Reply #11 on: May 26, 2010, 01:04:11 AM »

@flipflip: Thanks for your hint, I already found that uboot argument in one of your posts :-) Do you know, if it is possible to use the UUID of a device instead of /dev/sd**? When the external HDD is connected over esata the kernel seems to map the devices different on boot ( sdb --> sdc etc.). I already tried root=/dev/disk/by-UUID/* and root=UUID=* but without success.

ryazor
Logged

flipflip
Jr. Member
**

Karma: 4
Posts: 50


Hopplaschorsch!


View Profile
« Reply #12 on: May 26, 2010, 06:44:05 AM »

As far as I know that would require an initrd. There you have the /dev/disk/by-... links. I thin kthe kernel itself only knows the sd* device names.

I see sdb for the sd card even with an additional  hard disk attached.
Logged

GPS+ Debian Squeeze AP router firewall dhcpd named NAS Squeezebox OpenVPN All running fine.

fragfutter
Sr. Member
****

Karma: 12
Posts: 280


View Profile
« Reply #13 on: May 26, 2010, 07:13:30 AM »

As far as I know that would require an initrd. There you have the /dev/disk/by-... links. I thin kthe kernel itself only knows the sd* device names.
correct.
Logged

Mimoza
Newbie
*

Karma: 0
Posts: 16



View Profile
« Reply #14 on: May 26, 2010, 01:24:42 PM »

@ Mimoza: Thanks for your reply, I did the u-boot upgrade process described at cyrius.com with the USB method and I think I just bricked my plug  Roll Eyes
I could imagine, that the addresses described for the sheevaplug are invalid for the guruplug:
Code:
nand erase 0x0 0xa0000
nand write 0x0800000 0x0 0xa0000
But in fact I have no idea, whether this is correct or not. This is what now happens after I wrote the uboot image from plugcomputer.org (md5 d60aff3db94132d611413efab31ce373: uboot.guruplug.bin) and reset the plug:
Yep there some differnce between Shevva and Guru ... sorry
I think TFTP method should be a better way.
I'm not a guru of Guruplug  Grin

edit : I find this to upgrade the U-Boot for guruplug
« Last Edit: May 26, 2010, 02:17:09 PM by Mimoza » Logged

Pages: [1]
Print
Jump to: