OpenWrt Forum Archive

Topic: patch-cmdline

The content of this topic has been archived on 29 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi:

I have red about an utility for modifiying the kernel command line called "patch-cmdline". I need this utility because I would like to disable the console through the serial port and then connect a modem to it. I have searched for that utility but I've found nothing. So, can anyone tell me where can I find it or other way to modify the kernel command line? I have tried using RedBoot, but doesn't work.
Thanks a lot.

run `make kernel_menuconfig' in trunk/ (a local copy of the svn tree.)
Machine Selection  ---> Default kernel command string:
Remove the console argument.
Rebuild your image and enjoy; obviously you can't use the serial console to debug anymore.

Several routers include two serial ports, the wrtsl54gs for example, uses one for console, and leaves the other available for whatever use. If you have a 10-pin serial header, chances are high that you have 2 serial ports.

Bartman007 wrote:

Rebuild your image and enjoy; obviously you can't use the serial console to debug anymore.

If I use the referred utility (patch-cmdline) I can modify the kernel command line whenever I want without the need of rebuilding the kernel. Isn't it? This is why I'm searching it.

Cisien wrote:

Several routers include two serial ports, the wrtsl54gs for example.

Yes, it's true. But I'm working with "La Fonera", that only have one serial port. The avantage of La Fonera is its reduced size. A little bigger than a cigarrettes box.

Looks like patch-cmdline was created by nbd and committed in r7193.  It currently is only built on the adm5120 and rb532 targets, but you could try playing around with the package makefile (and look at the respective target makefiles/patches to see how it is currently used, though it appears that it might not be used in the way that you intend to use it.)

Edit: Originally said it was created by florian, but it was only committed by him; nbd wrote patch-cmdline.

(Last edited by Bartman007 on 22 May 2007, 12:28)

Thanks a lot, Bartman007. It looks like a very simple c program, so I think there will be no difficulties for compiling in different arquitechtures.
The utility looks for the mark "CMDLINE:" in the kernel especified in the comman line and then changes its value for the desired one.
I hope it works for me.

Thanks a lot to all of you.

The discussion might have continued from here.