[U-Boot] Beginners Questions on modding a NAS

JPT j-p-t at gmx.net
Fri Mar 8 17:10:39 CET 2013


Hi Mike,

Sorry, I am partly off-topic.
but since cross compiling and uboot images are still close to uboot, 
i'll stay here.

Am 05.03.2013 21:30, schrieb Michael Cashwell:
> On Mar 5, 2013, at 2:25 PM, JPT <j-p-t at gmx.net> wrote:

>> *** Next step, booting from disk
...
>> 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.

If I boot using the initrd, the USB drive is /dev/sda1
Since it's the same kernel, I guessed I have to use /dev/sda1 as well.

> 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

I am rather sure missing DEVTMPFS is the problem.

after hours and days of searching I found out:
DEVTMPFS is not available in kernel 2.6.31.*, it's included from 2.6.34 on.

Way 1: Upgrade to longterm kernel 2.6.34.14
A) build kernel
Tries to crosscompile but fails:
"arm-mv5sft-linux-gnueabi-gcc: not found"
did hardly find anything on this file in the internet.

Since I haven't got any experience with crosscompiling, I set up a ARM 
machine in QEMU... but it still tries to crosscompile, same error.

B) patch new kernal with duov2 patches. boy, its a 20 MB patchfile!
a lot of patches failed.
I don't believe this is going to work!

Way 2: Patch original kernel with DEVTMPFS.
No idea, did not try yet. where do I get a patch from?
Still need a way to compile the kernel.

Way 3: Create a new uboot initrd.img
is there any way to unpack the original image into it's pieces? Would be 
far easier to just exchange those parts that have to be changed.

Way 4: see below.

>> Or do I have to boot the "real" system after booting from initrd?
>
> You need to decide that.

How do I boot "linux from linux"?
could you give a keyword to search for?

thanks,

Jan



More information about the U-Boot mailing list