If the goal is to clean-up manually added kmods from a potentially bloated diffconfig, I am thinking that the following would do it, but when I diff the two against each other, I am seeing tons of kmods not getting added back.
% sed -i '/CONFIG_PACKAGE_kmod/d' <~/diffconfigs/current_build.diffconfig >.config
% make defconfig
% ./scripts/diffconfig.sh > ok
% vimdiff ~/diffconfigs/current_build.diffconfig ok
For example, I have the wireguard package set and one of its dependencies is PACKAGE_kmod-crypto-lib-chacha20poly1305
but that was not automatically added back.
% grep wireguard ok
CONFIG_PACKAGE_kmod-wireguard=y
CONFIG_PACKAGE_luci-proto-wireguard=y
CONFIG_PACKAGE_wireguard-tools=y
Yet:
% grep kmod-crypto-chacha20poly1305 ok