Retrieving diffconfig from running installation, or build-time option to add it to image

A default compile would contain no, or an emtpy diffconfig, I'd assume. Is there an option, or an easy way to have the diffconfig used to build the image included in the actual image?

I'd imagine, that might be useful for other devs too. How do you all keep track of the build-configs for the zoo of stuff on all your workbenches running various generations of experiments? The size increase of adding the diffconfig to the image must be surely be negligible, considering the benefits?

If you compile yourself, there's an option in the buildroot to include the diffconfig.

2 Likes

Ha, indeed. Thank you for pointing me to the new option:

[ ] Include build configuration in firmware (NEW)

CONFIG_INCLUDE_CONFIG:

If enabled, buildinfo files will be stored in /etc/build.* of firmware. 

Symbol: INCLUDE_CONFIG [=y]
Type  : bool
Defined at config/Config-build.in:123
  Prompt: Include build configuration in firmware
  Visible if: DEVEL [=y]
  Location:
    -> Global build settings
      -> Include build configuration in firmware (INCLUDE_CONFIG [=y]) 

It only shows up, if you select
[*] Advanced configuration options (for developers) --->
in the line below Global build settings.

I wonder, how long I've been needlessly doing
scripts/diffconfig.sh > files/etc/build.diffconfig ...

1 Like

Yeah, for such settings hidden behind other 'umbrella' settings, it helps to use the buildroot search (forward slash in the ncurses dialog).

2 Likes

Add this to your postbuild

./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
1 Like

I use an org-mode file that composes the diffconfig files for my devices. I'll be adding
CONFIG_INCLUDE_CONFIG=y
to the block of options applied to all normal builds.

That makes the diffconfig available in the image at /etc/build.config.

Thank you all

1 Like

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