Re: [uClinux-dev] finding the root device
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-0-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 uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev -- Greg Ungerer -- Principal EngineerEMAIL: g...@snapgear.com SnapGear Group, McAfee PHONE: +61 7 3435 2888 8 Gardner Close FAX: +61 7 3217 5323 Milton, QLD, 4064, AustraliaWEB: http://www.SnapGear.com ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
Re: [uClinux-dev] finding the root device
On Fri, Sep 21, 2012 at 04:18:02PM +1000, Greg Ungerer wrote: I haven't used uboot on ColdFire, so I am not sure if there is a standard way to pass kernel parameters. We added it and use it. I believe all needed patches went upstream. If something is missing we will resend them. 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. This commit should have taken care of the kernel side: commit 588baeac38829304390b690142376d2c71ac5c9f Author: Lennart Sorensen lsore...@csclub.uwaterloo.ca Date: Fri Sep 18 13:49:36 2009 -0400 m68knommu: add uboot commandline argument passing support This patch adds m68knommu support for getting the kernel command line arguments from uboot, including the passing of an initrd image from uboot. We use this on a 5270/5271 based board, and have used it on the 5271evb development board. It is based on a patch found in the linux-2.6-denx git tree, although that tree seems to have had lots of other changes since which are not in the main Linus kernel. I believe this will work on all coldfires, although other m68knommu might be missing the _init_sp stuff in head.S as far as I can tell. I only have the coldfire to test on. Signed-off-by: Lennart Sorensen lsore...@csclub.uwaterloo.ca Signed-off-by: Greg Ungerer g...@uclinux.org I hope the u-boot side got sent upstream. I should ask the guy that works on that. It looks to me as if the u-boot git tree has support for m68k kernel arguments. So as long as you use something not too old it should work. -- Len Sorensen ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
Re: [uClinux-dev] finding the root device
On Fri, Sep 21, 2012 at 04:18:02PM +1000, Greg Ungerer wrote: 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. Thanks, this is just what I was looking for. BTW, arch arm has the same idea, CONFIG_CMDLINE, but in a different place. Prompt: Default kernel command string Defined at arch/arm/Kconfig:2025 Location: - Boot options Thanks, Richard ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
Re: [uClinux-dev] finding the root device
On Fri, Sep 21, 2012 at 10:33:04AM -0400, Lennart Sorensen wrote: On Fri, Sep 21, 2012 at 04:18:02PM +1000, Greg Ungerer wrote: I haven't used uboot on ColdFire, so I am not sure if there is a standard way to pass kernel parameters. We added it and use it. I believe all needed patches went upstream. If something is missing we will resend them. Thanks for the info. I did see that both uboot and linux appear to have support for this, but I couldn't get it working with the minimal effort that I put into it. If I get the time one day, then I will revisit this. For now, the compiled in command line is the easy fix. Thanks, Richard ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
Re: [uClinux-dev] finding the root device
Hi, you can use something like root=31:00 in the kernel cmdline. Regards, Erwin Am Thursday, den 20.09.2012, 12:38 +0200 schrieb Richard Cochran: I am running mainline Linux on the Freescale/Axiom M5234BCC with uboot 2011.09-0-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? Thanks, Richard 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 uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev -- Dipl.-Ing. Erwin Authried Softwareentwicklung und Systemdesign ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev