• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1] 2
Author Topic: Multi Boot. Question RE: CqCn comment...  (Read 6671 times)
badcam
Jr. Member
**

Karma: 1
Posts: 78


View Profile
« on: November 23, 2009, 12:56:04 AM »

I've finally managed to get my Sheeva working (using a really really old USB dongle as none of my new ones seem to want to work).

I'd really like to be able to set up the Multi Boot as described here:

http://www.plugcomputer.org/plugwiki/index.php/Multi-Boot

This comment was added by CqCn and I'd greatly appreciate it if someone could point me to a link that shows what I need to do, or if it could be explained simply to me:

"Note added by CqCn: [per restamp] This method will not work if the kernel is in nand, and you want to start from your rootfs from one of two or more places. This works when the kernel is in the same place along with the rootfs."

Just to be clearer; It this comment that I don't understand, not the Multi Boot instructions.

Thanks.
Logged

emstester
Newbie
*

Karma: 1
Posts: 24


View Profile
« Reply #1 on: November 23, 2009, 01:54:53 AM »

just giving my shot but haven't tried it yet on my setup,

it means that the kernel and rootfs should be in nand if you want to boot on nand,
Kernel and rootfs should be in SD if you want to run SD
kernel and rootfs should be on USB if you want to run on USB

so nand, SD and USB should have its own kernel and rootfs in place. more on SD should not only contain the rootfs but also the kernel if you want to boot on SD.
Logged

badcam
Jr. Member
**

Karma: 1
Posts: 78


View Profile
« Reply #2 on: November 23, 2009, 02:45:58 AM »

Thanks.

That's what I'm looking for. So really, all I have to do is:

Install to Nand first
SD second
USB third.

and presumably just put the Uboot changes in place as per the Multi Boot How To, before proceeding.

Sweet. Cool
Logged

emstester
Newbie
*

Karma: 1
Posts: 24


View Profile
« Reply #3 on: November 23, 2009, 02:52:24 AM »

then choose which one comes first by setting bootcmd priority on where you want your system to load.

bootcmd=run bootcmd_usb; run bootcmd_sd; run bootcmd_nand;
Logged

badcam
Jr. Member
**

Karma: 1
Posts: 78


View Profile
« Reply #4 on: November 24, 2009, 12:45:42 AM »

Now, here comes the stupid question...  Grin

 Tongue How do I actually do this? I asusme that after first installing the kernal to nand, I then run the commands listed in the "How To" one at a time. Or, do I change the details in the \uboot\uboot-env uboot-nand-custom.txt & uboot-mmc-custom.txt files?

I'd like to set up all three options Nand/SD Card/USB Drive.

Thanks for your patience.
Logged

rexxmagnus
Newbie
*

Karma: 0
Posts: 6


View Profile
« Reply #5 on: November 24, 2009, 01:21:21 PM »

I've been banging away at this all weekend, and finally managed to get it to work this evening. The process is slightly different, and I've had to pull from various different sources in order to find a setup that works in my case (single partitions on the USB/MMC/NAND).

All of this was performed after installing using the updater v1.0. It seems the nand is jffs, not ubifs - the required lines may need to be different, but they're documented on the wiki.

Procedure for partitioning and formatting MMC:
>fdisk /dev/mmcblk0
   press "o"  / create a new partition table
   press "n"  / create a new partition
   press "p"  / it's a primary partition
   press "1"  / partition #1
   press enter / default first cylinder
   press enter / default last cylinder
   press "a"  / set the boot flag
   press "1" / ... for partition #1
   press "w" / save changes
   
>mkfs -t ext2 (or ext3, if you wish) /dev/mmcblk0p1
>mkdir /mnt/sdcard
>mount /dev/mmcblk0p1 /mnt/sdcard
>df

Copy NAND to card (quick and dirty - works better when not copying from active filesystem):

>cp -ax / /mnt/sdcard # takes 13 minutes
>cp -a /dev /mnt/sdcard

Virtually identical for USB booting, using sda1 as the partition to mount and copy to, whilst sda is the device to partition.

