Update the local repo

Hi folks!

Noob question:

If I want to bring my local repo from master (git clone...) to the latest without changing my config, is this correct? Any more to do?

git pull
./scripts/feeds update -a
./scripts/feeds install -a

That sounds correct.

You should also straighten the possibly changed dependencies with "make defconfig" (after the source updates)

Hi @hnyman

Thank you for the answer. I read about "make defconfig" but didn't get it fully.. It will not touch my changes made in "menuconfig", right?

./scripts/diffconfig.sh > configdiff
...
cp configdiff .config
make defconfig

use liberally to keep config dependencies right, and when you want to add packages but are unsure if you will keep things; dependencies are added with a package add, but are not removed on deletion.

Sorry, I don't get it what you mean. Is there a noob answer too? :grinning:

A bit more advanced...

Example:
if you select in menuconfig a package like luci-app-sqm, it then automatically pulls in its dependencies (sqm-scripts, kmod-sched-core, kmod-sched-cake, etc.)

If you later de-select the luci-app-sqm, all dependencies are still left there and they are not removed from .config. Your build will slowly fatten.

By keeping the list of "difference to defaults" as the seed .config you can more easily later remove also the dependencies. Note that the basic diffconfig output serves as the basis, but it can be heavily pruned still.

Personally I keep this kind of "recipe":
Programmatically (non-interactively) configure the OpenWrt build - #3 by hnyman

# Use "make defconfig" to expand this to a full .config
CONFIG_TARGET_ipq806x=y
CONFIG_TARGET_ipq806x_generic=y
CONFIG_TARGET_ipq806x_generic_DEVICE_netgear_r7800=y

# Per-package build logs in <buildroot>/logs
CONFIG_DEVEL=y
CONFIG_BUILD_LOG=y

# Debugging options (build gdbserver, include package debug)
CONFIG_PACKAGE_gdbserver=m
CONFIG_DEBUG=y

# Include package list in build
CONFIG_INCLUDE_CONFIG=y

# Longer waiting for failsafe button push
CONFIG_IMAGEOPT=y
CONFIG_PREINITOPT=y
CONFIG_TARGET_PREINIT_TIMEOUT=5

# Busybox tweaks
CONFIG_BUSYBOX_CUSTOM=y
#CONFIG_BUSYBOX_CONFIG_DIFF=y
CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY=y
CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_FLAGS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_REGEXP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_WINCH=y

### Build also ath10k mainline .ipk
### (disable this if you use the below section to fully switch to mainline)
CONFIG_PACKAGE_kmod-ath10k=m

## # Mainline ath10k wifi firmware and driver instead of -ct
## CONFIG_PACKAGE_ath10k-firmware-qca9984=y
## # CONFIG_PACKAGE_ath10k-firmware-qca9984-ct is not set
## CONFIG_PACKAGE_kmod-ath10k=y
## # CONFIG_PACKAGE_kmod-ath10k-ct is not set

# Add-on programs
CONFIG_PACKAGE_ccrypt=y
CONFIG_PACKAGE_curl=y
CONFIG_LIBCURL_OPENSSL=y
CONFIG_PACKAGE_diffutils=y
CONFIG_DROPBEAR_ECC=y
CONFIG_PACKAGE_htop=y
CONFIG_PACKAGE_irqbalance=y
CONFIG_PACKAGE_nano=y
CONFIG_PACKAGE_patch=y
CONFIG_PACKAGE_tcpdump-mini=y
CONFIG_PACKAGE_tree=y
CONFIG_PACKAGE_wget-ssl=y

# USB device mount & file systems support
CONFIG_PACKAGE_block-mount=y
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_kmod-fs-cifs=y
CONFIG_PACKAGE_kmod-fs-exfat=y
CONFIG_PACKAGE_libblkid=y
CONFIG_PACKAGE_kmod-fs-ext4=y
CONFIG_PACKAGE_kmod-fs-hfsplus=y
CONFIG_PACKAGE_kmod-fs-msdos=y
CONFIG_PACKAGE_kmod-fs-vfat=y
CONFIG_PACKAGE_ntfs-3g=y
CONFIG_PACKAGE_kmod-nls-cp1250=y
CONFIG_PACKAGE_kmod-nls-cp437=y
CONFIG_PACKAGE_kmod-nls-cp850=y
CONFIG_PACKAGE_kmod-nls-iso8859-1=y
CONFIG_PACKAGE_kmod-nls-iso8859-15=y
CONFIG_PACKAGE_kmod-nls-utf8=y

# IPv6 support
CONFIG_PACKAGE_6in4=y
CONFIG_PACKAGE_6to4=y
CONFIG_PACKAGE_6rd=y

# IPv6 NAT support (ip6tables NAT extensions, ipt-nat6 and nf-nat6 kmods)
CONFIG_PACKAGE_ip6tables-mod-nat=y

# WLAN/WPS support
CONFIG_PACKAGE_hostapd-utils=y
#CONFIG_WPA_MSG_MIN_PRIORITY=2
CONFIG_WPA_MSG_MIN_PRIORITY=4
CONFIG_PACKAGE_wpad-openssl=y
# CONFIG_PACKAGE_wpad-basic-wolfssl is not set
# CONFIG_PACKAGE_libustream-wolfssl is not set

# SSL certificates
CONFIG_PACKAGE_ca-certificates=y

# Luci (SSL from OpenSSL)
CONFIG_PACKAGE_luci-ssl-openssl=y
CONFIG_PACKAGE_luci-app-commands=y
CONFIG_PACKAGE_luci-app-ddns=y
CONFIG_PACKAGE_luci-app-sqm=y
CONFIG_PACKAGE_luci-app-uhttpd=y
CONFIG_PACKAGE_luci-app-upnp=y
CONFIG_PACKAGE_luci-app-wol=y
# CONFIG_LUCI_JSMIN is not set

# Luci statistics
CONFIG_PACKAGE_luci-app-statistics=y
CONFIG_PACKAGE_collectd-mod-conntrack=y
CONFIG_PACKAGE_collectd-mod-cpufreq=y
CONFIG_PACKAGE_collectd-mod-dhcpleases=y
CONFIG_PACKAGE_collectd-mod-entropy=y
CONFIG_PACKAGE_collectd-mod-ping=y
CONFIG_PACKAGE_collectd-mod-sqm=y
CONFIG_PACKAGE_collectd-mod-thermal=y
CONFIG_PACKAGE_collectd-mod-uptime=y

# Build material and openwrt-2020 themes, default is still bootstrap
CONFIG_PACKAGE_luci-theme-material=y
CONFIG_PACKAGE_luci-theme-openwrt-2020=y

# kernel support for tunnels, VPNs
CONFIG_PACKAGE_kmod-tun=y

# wireguard
CONFIG_PACKAGE_luci-app-wireguard=y

# PPTP support
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_ppp-mod-pptp=y

# iptables add-on ipsec
CONFIG_PACKAGE_iptables-mod-ipsec=y

# Support for IETF BCP38
CONFIG_PACKAGE_luci-app-bcp38=y

# Adblock package with Luci support, initially disabled
CONFIG_PACKAGE_luci-app-adblock=y

# BanIP package with Luci support, initially disabled
CONFIG_PACKAGE_luci-app-banip=y

# nlbwmon app
CONFIG_PACKAGE_luci-app-nlbwmon=y

# chaoskey TRNG USB dongle
CONFIG_PACKAGE_kmod-chaoskey=y

That contains all apps that I have intentionally selected for the firmware. Everything related to them gets automatically pulled in. But if I remove ont of the top-most packages from this list, my next build will drop its unnecessary dependencies (that have been automatically selected).

1 Like

Thank you @hnyman for that detailed explanation. It's much more clear now!

What would happen, if a package in "configdiff" doesn't exist in the latest sources anymore?
If I remember correctly, it was the case with "wget" in 19.07 changed to "wget-ssl/nossl" in latest master.

Edit:
Anyway...if I just want to "update" the following should be sufficient, correct?

No difference to the normal .config: The old selection simply disappears, and you need to notice that and manually select a new replacement package.

For that reason I always compare the diffconfig and manifest from the previous build to the same files from the new build, so that I notice the unepexcted changes. Keeping up with OpenWrt changes is easy, but you need to be methodical.

Yes.

Slight correction to your explanation there:

  • Ensures that the current dependencies are ok. Pulls in any possible new dependencies.
  • Removes non-existing packages from .config. But it does NOT clean outdated dependencies (if the packages still exist but they are not needed any more)

But a

./scripts/diffconfig.sh > configdiff
...
cp configdiff .config
make defconfig

will do, or have I remove unnecessary dependencies always manually?

Seriously, for a noob like me it's probably better to start from scratch with "git clone"... :grinning_face_with_smiling_eyes:

After I played through it....Yes, it does!

@hnyman and @anomeome thank you a lot for your help!

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

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