Welcome! Log In Create A New Profile

Advanced

[Dockstar] dual boot openwrt from nand & gentoo from hard disk

Posted by skakz 
[Dockstar] dual boot openwrt from nand & gentoo from hard disk
November 03, 2011 11:29AM
Hi everyone,
here it is my situation:
I've installed openwrt on NAND following this guide
with this configuration:
mtd0 uboot                 1Mb
mtd1 second stage uboot    1Mb
mtd2 kernel                3Mb
mtd3 rootfs                251Mb


Now, I've also a full working gentoo installation on a usb hard disk with:
sda1 /boot ext2 partion
sda2 /     ext4 partiotion
sda3       swap 
sda4 /home xfs partition


I would like to be able to choose which system to start, for example if first uboot stage find /boot/uImage on sda1 starts gentoo, else starts openwrt from nand.

here it is uboots envs

first stage uboot:
CE>> printenv
baudrate=115200
x_bootcmd_kernel=nand read 0x6400000 0x200000 0x300000
x_bootcmd_usb=usb start
x_bootargs_root=root=/dev/mtdblock3 rw rootfstype=jffs2
x_bootargs=console=ttyS0,115200 mtdparts=orion_nand:1M(u-boot),1M@1M(second_stage_u-boot),3M@2M(kernel),-(rootfs) rw
bootcmd=nand read.e 0x800000 0x100000 0x80000; go 0x800000
bootargs_root=root=/dev/mtdblock2 ro
console=console=ttyS0,115200
serverip=192.168.1.3
ipaddr=192.168.1.88
netmask=255.255.0.0
fileaddr=800000
filesize=29378
bootargs=console=ttyS0,115200 root=/dev/mtdblock2 ro
ethact=egiga0
nandEcc=1bit
usb0Mode=host
ethmtu=1500
ethaddr=00:50:43:00:02:02
ceboardver=REDSTONE:0.1
MALLOC_len=1
ethprime=egiga0
CASset=min
run_diag=yes
rootpath=/mnt/ARM_FS/
loads_echo=0
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=yes
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

Environment size: 988/131068 bytes
CE>>

second stage uboot
bootcmd=${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; ${x_bootcmd_usb}; bootm 0x6400000;
bootdelay=3
baudrate=115200
ipaddr=169.254.254.243
serverip=169.254.254.254
x_bootcmd_kernel=nand read 0x6400000 0x200000 0x300000
x_bootcmd_usb=usb start
x_bootargs_root=root=/dev/mtdblock3 rw rootfstype=jffs2
ethaddr=02:50:43:78:f9:be
ethact=egiga0
x_bootargs=console=ttyS0,115200 mtdparts=orion_nand:1M(u-boot),1M@1M(second_stage_u-boot),3M@2M(kernel),-(rootfs) rw
stdin=serial
stdout=serial
stderr=serial

Environment size: 523/131068 bytes

thank you!!!
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: