Modifying CONSOLE parameters in image builder

Im trying to disconnect ttyATH0 uart of log kernel on a dragino2 device.
I'm working with openwrt image builder
After trying several configurations and modifying some files of the image builder I have realized that changing the next line, it behaves exactly as I want:
In file:
I search for dragino device and:
CONSOLE := ttyATH0,115200
And change by
CONSOLE := /dev/null.

I can check this in /proc/cmdline once it is compiled and flashed.

I wonder if there is a "clean" way to do that instead of modifiyng source code.

I answer to myself:
starting-up make kernel_menuconfig:
Go to:
kernel hacking

  • built -in kernel command line (select)
  • seting next parameters:
    board=DRAGINO2 mtdparts=spi0.0:256k(u-boot)ro,16000k(firmware),64k(config)ro,64k(art)ro console=/dev/null
  • built-in kernel command line overrides firmware arguments (select)

I get firmware arguments from UART log (ironically).
[ 0.000000] Kernel command line: board=DRAGINO2 mtdparts=spi0.0:256k(u-boot)ro,16000k(firmware),64k(config)ro,64k(art)ro console=ttyATH0,115200

And the file where them are extracted is the one I modified:

define Device/dragino2
CONSOLE := ttyATH0,115200
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
DEVICE_TITLE := Dragino 2 (MS14)
IMAGE_SIZE := 16000k
MTDPARTS := spi0.0:256k(u-boot)ro,16000k(firmware),64k(config)ro,64k(art)ro
TARGET_DEVICES += dragino2

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.