• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Boot Sheevaplug from Sdcard or NAND  (Read 713 times)
ptosch
Newbie
*

Karma: 0
Posts: 10


View Profile
« on: January 27, 2014, 09:12:30 AM »

Hello,

I have a sheevaplug with an ubuntu installed on NAND (ubifs). Now I would like to Install debian on Sdcard.

Is it possible to boot from sdcard as long as an sdcard is plugged in but when it is removed, it should boot from NAND ?

Somehow like my dockstar: it is always booting from usb.stick, but when the stick is not inserted, it boots from its internal image.

Regards,
 Peter
Logged

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #1 on: January 31, 2014, 12:53:04 PM »

Yes, you have to configure uboot accordingly. You will have to search and read sone the older threads
Logged

bigbear59
Newbie
*

Karma: 0
Posts: 26


View Profile
« Reply #2 on: January 31, 2014, 01:02:51 PM »

Take a look here,
Yet another sheevaplug dual boot question <-- Click here
Hopefully it will answer your questions.

Ask back here for any clarification.


Logged

Give me a fish, I eat for a day.  Teach me to fish, I eat for a lifetime.
"Do you have any spades?"

ptosch
Newbie
*

Karma: 0
Posts: 10


View Profile
« Reply #3 on: February 07, 2014, 05:43:25 AM »


Thanks bigbear59, that link was the hint I needed.

I fixed the lines to be able to boot from ubifs.

Assuming the partitions on NAND:
Code:
# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 1fb00000 00020000 "root"

And assuming partitions on sdcard:
Code:
# fdisk -l /dev/mmcblk0

/dev/mmcblk0p1   *        2048      499711      248832   83  Linux
/dev/mmcblk0p2          499712    30472191    14986240   83  Linux
/dev/mmcblk0p3        30472192    31291391      409600   82  Linux Swap / Solaris


for ubifs it shoud look like this:

Code:
setenv bootcmd_mmc 'mmc init; mmc init; ext2load mmc 0:1 0x00800000 /uImage; ext2load mmc 0:1 0x01100000 /uInitrd'
setenv bootargs_nand 'rootfstype=ubifs console=ttyS0,115200 mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) ubi.mtd=1 root=ubi0:rootfs rw
setenv root '/dev/mtdblock1 rw ip=:10.4.50.5:10.4.50.5:255.255.255.0:DB88FXX81:eth0:none'
setenv bootcmd_nand 'setenv bootargs $(bootargs_nand); nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x00800000 0x01100000; run bootcmd_nand'
saveenv


Now I have a fallback system if the SDCard shouldn't work.

Regards,
 Peter
Logged

Pages: [1]
Print
Jump to: