2

How to pass / set values to paremeters of a module when it is a built-in in linux? Hor example, consider the usb gadget g_mass-storage module. When it is compiled as a module (.ko) we can append the file name to the module as:

modprobe g_file_storage  file=/abc/xyz

How to feed file info when it is compiled as a built-in??

user693986
  • 141
  • 3

1 Answers1

4

As pointed out on Siach blog, answer is in Documentation/kernel-parameters.txt:

Module parameters for modules that are built into the kernel image are specified on the kernel command line with the module name plus . plus parameter name, with = and <value> if appropriate, such as:

usbcore.blinkenlights=1

These are usually referred to as bootargs and can be set in the boot-loader that loads the Linux kernel (u-boot, grub etc.).

TheCodeArtist
  • 21,479
  • 4
  • 69
  • 130
Joe Kul
  • 2,454
  • 16
  • 16