Re: finding the root device

Greg Ungerer <[email protected]>
Newsgroups gmane.linux.uclinux.devel
Message-ID <[email protected]>
Hi Richard,

On 20/09/12 20:38, Richard Cochran wrote:
> I am running mainline Linux on the Freescale/Axiom M5234BCC with uboot
> 2011.09-01111-g0562219 and have been carrying along a patch from the
> uClinux-dist, like shown below for v3.2.9.
>
> I create a image by concatenating the kernel with a romfs, and I boot
> it by loading over tftp and jumping to the image with the uboot 'go'
> command.
>
> My question: Is there a way to pass the kernel command line from uboot
> to specify the root device, instead of using this patch?

I haven't used uboot on ColdFire, so I am not sure if there is a
standard way to pass kernel parameters.

But you can always build command line options into your kernel config.
Look in the "Kernel Hacking" -> "Compiled-in Kernel Boot Parameter".
I always do this with stock kernels, setting the command line to
"root=/dev/mtdblock0" in the config.

Regards
Greg



>
> diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c
> index 6793074..9cf7df5 100644
> --- a/drivers/mtd/maps/uclinux.c
> +++ b/drivers/mtd/maps/uclinux.c
> @@ -15,6 +15,7 @@
>   #include <linux/fs.h>
>   #include <linux/mm.h>
>   #include <linux/major.h>
> +#include <linux/root_dev.h>
>   #include <linux/mtd/mtd.h>
>   #include <linux/mtd/map.h>
>   #include <linux/mtd/partitions.h>
> @@ -89,6 +90,7 @@ static int __init uclinux_mtd_init(void)
>   	mtd->priv = mapp;
>
>   	uclinux_ram_mtdinfo = mtd;
> +	ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, 0);
>   	mtd_device_register(mtd, uclinux_romfs, NUM_PARTITIONS);
>
>   	return(0);
> _______________________________________________
> uClinux-dev mailing list
> [email protected]
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by [email protected]
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev
>
>
>


-- 
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     [email protected]
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.