How to modify kernel parameters / command line after flashing?

Oh it is definitely blank after the first full uboot+owrt+board_config flash via brnboot's hidden recover webif. dunno if it is blank when one flashes uboot and owrt over brnboot's serial interface.
But after manually triggering that freshly installed uboot to create an ubootenv it is readable with fw_printenv. -> /etc/fw_env.config seems to be allright.

This is why I don't understand what @slh's patch actually does... or if it's even still necessary.

what it does is create /etc/fw_env.config on firstboot... this parameter is read by fw_printenv and fw_setenv... ( interestingly this is done on firstboot - for me - so your device would have to have fully initialized for it to be created ) but they can also have it compiled in...

sent a patch to the mailing list...( second one ignored ) shows where it's written;

http://lists.infradead.org/pipermail/openwrt-devel/2019-December/020703.html

Just checked out the wiki ( really good info there ! ) for that device and the source properly...

cat package/boot/uboot-lantiq/patches/0111-MIPS-add-board-support-for-Arcadyan-ARV7510PW22.patch | grep -C20 'kernel'

If booting into userland once and populating is not an option... you could static some defaults ^... ( or similar )... ( I think i'd be choosing the "multiple-image with static dts" route in the end as no fiddling at all needs to be done with any of that stuff, but for personal devices I like more control over uboot )

@Limer Sorry I'm late to the party, and I didn't read everything here so I might not be on track.... But when I saw this it looked to me that all you need is to delete the default kernel command line. It is always there by default and will always be there in public images. Like you found out, you can modify the command line of an image, but it has to be a custom image after changing kernel config. In the same way, you can remove the default command line completely, but it also has to be a custom kernel patch or menu change or manual kernel config edits while building a custom image.

If you run make kernel_menuconfig you should be able to find the option under
Kernel hacking --> (CMDLINE) Default kernel command line
It shows what the current value is in line in parenthesis (before the title of the option for some reason), so just look for the parenthesis. It's all the way on the bottom. Your goal would be to just make this blank.

That option effects more than one file, and the kernel config is not in the root directory of the source, but rather spread out in the build directory. I didn't even remember what the name of the variable was or where it was so I added the word "test" at the end of the default cmdline in the menu and then searched for it in the build with grep...

$ grep -rnw '.' -e 'noinitrd test'
./target/linux/ar71xx/config-4.9:286:CONFIG_CMDLINE="rootfstype=squashfs noinitrd test"
./build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.9.152/.config:1027:CONFIG_CMDLINE="rootfstype=squashfs noinitrd test"

As you can see, it effects more than one file, but the variable is the same, CONFIG_CMDLINE. If for whatever reason you are unable to find it in the menu, you can search it with grep using

$ grep -rnw '.' -e 'CONFIG_CMDLINE='

Since you already know what the built-in kernel cmdline is you can search for it that way too.

$ grep -rnw '.' -e '<part of /proc/cmdline>'