New IT forum
27 June 2022, 05:42:23 am *
Welcome, %1$s. Please login or register.

: MiraBox now in stock.
 
Pages: [1] 2

Author Topic: Multiboot Dreamplug  (Read 34790 times)

NewITMalcolm

  • Administrator
  • Sr. Member
  • *****
  • Posts: 394
Multiboot Dreamplug
« on: 26 June 2011, 06:59:05 pm »

A multiboot Dreamplug and SD images will be available from the NewIT shop very shortly.

The configuration will attempt to boot from the SD card slot first and then the internal Micro SD.

We are planning to sell Debian Squeeze, GuiPlug and Ubuntu images on SD card (4Gb,8Gb,16Gb), images will also be available for free download.

The format of the SD card should be the same as the the internal microSD with a small FAT partition containing the 'uImage' and the rootfs on a second ext3 partition.

For those who have a jtag and wish to try it here's how.

Standard Factory Uboot configuration.
Code: [Select]
Marvell>> printenv

bootcmd=setenv ethact egiga0; ${x_bootcmd_ethernet}; setenv ethact egiga1; ${x_bootcmd_ethernet}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000;
bootdelay=3
baudrate=115200
x_bootcmd_ethernet=ping 192.168.2.1
x_bootcmd_usb=usb start
x_bootcmd_kernel=fatload usb 0 0x6400000 uImage
x_bootargs=console=ttyS0,115200
x_bootargs_root=root=/dev/sda2 rootdelay=10
ethact=egiga0
ethaddr=F0:AD:4E:00:7C:xx
eth1addr=F0:AD:4E:00:7C:xx
stdin=serial
stdout=serial
stderr=serial

Environment size: 524/4092 bytes

*EDIT* I recommend the following commands are cut & paste a line at a time and you do a 'printenv' before the 'savenv' to make sure all look's ok

Commands to convert a standard Dreamplug to a multiboot
Code: [Select]
setenv bootcmd_sdb 'setenv bootargs console=ttyS0,115200 root=/dev/sdb2 panic=10 rootwait; usb start; run boot_sdb;'
setenv boot_sdb 'fatload usb 1 0x6400000 uImage; bootm 0x6400000;'
setenv bootcmd_sda '${bootcmd_eth}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000;'
setenv bootcmd_eth 'setenv ethact egiga0; ${x_bootcmd_ethernet}; setenv ethact egiga1; ${x_bootcmd_ethernet}'
setenv clear_kernel_in_mem 'echo Purging kernel in memory; mw 0x6400000 0x0 0x300000'
setenv bootcmd 'run clear_kernel_in_mem; run bootcmd_sdb; run bootcmd_sda'
saveenv

Multibooted Uboot variables
Code: [Select]
Marvell>> printenv

bootdelay=3
baudrate=115200
x_bootcmd_ethernet=ping 192.168.2.1
x_bootcmd_usb=usb start
x_bootcmd_kernel=fatload usb 0 0x6400000 uImage
x_bootargs=console=ttyS0,115200
x_bootargs_root=root=/dev/sda2 rootdelay=10
ethact=egiga0
ethaddr=F0:AD:4E:00:7C:xx
eth1addr=F0:AD:4E:00:7C:xx
stdin=serial
stdout=serial
stderr=serial
bootcmd_sdb=setenv bootargs console=ttyS0,115200 root=/dev/sdb2 panic=10 rootwait; usb start; run boot_sdb;
boot_sdb=fatload usb 1 0x6400000 uImage; bootm 0x6400000;
bootcmd_sda=${bootcmd_eth}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000;
bootcmd_eth=setenv ethact egiga0; ${x_bootcmd_ethernet}; setenv ethact egiga1; ${x_bootcmd_ethernet}
clear_kernel_in_mem=echo Purging kernel in memory; mw 0x6400000 0x0 0x300000
bootcmd=run clear_kernel_in_mem; run bootcmd_sdb; run bootcmd_sda

Environment size: 864/4092 bytes

Booting from internal MicroSD (sda)
Code: [Select]
U-Boot 2011.06-02334-g8f495d9-dirty (Mar 28 2011 - 05:21:06)
Marvell-DreamPlug

