Disable ipv6 in kernel

First of all. Read uboot documentation. Second, fw_setenv is syntax where first argument is variable name and second argument is value. Next you have to see uboot like a syslinux for example. It just loads kernel, initramfs and device tree. Then it passes command line arguments to kernel and runs it. So whole variable bootargs is used as a command line for Linux. So you want to append your option rather then override it.

Also as I wrote. In default configuration is not saved and that is why you are getting CRC error. When no configuration is saved then uboot uses built-in configuration. When you write something to that configuration then that CRC error should go away but also uboot will probably read just your configuration. That is why you should first set it to default value.

And as last point. -R in grep is not there because we have very very old busybox. You can use find with xargs instead. But I missed what you are trying to do with CONFIG_ENV_?

Note: Just for completeness. This is what it should rather look like:

fw_setenv bootargs 'earlyprintk console=ttyS0,115200 rootfstype=btrfs rootdelay=2 root=b301 rootflags=subvol=@,commit=5 rw ipv6.disable=1'

Of course don’t forget to set also all other variables. I am just not sure if default value would be used if not set in configuration but I think it wouldn’t (I just have not ever tested it and don’t remember if it’s documented somewhere).

1 Like