Re: Managing kernel command line

On Thu, 22 Feb 2018, at 16:15, Anton Gerasimov wrote:
there was a great improvement for the embedded use case recenlty with
introduction of DTB management. Do you think doing the same for kernel
command line might be useful? There are now '--karg*' parameters to
'ostree admin deploy', but this is non-updateable. One may want to
update kernel command line together with linux kernel and/or device tree.

We have the same problem and have solved it in a sub-optimal manner.

We build a script into our ostree images to call `ostree admin deploy`.  This script has the full list of 
kargs and takes care to pass them to `ostree admin deploy` with `--karg-none`to clear the kernel arguments. 
This means we can update the kernel parameters, but it takes 2 deploys to do so - first to deploy the new 
update script and the second to run the update script to actually update the kargs.

I'd like this to be a bit nicer, but we don't change kargs very often so it hasn't yet been a priority for us 
to fix.  This will be important if we ever need to atomically update the kernel image and the kargs at the 
same time for the system to keep working.

--karg-none was introduced in [ef51271] included in [#1401].  This was merged for 2018.1.


Our update script looks like:

    # These kargs are how the device comes from the factory:
    KARGS="no_console_suspend=1 ... root=/dev/mmcblk0p1 rw rootwait"

    KARGS_ARG="--karg-none --karg=console=ttyS0,115200n8 --karg-append=console=tty1 $(/usr/bin/printf 
"--karg=%s " $KARGS)"


    ostree admin deploy $KARGS_ARG "$commit_sha"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]