How add uboot kernel boot parameters

Is same question as here, but I haven’t gotten any of those options to work properly (though i’m not confident I am using CONFIG_BOOTARGS correctly, i’ve tried putting it in various places in bitbake recipes and .conf files and none have had any effect)

I’ve also tried the solution found here. Not sure, but I think it didn’t work because of mender?

am inheriting mender-full, I have managed to do what I want by manually editing /boot/efi/EFI/BOOT/grub.cfg; I am trying to add fsck.mode=force and to the kernel boot parameters

I can’t find the page, but I found somewhere someone mentioned there was a bbappend method (which I haven’t been able to get working yet and wasn’t described in much detail) and that they were considering adding a variable for modifying bootargs, but I haven’t found that variable either if it was added

figured I would ask here if there is a proper bitbake way of doing this; currently am looking at this recipe to try and figure out where that grub.cfg comes from so I can modify it with a patch or bbappend/sed method, but figured I would check if there is a more bitbake way of doing this first

thanks for any help

1 Like

Hi @threesc,

If you have dynamic-layers:
$> mkdir -p dynamic-layers/mender/recipes-bsp/grub-mender-grubenv
$> cd dynamic-layers/mender/recipes-bsp/grub-mender-grubenv

$> tree
├── files
│ └── 02_qemu_console_x86_grub.cfg
└── grub-mender-grubenv_%.bbappend

$> cat grub-mender-grubenv_%.bbappend
FILESEXTRAPATHS_prepend_mender-client-install := “${THISDIR}/files:”
SRC_URI_append_<YOUR_MACHINE>_mender-client-install = " file://02_qemu_console_x86_grub.cfg;subdir=git"

$> cat files/02_qemu_console_x86_grub.cfg
set console_bootargs=“console=ttyS0,115200n8 nofb modprobe.blacklist=uvesafb”


it seems I don’t have dynamic-layers (couldn’t figure out anything about it with google that made sense for what you mentioned either)

however I did figure out my problem, that method does work for my setup if I do it properly, I was missing the _mender-client-install bit from the SRC_URI_append as I had initially tried removing the <YOUR_MACHINE> bit and control what targets got it by the layer instead, and never noticed there was more there than that bit

To enable dynamic layer add this in your conf/layer.conf

# Let us add layer-specific bbappends which are only applied when that
# layer is included in our configuration
BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bbappend' % layer \
               for layer in BBFILE_COLLECTIONS.split())}"
BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bb' % layer \
               for layer in BBFILE_COLLECTIONS.split())}"
1 Like