Search code examples
linuxbootloaderriscvbuildroot

How to set OpenSBI kernel command line argument with Buildroot


How can kernel command line arguments be set when using the OpenSBI bootloader in Buildroot? I want to set the isolcpus argument.


Solution

  • I don't think OpenSBI is even able to boot Linux. Typically, there will be a full-fledged boot loader, e.g. U-Boot, that loads Linux and sets the command line.

    If OpenSBI is able to load Linux after all, here are a few ways that the command line can be set.

    • In the device tree, set the bootargs property (at the top level) to the kernel command line you want.
    • In the Linux kernel configuration, set CONFIG_CMDLINE (and probably enable CONFIG_CMDLINE_EXTEND).