Extract config from running openwrt machine?

is there a way to make .config file for buildsystem from already running system? I should've backed it up, but I forgot to do so

On the face of it and to my knowledge, no.

If you still have your config.buildinfo file from your latest build you could use it as a seed .config by copying it to .config and then do a make defconfig. This should give you a close approximation.

Beyond that, this is what I would do to create a new .config:
First do a opkg list-installed > myinstalledpackages to create an installed packages file. Then in your Buildroot create a default config:

make nconfig    # enter your Target
                # and SubTarget
                # and Target Profile
                # escape out of nconfig and select <save>
./scripts/diffconfig.sh > configdiff    # create configdiff from created .config
cp configdiff .config                   # and copy to .config
make defconfig                          # make a default config for the selected Target/Release

# This should create a default .config for your Target device

Finally, using the myinstalledpackages file for reference, slog through the make nconfig with the default .config adding your packages.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.