I want to pass a custom parameter to the kernel at boot time, which my new code will use. This parameter is a number.
I know how to pass value to kernel module using ker
Modify your board file present in include/config/board_xxx.h of U-Boot, modify $bootargs similar to the last variable that is set in this example:
setenv bootargs display=\${display} console=\${consoledev},\${baudrate} root=/dev/mmcblk0p1 rw rootdelay=1 control.cmd1={cmd1}
control is the name of the built-in driver module that I cannot insmod because I need it for booting fully to the Linux prompt.
cmd1 is the global variable I've defined in the module in which I've used:
module_param(cmd1, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
so, your $bootargs var simply needs to be appended with something like: