I wish to change kernel command line on Xavier. Since only way to boot a custom kernel is using the flash.sh script, I was wondering how to set up the cmdline on Xavier.
I have tried below flash.sh command, but the /proc/cmdline shows the old cmdline.
When mkbootimg binary is called from flash.sh the --cmdline parameter had the new value as part of the {cmdline} variable, but after system booted up the old cmdline is being displayed. Please help me out.
Thank linuxdev for the reply. May I know where it is placed if by any chance you know it?
Also, that means that I have to build that dtb everytime I need to change the bootargs. Can’t there be any simpler solution? I usually test patches developed in-house and I have to set one bootarg or the other on every boot. So, this may be a longer (though not difficult) procedure to follow, hence asking for a simpler one. Thanks.
I have got it to work. Probably, my lack of understanding the flash.sh script arguments. Your comment helped me as well. I had to partition kernel-dtb along with the “-C” option, something like this:
Well, I don’t know yet what it updates, but you may be right about that. Because the correct .dtb file is updated.
“-C” doesn’t skip the flashing of rootfs but specifying “-k” (small K) skips or restricts the flashing to only the partition that I put in as argument. Probably a comma-separated list of partitions could be specified to “-k” option. (and so for “-C” option)
I’ve had a lot of trouble flashing the DTB. Copying the dtb to L4T/kernel/dtb before flashing is was the only way I have been able to get it to work. The following should work but does not:
The second method works for the dtb flashing and not the first is the same reason why the command line is not updated with only “-C” option. The flash.sh script copies the “@L4TDIR@”/kernel/dtb/t194.dtb file in the “@L4TDIR@”/bootloader/ folder replacing the .dtb file that you specify with the “-d” option.
Either this was always the behavior (I am not sure) or NVIDIA has changed the way flash.sh uses the command line args and flashes the board.
Anyway, I feel the whole process is a little bit complicated compared to JetPack 3.x releases for TX{1,2,2i}'s.
Hello, have you ever added more than one kernel parameter via the flasher script?
I’ve tried with
… -C “a=b foo=bar” …
and also
… -C “a=b” -C “foo=bar” …
but only a=b was added.
Looking at the flash.sh script I see this comment:
# Optional Environment Variables:
...
# CMDLINE ---------------- Target cmdline. See help for more information.
...
So perhaps if you have “CMDLINE” as an environment variable, then this would get updated even without the “-C” for any operation updating the device tree. Just guessing, but this before a flash:
export CMDLINE="a=b foo=bar"
sudo ./flash.sh ....
I haven’t tested, but perhaps the environment variable method is better behaved.
I see you succeeded with adding additional boot parameters to the kernel. Can you explain in more details which dts file should I change? I believe that I can create a dts from dtb, update it, create dtb from it and finally burn it. What is the file name?