• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Dreamplug esata boot  (Read 3910 times)
spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« on: June 06, 2011, 06:42:45 AM »

Does anyone know if it is possible to make uBoot boot from a dreamplug esata drive.

Using the dp supplied uBoot -
uBoot sees the USB device which is the sata drive but does not see any of the fat16 partitions that I put on it.


Code:
Marvell>> usb device 3

USB device 3:
    Device 3: Vendor: WD       Rev: 1032 Prod: SES Device
            Type: # 0D #
            Capacity: 90112.1 MB = 88.0 GB (1074462721 x 131072)

Marvell>> fatinfo usb 3
** Can't read from device 3 **



Fdisk shows
Code:
Disk /dev/sdd: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb8077146

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1       30121   241938869   83  Linux
/dev/sdd2           30121       30130       72293    6  FAT16
/dev/sdd3           30130       30139       72293   83  Linux
/dev/sdd4           30139       30402     2115097+  82  Linux swap / Solaris


Anyone?
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #1 on: June 06, 2011, 10:30:13 AM »

Since the default uboot does not support ext2, you will need to use fat.

make sure your kernel on the fat parition then do

ide start

fatload ide 0:2 /kernel
Logged

Good Luck Smiley

spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« Reply #2 on: June 06, 2011, 06:46:18 PM »

Marvell>> version

U-Boot 2011.06-02334-g8f495d9-dirty (Mar 28 2011 - 05:21:06)
Marvell-DreamPlug
Marvell>> ide start
Unknown command 'ide' - try 'help'
Marvell>>
Marvell>> usb part

Partition Map for USB device 0  --   Partition Type: DOS

Partition     Start Sector     Num Sectors     Type
    1                 6954           34770       6
    2                41724         7670262      83


Partition Map for USB device 1  --   Partition Type: DOS

Partition     Start Sector     Num Sectors     Type
    1                   16            8240       6
    2                 8256         7765952      83
Marvell>>



Thanks for the reply, 'ide' did not occur to me.
The uBoot on my dreamplug does not have the 'ide' command, I guess I need a new uBoot.
My other alternative is to load uImage from the uSD and set the root= to the sata drive.
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #3 on: June 07, 2011, 09:39:27 AM »

Sorry, I did not notice the default u-boot for dreamplug does not have 'ide' subsystem.

Using kernel from one device and rootfs from another device is a goos solution too.

Good luck Smiley
Logged

Good Luck Smiley

spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« Reply #4 on: June 07, 2011, 01:17:17 PM »

Sorry, I did not notice the default u-boot for dreamplug does not have 'ide' subsystem.

Using kernel from one device and rootfs from another device is a goos solution too.

Good luck Smiley

Except I cannot see how to to do a multiboot solution using this approach.

This is a BACKWARD step for uBoot on plugs.
I have a very old esata Sheevaplug and I can load a kernel from it.

Tell me pingtoo, is it possible to replace uBoot on a Dreamplug?
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #5 on: June 09, 2011, 06:24:15 AM »

Yes, it is possible to replace u-boot. I have a version in test, if you want to take the risk I can send it to you. I finish the build but have not have time to test it complete. I know it work because I load it in to memory and played with usb, and ide. however this version will erase environment variables in NOR, you will need to re-enter them manually.
Logged

Good Luck Smiley

spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« Reply #6 on: June 12, 2011, 12:12:16 AM »

The program in the Meteohub setup can be used to load environment vars.  http://www.meteohub.de/files/dreamplug-installer.tgz
And yes I would like to see you uBoot (source, patches and instructions for a test and load would be helpful).
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #7 on: June 15, 2011, 09:06:30 PM »

@spinifex

Attached are two u-boot files for dreamplug, one is used for testing/load, the other is bootable version.

The code is still in development, so little bit of debug information but it does very little impact on performance.

The kernel can be used by this u-boot need to have guruplug machine type or else you will get the silent treatment.

The kernel also must not probe NAND or else you will get stuck at "loop: module loaded" line.

Now how to setup the u-boot. There are three major step/phase.
1. save existing environment by boot to normal u-boot prompt and use the "printenv" command the select/cut/paste the result to a file.

2. load the first u-boot.bin to have a runtime version. NOTE, this u-boot.bin is not bootable, do not flash this one. commands,
2.1 open serial windows, i.e. putty /dev/ttyUSB0 (not the right command, just to illustrate the idea.)
2.2 At you unix host, using openocd to connect then on second windows do telnet localhost 4444 to get openocd prompt. as follow,
Code:
openocd -f plug_openocd.script
, second windows,
Code:
telnet localhost 4444
your will see this
Code:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
>
, do following,
Code:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> init
> kirkwood_init
> load_image /path/to/u-boot-base0x800000.bin bin 0x800000 bin
> resume 0x800000
Now at your serial tty window, interupt the auto boot sequence. you should be at "Marvell>> " prompt. At this point you can play around, nothing have damaged your existing environment, a reset command will bring you back to factory shipped u-boot. (Note, you may lost the u-boot env, this is to be expected, because I use a different address offset on the NOR)
3. flash the bootable u-boot.
3.1 copy the "u-boot.kwb" to a media that can later plugin to dreamplug. (FAT or EXT2)
3.2 At serial tty windows, do (use media SD card as example)
Code:
Marvell>> usb reset
Marvell>> ext2load usb 1 0x6400000 /u-boot.kwb
Marvell>> sf probe 0
Marvell>> sf erase 0x0 0x100000
Marvell>> sf write 0x6400000 0x0 0x100000
# Now retype your u-boot env ... (example)
Marvell>> setenv ethaddr 00:11:22:33:44:55
Marvell>> setenv eth1addr 00:11:22:33:44:56
Marvell>> setenv bootargs console=ttyS0,152000 rdinit=/bin/sh
Marvell>> setenv ...
Marvell>> saveenv
Marvell>> reset

All done. new u-boot looks like this
Code:
U-Boot 2011.03-00012-g1a93b51-dirty-pingtoo-v1.2 (Jun 15 2011 - 22:44:57)
Marvell-DreamPlug

SoC:   Kirkwood 88F6281_A1
DRAM:  512 MiB
SF: Got idcodes
00000000: c2 20 15 c2 20    . ..
SF: Detected MX25L1605D with page size 256, total 2 MiB
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>>



* plug_openocd.script (5.93 KB - downloaded 208 times.)
* u-boot-base0x800000.bin (205.61 KB - downloaded 129 times.)
* u-boot.kwb (206.11 KB - downloaded 131 times.)
« Last Edit: June 15, 2011, 09:08:16 PM by pingtoo » Logged

Good Luck Smiley

Pages: [1]
Print
Jump to: