Easier/better way to maintain package selection in source tree fork

Short version: The only way I've been able to determine to do this is to remove the /.config line from the .gitignore file and keep the config maintained in the fork I have. Not sure if this is the best option or if there's an easier way to maintain the desired package selection in my own fork of the source tree?

Long version: Currently working on my own private fork mainly because the project I'm currently working on has quite a number of custom packages and some kernel driver patches that it seems like it is just easier to maintain all that in a fork instead of checking out the main source tree and adding everything in manually when I need to. I really want to keep my package selection made via menuconfig as part of this fork. It's the last major puzzle piece to setting it up and currently a huge headache doing it manually each time I need to do a fresh pull. Only thing I've been able to determine is just allowing .config to be kept in the repo but there may be some potential issues in doing this that I'm not aware of. And I can't find anything here on the forums or in the wiki that covers this use case.

Thanks!

Would using diffconfig be an option?
https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem#configure_using_config_diff_file

2 Likes

For Gargoyle, we have a build script which clones OpenWrt, checks out the specified commit (or branch or tag etc), copies custom packages in, then overwrites the .config with one from our build spec, then starts the build.

It means that we need to occasionally update the stored configs but there is rarely a breaking change.

We have a dev script that tries to keep the config up to date as well.

1 Like

Just keep the short pruned version of diffconfig output as a .config recipe, as you only need the deviations from the standard, not all possible lines in the long .config

3 Likes

Thanks all for the pointers on the diffconfig script. I must have glossed over that section in the wiki. But it looks like it'll do exactly what I want. :slight_smile:

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