Set system system.kernel ... cmdline not working?

$ sudo snap set system system.kernel.dangerous-cmdline-append=“dtparam=i2c_csi_dsi0”

$ sudo cat /proc/cmdline

reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe bcm2708_fb.fbwidth=640 bcm2708_fb.fbheight=480 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 smsc95xx.macaddr=2C:CF:67:FC:A4:EA vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 console=tty1 rng_core.default_quality=700 vt.handoff=2 quiet splash snapd_recovery_mode=run

Ineffective? Just ignores it?

$ sudo snap set system system.kernel.cmdline-append=“dtparam=i2c_csi_dsi0”

error: cannot perform the following tasks:

  • Run configure hook of “core” snap (run hook “configure”: “dtparam=i2c_csi_dsi0” is not allowed in the kernel command line by the gadget)

fails?

I am trying to set a kernel parameter using both of the commands above yet both fail?

P.S. Ubuntu Core 24 running on CM5

As the docs state, “on devices using the GRUB bootloader”, RPI doesn’t use grub, so it doesn’t work.

You can edit the cmdline.txt directly, should be at /boot/piboot/. The snap set method is for systems where FDE is used to not break the integrity of TPM.

Huh……so you are saying cmdline.txt is not a read only file. I will try that. Thank you.

Beyond the hint that @gairepravesh gave already, are you aware that the kernel only adds changes to /proc/cmdline after you rebooted ? You wont see any immediate changes on the running system…

None of these appear to work for me. Even if i edit the cmdline.txt directly under /boot/pi-kernel*/cmdline.txt and add dtparam settings after a reboot they do not take effect. I have been reading that the only way to change device tree settings is to build your own pi-gadget snap and create your own model assertion for ubuntu core and burn that image ? Thats a lot of work just to change dtparam settings. To date what i have been doing is editing the config.txt but I can only reach this file by booting up my CM5 into USB (e.g. rpiboot) mode and actually editing the config.txt. This is cumbersome and I was hoping to change this.

Sorry, I didn’t actually realize the dtparam and just considered the problem statement to be adding cmdline params. Just for record, editing /boot/piboot/.snap/cmdline.txt is the correct way for editing cmdline in RPI. Its just that dtb’s are handled from config.txt by firmware so its not a valid arg for cmdline.

This was discussed here previously and a product feedback was created. I am not completely sure what’s the status of this as of now.

1 Like