[SOLVED]How to compile firmware with LEDE v17.01.0 kernel and the last updated release channel packages

When I git checkout v17.01.0 and compile a firmware, and ssh login with 'opkg update && opkg update-upgradable', I find some new version ipk from http://downloads.lede-project.org/releases/17.01.0/ releases channel.
But I do not wants upgrade them on overlayfs, I need compile those new version into firmware. Edit feeds.conf.default point to HEAD have no effect with those packages.
Need help which config file should I need adjust to product the same version of those packages as http://downloads.lede-project.org/releases/17.01.0/ releases channel.

root@Lede:~# opkg list-upgradable
ubus - 2017-01-22-6f4e11e1-1 - 2017-02-18-34c6e818-1
busybox - 1.25.1-2 - 1.25.1-3
libubus-lua - 2017-01-22-6f4e11e1-1 - 2017-02-18-34c6e818-1
libcurl - 7.52.1-2 - 7.52.1-3
libmbedtls - 2.4.0-2 - 2.4.2-1
ubusd - 2017-01-22-6f4e11e1-1 - 2017-02-18-34c6e818-1
firewall - 2017-01-13-37cb4cb4-1 - 2017-01-13-37cb4cb4-2
curl - 7.52.1-2 - 7.52.1-3
ppp - 2.4.7-10 - 2.4.7-11
libubox - 2016-11-29-77a62937-1 - 2017-02-24-96305a3c-1
libjson-script - 2016-11-29-77a62937-1 - 2017-02-24-96305a3c-1
libblobmsg-json - 2016-11-29-77a62937-1 - 2017-02-24-96305a3c-1
jshn - 2016-11-29-77a62937-1 - 2017-02-24-96305a3c-1
ip-tiny - 4.4.0-8 - 4.4.0-9
libubus - 2017-01-22-6f4e11e1-1 - 2017-02-18-34c6e818-1
ppp-mod-pppoe - 2.4.7-10 - 2.4.7-11
root@Lede:~# cat /etc/opkg/distfeeds.conf
src/gz reboot_core http://downloads.lede-project.org/releases/17.01.0/targets/ramips/mt7621/packages
src/gz reboot_base http://downloads.lede-project.org/releases/17.01.0/packages/mipsel_24kc/base
src/gz reboot_luci http://downloads.lede-project.org/releases/17.01.0/packages/mipsel_24kc/luci
src/gz reboot_packages http://downloads.lede-project.org/releases/17.01.0/packages/mipsel_24kc/packages
src/gz reboot_routing http://downloads.lede-project.org/releases/17.01.0/packages/mipsel_24kc/routing
src/gz reboot_telephony http://downloads.lede-project.org/releases/17.01.0/packages/mipsel_24kc/telephony
root@Lede:~# cat /etc/os-release
NAME="LEDE"
VERSION="17.01.0, Reboot"
ID="lede"
ID_LIKE="lede openwrt"
PRETTY_NAME="LEDE Reboot 17.01.0"
VERSION_ID="17.01.0"
HOME_URL="http://lede-project.org/"
BUG_URL="http://bugs.lede-project.org/"
SUPPORT_URL="http://forum.openwrt.org/"
BUILD_ID="r3205-59508e3"
LEDE_BOARD="ramips/mt7621"
LEDE_ARCH="mipsel_24kc"
LEDE_TAINTS="no-all busybox"
LEDE_DEVICE_MANUFACTURER="LEDE"
LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/"
LEDE_DEVICE_PRODUCT="Generic"
LEDE_DEVICE_REVISION="v0"
LEDE_RELEASE="LEDE Reboot 17.01.0 r3205-59508e3"

You get the HEAD pointing feeds if you git checkout 17.01 branch instead of the 2-month old 17.01.0 release.

I did, and it do not work. Because feed config donot touch anything of 'base' packages.
ubus busybox are in base package dir.
I find another branch 'lede-17.01' besides 'v17.01.0', with those base packages updated, but that branch also changed linux kernel version, from 4.4.50 to 4.4.59, I do not want that, 4.4.59 will make my router hang random time(almost less than 24 hours), I leave master branch and stay release version v17.01.0 kernel 4.4.50 because that.

Is there any way to compile a firmware with v17.01.0 branch kernel and lede-17.01 branch base packages?

I make a branch mix attempt, and now compiling. I hope this is the right way.

git checkout lede-17.01
rm -rf target/linux/*
git checkout v17.01.0 -- target/linux/
git checkout v17.01.0 -- include/kernel-version.mk

Hmm. You are right, those packages that you are especially interested in, are part of the main sources, not feeds. If you use 17.01 HEAD that has those packages, you will bump the kernel that is in the same repo.

I think that the only way is manual editing/copying of the changes packages & patches and/or reverting some git commits.

Two approaches:

Note: opkg in 17.0 HEAD is broken since a few hours ago, as the master opkg-lede version is being backported to 17.01 and that caused some problems that have not yet been fixed. So, if you try compiling 17.01 HEAD, you need to revert today's opkg commits.

Thank you for your advice. First compile meet kernel patches fail, so I do 'rm -rf target/linux' and checkout to branch v17.01.0 try again. I also checkout all others to HEAD~4 to avoid the broken opkg.

Finally, I got what I want, the v17.01.0 kernel 4.4.50 and last updated base packages mix up firmware.
There still need a little tune with router's /etc/opkg/distfeeds.conf.
download channel is point to release/17.01-SNAPSHOT, which contain kmod for kernel 4.4.59, incompatible with this firmware. So I need change the first line in /etc/opkg/distfeeds.conf

src/gz reboot_core http://downloads.lede-project.org/releases/17.01-SNAPSHOT/targets/ramips/mt7621/packages

to

src/gz reboot_core http://downloads.lede-project.org/releases/17.01.0/targets/ramips/mt7621/packages

Did you report this issue already? We'll release v17.01.1 soon and this will contain 4.4.59 (or a later version of it).

No, I am not too much sure about if that cause by a kernel issue, but I meet hang on both kernel 4.4.59 and 4.9.20, several times, my device is MQMaker Witi. Now i am using 4.4.50, uptime 13:34, still need time testing.

./scripts/diffconfig.sh | head -3
CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_mt7621=y
CONFIG_TARGET_ramips_mt7621_DEVICE_witi=y

@ffee I experienced one random reboot as well with .59, however, it at least seems before that it had been running smooth for multiple days. I am still looking at SQM as a possible culprit though.

I have had this build for almost a week, the other (non-ramips) devices are still up. The last reboot caught me by surprise, so I wasn't able to peek at dmesg before it happened (with hardware offloading enabled, there were some symptoms before the DIR-860L would give up completely and just reboot). If SQM were the cause, though, it'd show up pretty quickly in dmesg as switch driver kernel traces (if there is such a thing :P). Dmesg looks clean still, here, and 15h+ uptime again atm.