SoC:   Kirkwood 88F6281_A0
DRAM:  512 MiB
SF: Detected MX25L1606 with page size 256, total 1 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0, egiga1
88E1121 Initialized on egiga0
88E1121 Initialized on egiga1
Hit any key to stop autoboot:  3 \0x08\0x08\0x08 2 \0x08\0x08\0x08 1 \0x08\0x08\0x08 0
Purging kernel im memory
(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
Device NOT ready
   Request Sense returned 02 3A 00
** Can't read from device 1 **

** Unable to use usb 1:1 for fatload **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
(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
reading uImage

2712400 bytes read
## Booting kernel from Legacy Image at 06400000 ...
   Image Name:   Linux-2.6.33.6
   Created:      2011-02-08   8:18:48 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2712336 Bytes = 2.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...


Booting from SD card boot (sdb)
Code: [Select]
U-Boot 2011.06-02334-g8f495d9-dirty (Mar 28 2011 - 05:21:06)
Marvell-DreamPlug

SoC:   Kirkwood 88F6281_A0
DRAM:  512 MiB
SF: Detected MX25L1606 with page size 256, total 1 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0, egiga1
88E1121 Initialized on egiga0
88E1121 Initialized on egiga1
Hit any key to stop autoboot:  3 \0x08\0x08\0x08 2 \0x08\0x08\0x08 1 \0x08\0x08\0x08 0
Purging kernel in memory
(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... 2 Storage Device(s) found
reading uImage

2584076 bytes read
## Booting kernel from Legacy Image at 06400000 ...
   Image Name:   Linux-2.6.38.8
   Created:      2011-06-14   7:43:29 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2584012 Bytes = 2.5 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...
« Last Edit: 22 October 2011, 09:36:27 am by NewIT_James »
Logged
NewITJames

fh9977

  • Newbie
  • *
  • Posts: 20
Re: Multiboot Dreamplug
« Reply #1 on: 27 June 2011, 01:03:04 pm »

Hi James,

Are you building this using the Debian installer (uInitrd)?
Where can I find a reliable uImage/uInitrd combo?
I tried several sources at the weekend. Some didn't work at all and installer didin't even start (incompatible uImage and UInitrd versions), others worked up to the installer completion but I uImage could not be loaded when booting up.

According to http://sheeva.with-linux.com/sheeva/, kernel version is 2.6.39. Any reason you're using 2.6.33 in SDA and 2.6.38 in SDB?

Thanks,
Fabio
Logged

NewITMalcolm

  • Administrator
  • Sr. Member
  • *****
  • Posts: 394
Re: Multiboot Dreamplug
« Reply #2 on: 27 June 2011, 01:16:34 pm »

Hi Fabio

Quote
Are you building this using the Debian installer (uInitrd)?
No, it does not use a uInitrd. The norm for the Sheeva and Dream is to just use a uImage.

Quote
According to http://sheeva.with-linux.com/sheeva/, kernel version is 2.6.39. Any reason you're using 2.6.33 in SDA and 2.6.38.8 in SDB?

If you are referring to the GuiPlug kernel I am sure you will appreciate it takes me several days to build and test everything out and 2.6.38.8 was the latest when I started out. Also the .38 kernel has had a little longer to mature with fixes.

The 2.6.33.6 is the standard kernel that comes supplied with the Dreamplug.

NewITJames
Logged
NewITJames

fh9977

  • Newbie
  • *
  • Posts: 20
Re: Multiboot Dreamplug
« Reply #3 on: 28 June 2011, 11:20:47 am »

Hi James,
Thanks for the info about the kernel versions. I do appreciate the time it takes to install, test, etc. And you have a good point that 2.38 has had more time to stabilize.

About the uInitrd, I tried the tutorials on how to install Debian executing the installer (copy uImage and uInitrd to SD card, bootcmd reads uImage and uInitrd, Debian installer kicks off and installs Debian in SD - full tutorial is here: http://www.cyrius.com/debian/kirkwood/sheevaplug/install.html). Should be straight forward but finding a reliable version of uImage and uInitrd that work together has been hard.

If you want some help to test the images pvt me with the link and I'll give it a go tonight.

Best regards,
FH
Logged

newtothis

  • Newbie
  • *
  • Posts: 1
Re: Multiboot Dreamplug
« Reply #4 on: 30 June 2011, 09:20:02 pm »

Hi James,

I noticed the following from your first post in this thread:

"We are planning to sell Debian Squeeze, GuiPlug and Ubuntu images on SD card (4Gb,8Gb,16Gb), images will also be available for free download."

Could you tell me where I could find those images when they become available?

Thanks very much!



Logged

PacoLM

  • Full Member
  • ***
  • Posts: 108
Logged

Kevin

  • Newbie
  • *
  • Posts: 17
Re: Multiboot Dreamplug
« Reply #6 on: 29 August 2011, 12:48:39 am »

I received my Ubuntu DreamPlug back in May but sadly it's been gathering dust on my desk since then because of work and holidays.  I finally got round to plugging it in today and it came up first time, so I was able to connect to the wifi AP and ssh to it.  So far so good.

So now I'm looking at how to boot an alternate image, which I'd like to do from SD card because I don't want to brick the thing by messing up the internal NAND/uSD.  But it seems that in order to do that I need to have the JTAG add-on so that I can interrupt the boot sequence in order to change the uBoot parameters.

Have I got this right?  It seems a bit mad that I can't change the boot options from a normal ssh login shell.

Is there any way of getting the DreamPlug to boot from SD if I don't have a JTAG adapter?  Ideally something I can do by SSHing over wifi, but maybe there's some way of connecting a terminal to the UART port without coughing up 25 quid for something I wasn't expecting to need.

Thanks
Logged

AlterAnthony

  • Newbie
  • *
  • Posts: 6
Re: Multiboot Dreamplug
« Reply #7 on: 02 September 2011, 11:39:16 pm »

I have two questions regarding the described procedure:
  • Is this the same procedure you (NewIT folk) use to create GUI DreamPlugs?
  • When the DreamPlug boots from the internal SD card, can the external SD card be mounted as usual and used just for storage?

Thank you in advance.
Logged

NewITMalcolm

  • Administrator
  • Sr. Member
  • *****
  • Posts: 394
Re: Multiboot Dreamplug
« Reply #8 on: 03 September 2011, 07:01:59 am »

Quote
Is this the same procedure you (NewIT folk) use to create GUI DreamPlugs?

Yes.


Quote
When the DreamPlug boots from the internal SD card, can the external SD card be mounted as usual and used just for storage?

Yes and if you boot from the external SD you can still use the internal uSD for storage.


NewITJames
Logged
NewITJames

Ralph Houston

  • New IT customer
  • Full Member
  • *
  • Posts: 136
Re: Multiboot Dreamplug
« Reply #9 on: 13 September 2011, 10:17:47 pm »

Please note: I've found and corrected two bugs in this code since originally posted on 13 September (missing semicolons, error in one command). Also added some echo lines.

I've written a boot sequence that tries to boot off any devices it can find. It's based on James's code above:
http://www.newit.co.uk/forum/index.php/topic,2231.msg6288.html#msg6288
and tries four locations in sequence:
  • sdd - a second USB device
  • sdb - the external SD
  • sdc - a first USB device
  • sda - the internal SD

I've simplified the entries to reduce typing and risk of errors and shorten the lines.
It doesn't try to boot from Ethernet.
Some of the lines are left from previous versions.
I don't know what 'boota' is but it seems built in.

I had a big problem booting from /dev/sda, the internal SD card, (perhaps) due to semicolons missing from the four lines beginning with 'boot_', and certainly an error in 'bootcmd_eth'.

Code: [Select]
Marvell>> printenv
baudrate=115200
ethaddr=F0:AD:4E:00:7E:15
eth1addr=F0:AD:4E:00:7E:16
bootdelay=10
boota=x_bootargs_root root=/dev/sdc2 rootdelay=10
mainlineLinux=yes
arcNumber=2659
bootcmd_eth=setenv ethact egiga0; ${x_b_e}; setenv ethact egiga1; ${x_b_e};
ethact=egiga0
clr_k=echo Purging kernel; mw 0x6400000 0x0 0x300000
x_b_e=ping 192.168.2.1
x_b_u=usb start
x_b=console=ttyS0,115200
x_ba=root=/dev/sda2 panic=10 rootwait
x_bb=root=/dev/sdb2 panic=10 rootwait
x_bc=root=/dev/sdc2 panic=10 rootwait
x_bd=root=/dev/sdd2 panic=10 rootwait
x_fa=fatload usb 0 0x6400000 uImage
x_fb=fatload usb 1 0x6400000 uImage
x_fc=fatload usb 2 0x6400000 uImage
x_fd=fatload usb 3 0x6400000 uImage
x_bm=bootm 0x6400000
boot_a=echo ** sda/usb 0 **; ${x_b_u}; setenv bootargs ${x_b} ${x_ba}; ${x_fa}; ${x_bm};
boot_b=echo ** sdb/usb 1 **; ${x_b_u}; setenv bootargs ${x_b} ${x_bb}; ${x_fb}; ${x_bm};
boot_c=echo ** sdc/usb 2 **; ${x_b_u}; setenv bootargs ${x_b} ${x_bc}; ${x_fc}; ${x_bm};
boot_d=echo ** sdd/usb 3 **; ${x_b_u}; setenv bootargs ${x_b} ${x_bd}; ${x_fd}; ${x_bm};
bootcmd=run clr_k; run boot_d; run boot_b; run boot_c; run boot_a
stdin=serial
stdout=serial
stderr=serial

Any comments?
« Last Edit: 17 September 2011, 07:51:03 pm by Ralph Houston »
Logged

Ralph Houston

  • New IT customer
  • Full Member
  • *
  • Posts: 136
Re: Multiboot Dreamplug
« Reply #10 on: 16 September 2011, 04:46:31 pm »

WARNING everybody!

The code above had two bugs (missing semicolon, error in one command) that stopped it working under some circumstances!

The four lines beginning 'boot_' each needed a semicolon at the end.
The 'bootcmd_eth' had errors.

The current version is more reliable, particularly from the internal micro SD (sda).

Sorry!
« Last Edit: 17 September 2011, 07:53:24 pm by Ralph Houston »
Logged

Ralph Houston

  • New IT customer
  • Full Member
  • *
  • Posts: 136
Re: Multiboot Dreamplug
« Reply #11 on: 19 September 2011, 07:19:03 pm »

Another update!

Booting off sdc and sdd is unreliable as the relationship between usb 2/3 and sdc/d is not fixed- the operating system frequently finds the wrong root system, causing havoc. A single extra device with two partitions (uImage and root) is often seen as usb 2/sdc and then works, but not always.

Any suggestions?
Logged

NewITMalcolm

  • Administrator
  • Sr. Member
  • *****
  • Posts: 394
Re: Multiboot Dreamplug
« Reply #12 on: 19 September 2011, 08:01:55 pm »

Ralph,

That's exactly why I stuck with booting from sdb/sda only.

NewITJames
Logged
NewITJames

dab7

  • Newbie
  • *
  • Posts: 24
Re: Multiboot Dreamplug
« Reply #13 on: 21 October 2011, 09:50:23 pm »

I have now seen 3 versions of u-boot on Dreamplugs, namely;

U-Boot 2011.06-02334-g8f495d9-dirty (Mar 01 2011 - 06:57:05)
U-Boot 2011.06-02334-g8f495d9-dirty (Mar 28 2011 - 05:21:06)
U-Boot 2011.06-02334-g8f495d9-dirty (May 31 2011 - 02:06:26)

The last of these(May 31) does not fix sda1/sda2 to the uSD/SD, so multi-boot setups will may fail when an external USB drive is attached at boot time.

If anyone has a devised a solution to the May 31 problem, I would love to hear about it.
Logged

Ralph Houston

  • New IT customer
  • Full Member
  • *
  • Posts: 136
Re: Multiboot Dreamplug
« Reply #14 on: 21 October 2011, 10:30:16 pm »

Is labelling the root partition the answer?

Concerning the device order problem (/sda/sdb/sdc/sdd), it seems that there is a workaround: using a disk label.
Set up a label with the e2label command (ie: e2label /dev/sda bootdisk), then, at the boot prompt, add the following parameter: root=LABEL=bootdisk

I'm looking for a solution here too.
Logged
Pages: [1] 2
 
 

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