On Mar 5, 2013, at 2:25 PM, JPT <j-...@gmx.net> wrote:

> Hi,
> 
> wow, thanks. bootm worked fine. :)

Spiffy.

> *** Next step, booting from disk
> I created a root fs on USB drive and tried to boot it.
> 
> usb start
> ext2load usb 0:1 0x02000000 /boot/kernel-DUO-1.0.22
> bootm
> 
> this works, but the kernel doesn't know where to find the root partition.
> how do I have to pass the root= parameter to linux kernel?
> 
> this didn't work:
> set bootargs console=ttyS0,115200 root=/dev/sda1

bootargs is how you pass arguments to the kernel, so you're on track there.

The trick is what to pass. Your root= item is in the right direction. But the 
kernel needs to be configured appropriately. By that I'm talking about things 
like what bus (ATA, SATA, USB, etc.), what partitioning (MBR, GUID, MTD, etc.) 
and what file system (FAT*, ext2/3/4, etc.) the root fs will have. You have to 
have the supporting kernel configs enabled for those things.

You also need /dev to be setup early or the root argument will hit a dead end. 
I use these often:
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y

> How do I find out the correct root device?

One trick is to look at the console log of the device booting whatever came 
with it. That will show you many of the kernel args. And if you have the 
matching kernel source and config it will make changes much easier than 
starting from nothing.

> Or do I have to boot the "real" system after booting from inited?

You need to decide that. It can be done either way, either a small initrd that 
then does a pivot root or will it just directly mount. Both are possible but a 
kernel/rootfs setup for one will likely be unhappy trying to do the other.

> *** Last step: save settings setting for automated boot up.
> 
> I tried to save, it writes something, but after issuing "reset" it's back to 
> initial values. what's wrong?
> 
> Marvell>> saveenv
> Saving Environment to NAND...
> Erasing Nand...Writing to Nand... done

Sorry but I don't know about this one. I avoid raw NAND like the plague.

I don't know why it would write the env but not then read it back the next time.

When u-boot starts does it complain about the environment CRC being bad even 
after what appears to be a successful saveenv? That would sounds like a basic 
NAND flash problem (wrong part or geometry).

One last trick is to define DEBUG early in your config.h file and rebuild. Such 
a u-boot will spew enormous amounts of stuff to the console but it often will 
show what's happening in a case like that.

HTH,
-Mike

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to