Multiboot environment variables to be set at the marvell>> prompt (I've separated the lines for clarity - if using CU you can copy and paste to it):

setenv bootargs_sd 'console=ttyS0,115200 rw root=/dev/mmcblk0p1 rootdelay=5'

setenv bootcmd_sd 'setenv bootargs $(bootargs_sd); mmcinit; ext2load mmc 0 0x800000 /boot/uImage; bootm 0x800000'

setenv bootargs_nand 'console=ttyS0,115200 rw mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs'

setenv bootcmd_nand 'setenv bootargs $(bootargs_nand); nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'

setenv bootargs_usb 'console=ttyS0,115200 root=/dev/sda1 ro rootdelay=10 panic=10'

setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x00200000 /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd'

setenv bootcmd_usb1 'setenv bootargs $(bootargs_usb); run bootcmd_usb; bootm 0x00200000 0x01100000'

setenv bootcmd 'run bootcmd_sd; run bootcmd_usb1; run bootcmd_nand'

saveenv


A copy of my full environment variables is below - and it's a complete mess by the look of it!

baudrate=115200
loads_echo=0
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
console=a0000
e=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethact=egiga0
bootargs_root=root=/dev/mmcblk0p2 rootdelay=5
ethaddr=00:50:43:01:62:01
real_bootcmd=setenv bootargs $(bootargs_console) $(bootargs_root); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x00800000
bootargs_console=console=ttyS0,115200
recover1=setenv mainlineLinux yes; setenv arcNumber 2097; setenv bootcmd run recover2; saveenv; reset
recover2=run recover3; setenv bootcmd $(real_bootcmd); saveenv; setenv bootargs $(bootargs_console) root=/dev/ram0 rw ramdisk=0x01100000,8M install_type=mmc; bootm 0x00800000 0x01100000
recover3=usb start; fatload usb 0 0x00800000 uImage; fatload usb 0 0x01100000 initrd
arcNumber=2097
bootargs_nand=console=ttyS0,115200 rw mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs
bootcmd_nand=setenv bootargs $(bootargs_nand); nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
bootargs_usb=console=ttyS0,115200 root=/dev/sda1 ro rootdelay=10 panic=10
bootcmd_usb=usb start; ext2load usb 0:1 0x00200000 /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd
bootcmd_usb1=setenv bootargs $(bootargs_usb); run bootcmd_usb; bootm 0x00200000 0x01100000
bootcmd=run bootcmd_sd; run bootcmd_usb1; run bootcmd_nand
bootargs_sd=console=ttyS0,115200 rw root=/dev/mmcblk0p1 rootdelay=5
bootargs=console=ttyS0,115200 rw root=/dev/mmcblk0p1 rootdelay=5
bootcmd_sd=setenv bootargs $(bootargs_sd); mmcinit; ext2load mmc 0 0x800000 /boot/uImage; bootm 0x800000
stdin=serial
stdout=serial
stderr=serial
nandEnvBase=a0000
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no

« Last Edit: November 26, 2009, 02:42:20 PM by rexxmagnus » Logged

badcam
Jr. Member
**

Karma: 1
Posts: 78


View Profile
« Reply #6 on: November 26, 2009, 12:16:25 AM »

Please tell me where I'm going wrong:

So, I have the server installed to Nand. I reboot and stop to get into the Marvell prompt:

I type in the following:

Code:
Marvell>> printenv
baudrate=115200
loads_echo=0
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
console=a0000
e=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethact=egiga0
bootargs_root=ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs
mtdpartitions=mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs)
ethaddr=00:50:43:01:DF:BF
real_bootcmd=setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000
bootargs_console=console=ttyS0,115200
recover1=setenv mainlineLinux yes; setenv arcNumber 2097; setenv bootcmd run recover2; saveenv; reset
recover2=run recover3; setenv bootcmd $(real_bootcmd); saveenv; setenv bootargs $(bootargs_console) $(mtdpartitions) root=/dev/ram0 rw ramdisk=0x01100000,8M install_type=nand; bootm 0x00800000 0x01100000
recover3=run recover4; nand erase clean 0x00100000 0x00400000; nand write.e 0x00800000 0x00100000 0x00400000
recover4=usb start; fatload usb 0 0x00800000 uImage; fatload usb 0 0x01100000 initrd
arcNumber=2097
filesize=32D62A
bootcmd=setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000
stdin=serial
stdout=serial
stderr=serial
nandEnvBase=a0000
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no

Environment size: 2064/131068 bytes

Then I tried this:

Code:
Marvell>> printenv bootargs
## Error: "bootargs" not defined
Marvell>>

So no bootargs set. All right, let's install to SD Card....after that's done and I reboot:

Code:
Marvell>> printenv bootargs
bootargs=console=ttyS0,115200 root=/dev/mmcblk0p2 rootdelay=5

Now I try the instructions as per the Multi Boot "How To"

Code:
Marvell>> bootargs_sd=console=ttyS0,115200 ro root=/dev/mmcblk0p1 rootdelay=1
Unknown command 'bootargs_sd=console=ttyS0,115200' - try 'help'

No good. Then I tried the following as per Rektide's note in the How To:

Code:
Marvell>> setenv bootargs_sd 'console=ttyS0,115200 ro root=/dev/mmcblk0p1 rootdelay=1'
Marvell>> bootcmd_sd=setenv bootargs $(bootargs_sd); mmcinit; ext2load mmc 0 0x800000 /boot/uImage; bootm 0x800000
Unknown command 'bootcmd_sd=setenv' - try 'help'
SD found. Card desciption is:
Manufacturer:       0x03, OEM "SD"
Product name:       "SD02G", revision 8.0
Serial number:      1879278234
Manufacturing date: 6/2009
CRC:                0x00, b0 = 0

** Unable to read "/boot/uImage" from mmc 0:1 **
## Booting image at 00800000 ...
Bad Magic Number
Marvell>>

As you can see I have no idea what I'm doing. A good set of copy and paste instructions would help a lot here.

So then I tried rexxmagnus's suggestions in the above post:

Code:
Marvell>> setenv bootargs_sd 'console=ttyS0,115200 rw root=/dev/mmcblk0p1 rootdelay=5'
Marvell>> setenv bootcmd_sd 'setenv bootargs $(bootargs_sd); mmcinit; ext2load mmc 0 0x800000 /boot/uImage; bootm 0x800000'
Marvell>> setenv bootargs_nand 'console=ttyS0,115200 rw mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs'
Marvell>> setenv bootcmd_nand 'setenv bootargs $(bootargs_nand); nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
Marvell>> setenv bootargs_usb 'console=ttyS0,115200 root=/dev/sda1 ro rootdelay=10 panic=10'
Marvell>> setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x00200000 /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd'
Marvell>> setenv bootcmd_usb1 'setenv bootargs $(bootargs_usb); run bootcmd_usb; bootm 0x00200000 0x01100000'
Marvell>> setenv bootcmd 'run bootcmd_sd; run bootcmd_usb1; run bootcmd_nand'
Marvell>>

Boot

That seemed to work well...now...

Code:
Manufacturing date: 6/2009
CRC:                0x00, b0 = 0

** Unable to read "/boot/uImage" from mmc 0:1 **
## Booting image at 00800000 ...
Bad Magic Number
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found

** Invalid partition type "i" (expect "U-Boot")

** Invalid partition type "i" (expect "U-Boot")
## Booting image at 00200000 ...
Bad Magic Number

NAND read: device 0 offset 0x100000, size 0x400000

Reading data from 0x4ff800 -- 100% complete.
 4194304 bytes read: OK
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.30.2
   Created:      2009-10-21   2:00:28 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2620504 Bytes =  2.5 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.30.2 (root@p2ddgwks32) (gcc version 4.2.1) #1 PREEMPT Wed Oct 21 10:00:21 PHT 2009
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
CPU: VIVT data cache, VIVT instruction cache
Machine: Marvell SheevaPlug Reference Board
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: console=ttyS0,115200 rw mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs
NR_IRQS:114
PID hash table entries: 2048 (order: 11, 8192 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 256MB 256MB = 512MB total
Memory: 513408KB available (4728K code, 998K data, 140K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 980 bytes
NET: Registered protocol family 16
Kirkwood: MV88F6281-A0, TCLK=200000000.
Feroceon L2: Enabling L2
Feroceon L2: Cache support initialised.
Kirkwood: Gating clock using mask 0x1ac224
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
        (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
        (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
        (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
NET: Registered protocol family 2
IP route cache hash table entries: 16384 (order: 4, 65536 bytes)
TCP established hash table entries: 65536 (order: 7, 524288 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 65536 bind 65536)
TCP reno registered
NET: Registered protocol family 1
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
JFS: nTxBlock = 4012, nTxLock = 32100
msgmni has been set to 1003
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
console [ttyS0] enabled
brd: module loaded
loop: module loaded
Driver 'sd' needs updating - please use bus_type methods
MV-643xx 10/100/1000 ethernet driver version 1.4
mv643xx_eth smi: probed
net eth0: port 0 with MAC address 00:50:43:01:df:bf
libertas_sdio: Libertas SDIO driver
libertas_sdio: Copyright Pierre Ossman
NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 3968 at 0x00001f000000
Bad eraseblock 4015 at 0x00001f5e0000
2 cmdlinepart partitions found on MTD device orion_nand
Creating 2 MTD partitions on "orion_nand":
0x000000100000-0x000000500000 : "uImage"
0x000000500000-0x000020000000 : "rootfs"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "rootfs"
UBI: MTD device size:            507 MiB
UBI: number of good PEBs:        4054
UBI: number of bad PEBs:         2
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 4054
UBI: number of PEBs reserved for bad PEB handling: 40
UBI: max/mean erase counter: 19/7
UBI: background thread "ubi_bgt0d" started, PID 443
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
mice: PS/2 mouse device common for all mice
rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0
i2c /dev entries driver
cpuidle: using governor ladder
cpuidle: using governor menu
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mmc0: mvsdio driver initialized, lacking card detect (fall back to polling)
Registered led device: tricolorLed-green
Registered led device: tricolorLed-blue
Registered led device: tricolorLed-red
mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SD card at address 8fe4
mmcblk0: mmc0:8fe4 SD02G 1.84 GiB
 mmcblk0: p1 p2
mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
oprofile: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
lib80211: common routines for IEEE802.11 drivers
rtc-mv rtc-mv: setting system clock to 2009-11-26 06:41:52 UTC (1259217712)
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size:   515450880 bytes (503370 KiB, 491 MiB, 3995 LEBs)
UBIFS: journal size:       25804800 bytes (25200 KiB, 24 MiB, 200 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  4952683 bytes (4836 KiB)
VFS: Mounted root (ubifs filesystem) on device 253:1.
Freeing init memory: 140K
usb 1-1: new high speed USB device using orion-ehci and address 2
usb 1-1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
 * Filesystem type 'fusectl' is not supported. Skipping mount.
 * Setting preliminary keymap...                                         [ OK ]
 * Starting kernel event manager...                                      [ OK ]
 * Loading hardware drivers...                                           [ OK ]
 * Loading kernel modules...                                                     * Loading manual drivers...                                             [ OK ]
 * Setting kernel variables (/etc/sysctl.conf)...                        [ OK ]
 * Setting kernel variables (/etc/sysctl.d/10-console-messages.conf)...  [ OK ]
 * Setting kernel variables (/etc/sysctl.d/10-network-security.conf)...  [ OK ]
 * Activating swap...                                                    [ OK ]
 * Starting early crypto disks...                                        [ OK ]
 * Starting remaining crypto disks...                                    [ OK ]
 * Checking file systems...                                                     fsck 1.41.4 (27-Jan-2009)
                                                                         [ OK ]
 * Mounting local filesystems...                                         [ OK ]
 * Activating swapfile swap...                                           [ OK ]
 * Configuring network interfaces...                                     [ OK ]
 * Setting up console font and keymap...                                 [ OK ]
 * Starting system log daemon...                                                sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Assuming drive cache: write through
                                                                         [ OK ]
                                                                                * Starting kernel log daemon...
Ubuntu 9.04 ubuntu ttyS0

ubuntu login:                                                            [ OK ]
                                                                                * Starting OpenBSD Secure Shell server sshd                              [ OK ]
                                                                                * Starting periodic command scheduler crond                              [ OK ]
                                                                                * Restarting OpenBSD Secure Shell server sshd

Cont....

Logged

badcam
Jr. Member
**

Karma: 1
Posts: 78


View Profile
« Reply #7 on: November 26, 2009, 12:16:46 AM »

The login went fine. So, now to try rebooting without the SC Card...

Code:
ubuntu login: root
Password:
Last login: Thu Nov 26 05:48:11 UTC 2009 on ttyS0
Linux ubuntu 2.6.30.2 #1 PREEMPT Wed Oct 21 10:00:21 PHT 2009 armv5tel

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
1 failure since last login.
Last was Thu Nov 26 06:47:22 2009 on ttyS0.
root@ubuntu:~# shutdown -r now

Broadcast message from root@ubuntu
        (/dev/ttyS0) at 6:48 ...

The system is going down for reboot NOW!
 * Saving the system clock
 * Asking all remaining processes to terminate...                        [ OK ]
 * All processes ended within 2 seconds....                              [ OK ]
 * Deconfiguring network interfaces...                                   [ OK ]
 * Deactivating swap...                                                  [ OK ]
 * Stopping remaining crypto disks...                                    [ OK ]
 * Stopping early crypto disks...                                        [ OK ]
 * Will now restart
Restarting system.

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: SHEEVA PLUG LE

U-Boot 1.1.4 (Jul 19 2009 - 16:03:28) Marvell version: 3.4.19

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB
DRAM CS[1] base 0x10000000   size 256MB
DRAM Total size 512MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0
Error! cmd : 8, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
No MMC card found
** Bad partition 1 **
## Booting image at 00800000 ...
Bad Magic Number
Marvell>>

So I then type printenv:

Code:
printenv
baudrate=115200
loads_echo=0
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
console=a0000
e=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/m                                                                             tdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x20                                                                             00000;
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethact=egiga0
bootargs_root=root=/dev/mmcblk0p2 rootdelay=5
ethaddr=00:50:43:01:DF:BF
real_bootcmd=setenv bootargs $(bootargs_console) $(bootargs_root); mmcinit; ext2                                                                             load mmc 0:1 0x800000 /uImage; bootm 0x00800000
bootargs_console=console=ttyS0,115200
recover1=setenv mainlineLinux yes; setenv arcNumber 2097; setenv bootcmd run rec                                                                             over2; saveenv; reset
recover2=run recover3; setenv bootcmd $(real_bootcmd); saveenv; setenv bootargs                                                                              $(bootargs_console) root=/dev/ram0 rw ramdisk=0x01100000,8M install_type=mmc; bo                                                                             otm 0x00800000 0x01100000
recover3=usb start; fatload usb 0 0x00800000 uImage; fatload usb 0 0x01100000 in                                                                             itrd
arcNumber=2097
filesize=32D62A
bootcmd=setenv bootargs $(bootargs_console) $(bootargs_root); mmcinit; ext2load                                                                              mmc 0:1 0x800000 /uImage; bootm 0x00800000
stdin=serial
stdout=serial
stderr=serial
nandEnvBase=a0000
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
bootargs=console=ttyS0,115200 root=/dev/mmcblk0p2 rootdelay=5

Environment size: 1861/131068 bytes
Marvell>>

First, what is it about the Hot To Multi Boot instructions that the sheeva didn't like. I note a commnt added to this wiki by Rektide:

Quote
Syntax: I'm not sure quite what this page's syntax conforms to. Looking at the first command in the first example below, from U-Boot, I would enter the command in U-Boot as:
setenv bootargs_sd 'console=ttyS0,115200 ro root=/dev/mmcblk0p1 rootdelay=1'
--Rektide 04:47, 17 August 2009 (UTC)

Does this mean that the How To commands need altering?

Second.

Following rexxmagnus's instructions seemed to work but didn't get me the results I was expecting.
Where am I going wrong please?

I just want to have the sheeva choose USB first, SD Card second and last resort the Nand.

Thanks.
Logged

rexxmagnus
Newbie
*

Karma: 0
Posts: 6


View Profile
« Reply #8 on: November 26, 2009, 01:25:34 AM »

I may have the format of my USB stick wrong. Can't remember exactly how I partitioned it - I seem to remember using gparted to do it, but now that I've plugged the stick in and tried to use fdisk on it, I'm getting errors. I'll fiddle with it when I get some time tonight to see if I can replicate a usable format with fdisk and post updated instructions.
All you need to do to change the order of boot is simply rearrange my boot_cmd, so that it does the usb one before the sd. It was just my preference to have it in the order of sd, usb, nand.
Logged

badcam
Jr. Member
**

Karma: 1
Posts: 78


View Profile
« Reply #9 on: November 26, 2009, 01:55:59 AM »

After all my posting in this thread, I think I know where I've gone wrong:

I didn't take the USB stick out after installing to MMC. Doh!

Anyway, at least other people can see where things can go wrong. I'm too tired now to try your steps (with your order suggestion), but I'll try it tomorrow and report back here.

Thanks.
Logged

badcam
Jr. Member
**

Karma: 1
Posts: 78


View Profile
« Reply #10 on: November 27, 2009, 01:44:13 AM »

Rexxmagnus

I redid everything and followed your initial instructions which the one change of:

Code:
setenv bootcmd 'run bootcmd_usb1; run bootcmd_sd; run bootcmd_nand'

Everything seems to be working perfectly. I am SO PLEASED. Thank you.

One point to note for everyone. The Bootarg commands that Rexxmagnus has used worked for me where the How To Multi Boot arguments did not. It's just because they're set out in a different format, and I don't understand why the How To ones wouldn't work for me, but just for others to keep in mind.
Logged

marcus
Jr. Member
**

Karma: 5
Posts: 83


View Profile
« Reply #11 on: November 29, 2009, 07:42:34 AM »

I'm not really sure if this is the best place to post this ... but it is relevant. I'd like to see this option integrated into the installer.

I've tweaked the installer so as to automate preparation of multi-boot systems; the plugs I have prepared in this way seem to have been running OK in all tests over the past week.

Here's my complete uboot-dual-custom.txt (only the ethaddr is obfuscated). It's really just the UBIFS configuration file with boot_mmc and boot_nand variables added, and a real_bootcmd that runs first one and then the other:

Code:
#### Change ONLY in the following few lines

# Following for installation on SD card. If you want to boot from USB stick change it to /dev/sda1
# or /dev/mtdblock1 if you installed rootfs on the NAND inside the plug
bootargs_root ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs

# NAND flash partitions. If using kernel >= 2.6.30 then replace orion_nand with orion_mtd
mtdpartitions mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs)

# The following is an example MAC address. Change it according the MAC on the back side of the plug
ethaddr 00:50:43:xx:xx:xx

#### DONT change the following.
# Automated process the sets arcNumer to 2097, reset, runs uImage and initrd from USB stick and set bootcmd to 'real_bootcmd' above
# Bootcmd to be used after all installation is done
# removed for multi-boot functionality (see below) : real_bootcmd setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000

bootargs_console console=ttyS0,115200
bootcmd run recover1
recover1 setenv mainlineLinux yes; setenv arcNumber 2097; setenv bootcmd run recover2; saveenv; reset
recover2 run recover3; setenv bootcmd $(real_bootcmd); saveenv; setenv bootargs $(bootargs_console) $(mtdpartitions) root=/dev/ram0 rw ramdisk=0x01100000,8M install_type=nand; bootm 0x00800000 0x01100000
recover3 run recover4; nand erase clean 0x00100000 0x00400000; nand write.e 0x00800000 0x00100000 0x00400000
recover4 usb start; fatload usb 0 0x00800000 uImage; fatload usb 0 0x01100000 initrd

# Added for multi-boot functionality:
bootargs_root_nand ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs
bootcmd_nand setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root_nand); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000
bootargs_root_mmc root=/dev/mmcblk0p2 rootdelay=5
bootcmd_mmc setenv bootargs $(bootargs_console) $(bootargs_root_mmc); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x00800000
real_bootcmd run bootcmd_mmc; run bootcmd_nand

I've also amended runme.php to allow a new "dual" parameter.

When the plug tries and fails to boot from SD card U-Boot spews:

Code:
Error! cmd : 8, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201

However it gives up the attempt to boot from SD card in about 2 seconds, therefore booting is hardly delayed.

How the installer process works:

(1). Run as usual with "mmc" parameter to prepare SD card.
(2). Remove SD card
(3). Run with "dual" parameter, to install to NAND but with boot parameters that allow for multi-booting, first from SD card, and if this is not available, from NAND.

Once these steps have been completed on one plug (and a person smarter than I may be able to advise a one-step process that accomplishes all of the above), you can then:

(A). Remove SD card; boot from NAND.
(B). Mount USB stick and insert bootable SD card
(C). dd if=/mmcblk0 of=/mnt/my-usb-stick/my-sd-image.img
(D). Wait.
(E). Upon completion, remove SD card and insert a new SD card
(F). dd if=/mnt/my-usb-stick/my-sd-image.img of=/mmcblk0

Thereby cloning the bootable SD card.

In other words, if one prefers to boot from SD card, this configuration now allows for that SD card to be cloned / backed-up by the same plug, simply by not booting from the SD card. Furthermore, many different SD cards may be created, if you have prepared suitable rootfs's. I've created debian lenny, debian squeeze, and the original Ubuntu flavours so far.

Hope this is clear.
Logged

badcam
Jr. Member
**

Karma: 1
Posts: 78


View Profile
« Reply #12 on: December 01, 2009, 02:30:56 AM »

Nice.

I'll have to give it a go Marcus.
Logged

begunfx
Newbie
*

Karma: 0
Posts: 13


View Profile
« Reply #13 on: February 05, 2010, 01:02:54 AM »

Please help!  I tried setting up the multi-boot with rexxmagnus's setenv commands, and all I got was a kernel panic, and now I can't access the uboot at all.  I'm using Ubuntu (running through parallels on Mac OSX), and using PUTTY to talk to the serial port.  Now when I boot the sheevaplug, and launch PUTTY, I just see the cursor, and can't get a prompt...

Any help would be most appreciated.
Logged

begunfx
Newbie
*

Karma: 0
Posts: 13


View Profile
« Reply #14 on: February 05, 2010, 11:19:14 AM »

Okay.  A little more info.  Well, first all, I realized I shouldn't jump too far especially with working with uBoot and the env variables.  I was real careful to try the boot from SD without saving the env first, but when I tried setting up the multi-boot, I did a saveenv before I tested the settings...oops.  So, after making the env changes, I did a reboot (note: I was booting from the SD first).  I got a Kernel Panic (sorry I don't have the printenv from it, I'll try to get it next time).  I got a message saying the path to the SD card wasn't vaild or something like that.  It doesn't make sense cause I've mounted the SD card before using the same /dev/mmc..etc as listed above..

Btw I was able to get back to the marvell>> prompt by doing a hard reset using the pin hole next to the SD card (Thank God!).  I do have one question.  I was trying to unsetenv the bootcmd so that I could get it back to where it was before I tried multi-boot, but unsetenv dosen't seem to work.  Do I need to install it as a package?  I'm gonna try using the Wiki env variables instead to see if I can get it to work.
Logged

Pages: [1] 2
Print
Jump to: