[LEDE-DEV] Scripted builds -- package selections reset by "make defconfig oldconfig"
Philip Prindeville
philipp_subx at redfish-solutions.com
Wed May 17 10:35:42 PDT 2017
Hi.
I have a requirement to be able to clone a snapshot of an Ubuntu 16.04-2 VM which has all of the appropriate packages already installed on it, scp over a build script, run it, and copy out the $(TOPDIR)/bin/targets/ directory when done and then destroy the VM.
From a working (development) cloning of GIT, I had done “scripts/diffconfig.sh > .config-compacted” and put that into the script, along with a copy of env/kernel-config.
The script does these steps:
* git clone’s the LEDE source URL
* cd into LEDE cloning
* scripts/env new pristine
* adds an additional line to feeds.conf.default and writes it out to feeds.conf
* installs a minor patch to package/base-files/files/sbin/upgrade (some extra delays that fix output on x86 hardware)
* cat <<__HERE__ > .config
* cat <<__HERE__ > env/kernel-config
* scripts/env save populated
* scripts/feeds update -a
__this is where things get weird… if I scp over a copy of the original .config file from my development cloning, and diff it against the just-created .config … feeds/luci and feeds/telephony have been updated, even though both were commented out… all of my optional package selections are gone… I’m not even sure why “scripts/feeds update” would touch my .config!__
* scripts/feeds install -a
* make defconfig oldconfig
* make -j8 world V= BUILD_LOG=1 CONFIG_PKG_BUILD_JOBS=8
* scp -rp bin/targets/ @my_nas_address:builds/$(date +”%Y%m%dT%H%M%S”)
* sudo shutdown now
The script seems simple enough. Why are my package selections getting clobbered? I can post the contents of my .config if it’s helpful, but of note is this section here:
CONFIG_PER_FEED_REPO=y
# CONFIG_PER_FEED_REPO_ADD_DISABLED is not set
# CONFIG_PER_FEED_REPO_ADD_COMMENTED is not set
CONFIG_FEED_packages=y
# CONFIG_FEED_luci is not set
CONFIG_FEED_routing=y
# CONFIG_FEED_telephony is not set
CONFIG_FEED_powercode=y
Why is scripts/feeds update modifying my .config file? I see “refresh_config();” down at the bottom of update() but I don’t understand why it’s needed.
Thanks,
-Philip
More information about the Lede-dev
mailing list