How to pass a value to builtin Linux kernel module at boot time? -


i want pass custom parameter kernel @ boot time, new code use. parameter number.

i know how pass value kernel module using kernel command line i.e module_param(). want pass value u-boot.

is there way this, either during or after boot?

modify board file present in include/config/board_xxx.h of u-boot, modify $bootargs similar last variable set in example:

setenv bootargs display=\${display} console=\${consoledev},\${baudrate} root=/dev/mmcblk0p1 rw rootdelay=1 control.cmd1={cmd1} 

control name of built-in driver module cannot insmod because need booting linux prompt.

cmd1 global variable i've defined in module in i've used:

module_param(cmd1, int, s_irusr | s_iwusr | s_irgrp | s_iwgrp); 

so, $bootargs var needs appended like:

<your_mod_name>.<your_mod_parameter_var_name>=<an_appropriate_value>


Comments