Hi Greg, Thanks for your answer. However, my question is reading a boot parameter directly from my module because i need to know which device is selected for the console. For example if I pass "console=ttyS0,115200" and I want to get "ttyS0,115200" in my module.
The system works fine, in boot process, config_BSP is called with u-boot argument. I just wonder that I can get value of a kernel parameter so that i don't need to define my own one in my module. Regards, On Mon, Aug 8, 2011 at 12:24 PM, Greg Ungerer <g...@snapgear.com> wrote: > Hi Viet, > > On 02/08/11 19:34, Viet Nguyen wrote: >> >> I need to get the value of parameter "console" passed by u-boot in arch >> initialization stage. >> I think I need to touch config_BSP function. > > Do you mean the kernel code you are using doesn't currently get the > command line at all from uboot? You would only need to do some work > in the config_BSP if there is no code to support geting the uboot > command line at all. > > >> However, if I write a kernel module, how to get value of this parameter >> from my module? > > Use module_param() and friends in your driver. > > Regards > Greg > > > ------------------------------------------------------------------------ > Greg Ungerer -- Principal Engineer EMAIL: g...@snapgear.com > 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 > -- Nguyen Quoc Viet _______________________________________________ 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