Optimized build for the TP-Link C2600 / Netgear R7x00 / Linksys EA8500


#21

I'm getting gigabit no problem here.


#22

Solved the problem. Replaced the cable and voilà :slight_smile:


#23

Hi Escalade!

first of all i love your builds and i have been using them on my wndr3700 and wndr3800.
now i have a tplink c2600 and want to use your new build.
in your previous builds you had pushbullet notifications on vpn login.
i really liked that option is there an easy way voor a noob like me to enable that option again.

thnx for your great builds!

greats luis


#24

Thanks for the great work.
So if I want to build this for my own router (Youku L1), I can just clone your source and build it for my router's profile/target?

Thanks.


#25

Here's the ip-up script, which you need to enable in OpenVPN/strongSwan.

$ cat ipup.sh 
#!/bin/sh

# Is push enabled?
[ $(uci get arokh.settings.push) = "1" ] || exit 0

push() {
  API=$(uci get arokh.settings.push_api)
  MSG="$1"
  if [ ! -z $API ]; then
    curl -k -u $API: https://api.pushbullet.com/v2/pushes -d type=note -d title="OpenWrt" -d body="$MSG" > /dev/null 2>&1
  else
    echo "Set your API key in /etc/config/arokh"
  fi
}

if [ ! -z $PLUTO_PEER ]; then
  if [ $PLUTO_VERB = "up-client" ]; then
    push "IPsec user $PLUTO_PEER_ID connected from $PLUTO_PEER."
  fi
else
  push "OpenVPN client $X509_0_CN connected from $trusted_ip."
fi

Might need to be adapted to use wget as I don't think curl is included in the current build.

@pony

Yes, just start with one of the configs from profiles/.


#26

Is there a mroe step by step guide on how to get VPN to work with the latest build for the archer c2600? I read through my vpn's instructions as well as what is listed here and am unable to figure it out, I am trying to configure privateVPN.com to work. Thank you in advance for your help.


#27

This build ships a VPN server. Client connections to external services are out of the scope of this thread.


#28

Greetings escalade and all,

I am utilizing escalade optimized build on my TP-Link C2600 router. Everything is running great, and I am beyond happy - I want to thank escalade very much for your contributions to the community!

My question is this (may sound dumb): can we do a FULL system upgrade, including a kernel upgrade? and if you wouldn't mind, what process do you use personally to upgrade (IF that is even suggested)?

I have hesitated to do any upgrading of the system so far, for fear I could lose configs, or have shit break during the upgrade process. I am curious your stance on system upgrades of your optimized builds.

Running opkg list-upgradable it shows 210 packages that have updates:

OpenWrt:~# opkg list-upgradable | wc -l
210

I am finding that the kernel version that got installed (4.9.77) is old enough that I cannot use any of the kernel modules on the opkg current servers.

OpenWrt:~#  opkg list-installed | grep -i kernel
kernel - 4.9.77-1-1f3a37c5d5f925b599635bd2260e7a17

Most, if not all current opkg packages show they require different kernel version (4.9.91 at this time), so if I try to install a simple kernel module, for example: kmod-rt2x00-usb
The errors are similar to this:

OpenWrt:~# opkg install kmod-rt2800-usb kmod-rt2x00-usb
Installing kmod-rt2800-usb (4.9.91+2017-11-01-4) to root...
Downloading http://downloads.lede-project.org/snapshots/targets/ipq806x/generic/packages/kmod-rt2800-usb_4.9.91%2b2017-11-01-4_arm_cortex-a15_neon-vfpv4.ipk
Installing kmod-rt2x00-usb (4.9.91+2017-11-01-4) to root...
Downloading http://downloads.lede-project.org/snapshots/targets/ipq806x/generic/packages/kmod-rt2x00-usb_4.9.91%2b2017-11-01-4_arm_cortex-a15_neon-vfpv4.ipk
Configuring kmod-rt2x00-usb.
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-rt2800-usb:
 * 	kernel (= 4.9.91-1-b99371c4cc80dcfdaaaddd5995edca4e) * 	kernel (= 4.9.91-1-b99371c4cc80dcfdaaaddd5995edca4e) * 
 * opkg_install_cmd: Cannot install package kmod-rt2800-usb.

As a way around upgrading, I could see it possible to point opkg at servers that have packages for the kernel the original optimized build runs (in this case/my case 4.9.77), I just have yet to locate said server.
This is my current opkg config:

OpenWrt:~# cat /etc/opkg/distfeeds.conf 
src/gz openwrt_core http://downloads.lede-project.org/snapshots/targets/ipq806x/generic/packages
src/gz openwrt_base http://downloads.lede-project.org/snapshots/packages/arm_cortex-a15_neon-vfpv4/base
src/gz openwrt_luci http://downloads.lede-project.org/snapshots/packages/arm_cortex-a15_neon-vfpv4/luci
src/gz openwrt_packages http://downloads.lede-project.org/snapshots/packages/arm_cortex-a15_neon-vfpv4/packages
src/gz openwrt_routing http://downloads.lede-project.org/snapshots/packages/arm_cortex-a15_neon-vfpv4/routing
src/gz openwrt_telephony http://downloads.lede-project.org/snapshots/packages/arm_cortex-a15_neon-vfpv4/telephony

Does anyone else have any input here for which opkg servers to use, or do you just flat-out run a full system upgrade, and continue to utilize the snapshot opkg servers?

Thank you everyone.


#29

Point your package source here: http://luci.subsignal.org/~trondah/lede/ipq806x/r6007/packages/ (or to whatever build you are using)

This should probably be part of the default config.


#30

thank you for the reply @drawz. the packages at this server you pointed out are great, but limited, i.e. there is ~104 packages mostly for just this device (the TP-Link C2600).
I recently added a USB wireless device to the USB port of my router, and ideally I'd like to obtain the kernel modules to get it up and running.

I believe the reason I added the openwrt/LEDE package servers to my /etc/opkg/distfeeds.conf (http://downloads.lede-project.org/snapshots/packages/arm_cortex-a15_neon-vfpv4/*) was from reading the openwrt opkg documentation.

Anyone possibly have a suggestion where one could locate these? i.e. the rt2x00 and rt2800-usb kernel modules? Is it possible to get access to more opkg packages, that have kernel modules for a larger set of hardware, specifically USB devices that are compatible with our device, and kernel version?


#31

those snapshot packages will always be newer than any build that is more than 24 hours old. You won't be able to use those unless you use the corresponding (ie the same day) snapshot build. You're pretty much stuck with the package repository I sent you if you want to use the build here. This is why it's nice to use a released version of LEDE whenever possible since that is not rebuilt nightly.


#32

@agentdcooper

You can upgrade any package you like except for the kernel. Any packages installed/upgraded will be wiped on the next flash. Read the available documentation on the wiki about the jffs2/overlay design of OpenWrt/LEDE to get a better understanding.

@drawz

You're mistaken, you can install snapshot packages just fine. The packages from my download directory are just the packages that was generated with my build. Other than kernel packages, most from the snapshots feed should be fine.


#33

good point on the kernel packages, but a lot of things seem to depend on kernel packages.


#34

@escalade
this is great information, thank you for help! I'm reading the overlay documentation to get more acquainted with the system. I really appreciate your pointers and code you've shared. keep up the great work :wink:

@drawz
thank you for everything, you've pointed me in the right direction as well.
you're right that many packages depend on kernel packages - in my experience it's mostly the modules that rely directly on the kernel.
I've been using a lot of application packages from the lede-project snapshots that work quite well, as long as they are not dependent on specific kernels.


#35

@escalade
it is looking pretty grim for finding another sever on the internet that we can publicly download pre-built kernel modules from with same ipq806x and kernel (4.9.77) as your optimized build here. I have a thought on how to remedy this, and was hoping you would be willing to talk with me, even off the forum...

I would like to create a development VM (a docker container, Xen, QEMU, KVM, VMware, or similar), duplicate your exact build environment so I can build my own kernel modules for my personal setup (specifically I need kernel modules for rt2x00-usb/lib/mmio and rt2800-usb/lib/mmio, and it wouldn't surprise me to find that I'll need others in the future).

I did see your github link (https://github.com/escalade/LEDE/tree/escalade) and have grabbed this and am working with it right now. I can tell you I am familiar with linux, bsd, etc, I am not a newbie in kernel building and *NIX regards, I don't think I would need to bother you with a ton of questions, I just haven't done much lede development recently. I am hoping you can help get me started with spinning up a development VM for your optimized build here for lede ipq806x r6007 to then build my own kernel modules for arm7l kernel 4.9.77. is that something you would be willing to share, or assist with getting one pointed in the right direction for duplicating your dev/build environment? Heck, maybe you even have a VM you'd be willing to share? :wink:

Any assistance you can provide is MUCH appreciated. Thank you.

PS: I am actively reading up on the LEDE/openwrt development guides, in hopes of teaching myself. any pointers for your exact build would be helpful if you feel so oblidged. =)

UPDATE 04212018: I followed closely the OpenWRT Developer QuickStart guide at h..ps://openwrt.org/docs/guide-developer/quickstart-build-images, but instead of cloning from LEDE git at h..ps://git.lede-project.org/source.git, I substituted @escalade github at h..ps://github.com/escalade/LEDE.git

  • In make menuconfig I setup:
    Target System ⇒ ipq806x
    Target Profile ⇒ TP-LINK Archer C2600
    -- I also told make menuconfig to build each kernel module I need, i.e. rt2x00-* and rt2800-*
  • Then ran make and everything ran great.
  • After completion, I see all my kernel modules got built! BUT they are all built for kernel 4.9.73, which is unfortunate as my Optimized build for TP-Link C2600 system is running kernel 4.9.77.
  • So, now that I believe I have most things figured out, I've been trying to figure out howto tell the build system WHICH kernel version to build, as I'm fairly certain once I get this corrected, kernel modules should get built for the right kernel version_!!_
    -- I found thE OpenWRT Buildroot - Technical Reference document at h..ps://openwrt.org/docs/techref/buildroot that states the file: include/kernel-version.mk specifies the kernel version to use.

I am giving this a shot, hoping to get a valid kernel modue built for 4.9.77 that will be compatible with my system. Once I get things figured out, I will happily pass along the information for others too!
(( NEW USERS CAN ONLY PUT 2 LINKS IN A SINGLE POST! ))


#36

At that point it makes more sense to just build exactly what you need yourself, be it with escalade's changes or not. Recreating an exact kernel version is possible (however the kernel config is part of the version hash, so enabling additional stuff is kind of a problem, not only because of the hash itself, but also due to their impact on the actual kernel ABI), but not exactly easy and a pretty useless effort once you actually need to build it yourself anyways.


#37

greets @slh and all,

ultimately, my goal here is to learn:
1. HowTo optimize my TP-Link C2600 system: @escalade has made this extremely easy by sharing his project.
1a. I hope to learn HowTo leverage this project by utilizing my own additional USB radio hardware by generating kernel modules to get said devices operational
2. by others assisting and sharing their knowledge from 1a, I would happily contribute back what information I learn (if possible)

once I actually built the build system locally, which in turn generated a local copy of @escalade's images, it finally dawned on me what @slh is saying here:

@slh I seriously can't thank you enough for your post! I guarantee I would have been scratching my head for quite some time trying to figure out the hash portion. because, yes, the hash does change, and now that I truly understand your post, I believe I finally "get it" that if I keep my kernel config identical to @escalade's kernel config when he made his optimized builds, I would get an identical hash. but, in my case I need kernel modules that were not in the original kernel config/build, so it is absolutely not possible to get the same hash (are hash collisions a possibility?)... almost like the "chicken and egg scenario" :wink:.

  • my first build produced a kernel with the hash:
    [user@untrusted escalade-LEDE]$ find . -name "*kernel*.ipk"
    ./bin/targets/ipq806x/generic/packages/kernel_4.9.77-1-84a193653ef170aecf53b037dd82352f_arm_cortex-a15_neon-vfpv4.ipk
    
  • all kernel modules I build personally, are going to be based on this kernel hash, so they will not work/load on a system that was built by someone else's hand (for example: @escalade's builds he's posted at the OP's post, or similar)... we would get an error like so:
    OpenWrt:~# opkg install kmod-rt2800-usb_4.9.77\+2017-11-01-3_arm_cortex-a15_neon-vfpv4.ipk 
    Installing kmod-rt2800-usb (4.9.77+2017-11-01-3) to root...
    Collected errors:
     * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-rt2800-usb:
     * 	kernel (= 4.9.77-1-84a193653ef170aecf53b037dd82352f) * 	kernel (= 4.9.91-1-b99371c4cc80dcfdaaaddd5995edca4e) * 
     * opkg_install_cmd: Cannot install package kmod-rt2800-usb.
    
  • as the kernel on my system is based on a kernel with the following hash (just as anyone else that is using @escalade's optimized builds for TP-Link C2600 r6007):
    OpenWrt:~# opkg list-installed | grep -i kernel
    kernel - 4.9.77-1-1f3a37c5d5f925b599635bd2260e7a17
    

please correct me if I am wrong, I just want to ensure I fully understand and learn. it sounds like in order to make kernel modules for one's own system, while still keeping the benefits of @escalade's optimized builds:

  • one should utilize @escalade's github openWRT/LEDE buildsystem from OP's post (note: I had to use the "escalade" branch to get a kernel version 4.9.77 build, I know that's not required, I am just mentioning it)
  • then went on to build a local copy using the buildroot system (as the openWRT/LEDE documentation suggests)
    • here are the instructions I used to build my system locally on my qubes 4 box @ https://pastebin.com/GYiKp9a7
    • and here is a copy of the kernel .config that was generated @ h..ps://pastebin.com/HEHMzqyW
    • here is the Image that got built locally when using the above mentioned process (noticed the .bin images are drastically smaller then @escalade's builds published in OP's post):
      [user@untrusted escalade-LEDE]$ ls -al bin/targets/ipq806x/generic/
      total 8788
      drwxr-xr-x 3 user user    4096 Apr 20 22:01 .
      drwxr-xr-x 3 user user    4096 Apr 20 21:14 ..
      -rw-r--r-- 1 user user   14304 Apr 20 21:14 config.seed
      -rw-r--r-- 1 user user    2356 Apr 20 22:01 openwrt-ipq806x-device-tplink-c2600.manifest
      -rw-r--r-- 1 user user 4432914 Apr 20 22:01 openwrt-ipq806x-tplink_c2600-squashfs-factory.bin
      -rw-r--r-- 1 user user 4522172 Apr 20 22:01 openwrt-ipq806x-tplink_c2600-squashfs-sysupgrade.bin
      drwxr-xr-x 2 user user    4096 Apr 20 22:01 packages
      -rw-r--r-- 1 user user     424 Apr 20 22:01 sha256sums
      

based on what I've discovered and learned, my question to the community has morphed a bit:

  • what is the best way to install a kernel module built locally while still retaining @escalade's optimized builds?

    • I am going to make a guess to answer the above question (and could be totally wrong):
    • would the process require one to create a local build, selecting and building all kernel modules desired, and then install the resulting Image (i.e. *-sysupgrade.bin or *-factory.bin) via the openWRT/LEDE firmware installation/upgrade process?
  • ideally, I would like to keep all of @escalade's hard work intact + my current configs, and just install the *-sysupgrade.bin that was generated IF that is determined a proper and validly workable route.

    • my research leads me to believe this would be done through the openWRT/LEDE firmware upgrade process or LuCI flash new firmware image page, where I see that we can check the "Keep settings" box. I am asking this, because this is stated on that page:
      Check "Keep settings" to retain the current configuration (requires a compatible firmware image).
      
    • originally, I wanted to ask how do I know if my firmware image is "compatible"?
      • upon reading up on the openWRT/LEDE documentation page labeled "Web GUI Sysupgrade: The "Keep settings" checkbox": it is mentioned to back-up your own settings it's preferable to use a custom installation script along the lines of the config_openwrt.sh script

at this point, the following reasons are what make me hesitate to "flash" my system with the latest locally built Image:
1. I am not sure if the Image that I built is considered a "compatible" Image
1a. this concern of mine stems from the fact that due to the large size difference between my locally built Image being ~4.5MB, and @escalade's r6007 Image being 11.5MB
2. I am not sure if the new flash will retain ALL of @escalade's optimized build settings
2b. based on the files cloned from @escalade's github, when running make menuconfig I am not 100% certain that @escalade's exact kernel config was used.
2c. I believe when one selects c2600 in make menuconfig it pulls in the kernel config from profiles/c2600 folder, in effect duplicating his setup.
2d. can someone confirm if this is true?
3. I am not sure if the new flash would keep all my settings (I can more then likely reproduce most of my settings from scratch, worst case scenario - or as mentioned above, utilize the config_openwrt.sh script)

my hope is that by posting my concerns there may be others who may have been down this path, or those who are just flat-out more knowledgeable on these matters that can potentially point out any flaws in my own reasoning or be it ignorance to help alleviate any un-founded fears. ultimately assisting by pointing me in the right direction.

thank you all for your time and assistance.


#38
  1. Sure, it should be compatible i.e. you can sysupgrade to it.
    1a. Most likely you did not update the feeds, so most of my extra packages haven't been included.
  2. See 1a.
    2b. If you cloned my repo you should have the same kernel.
    2c. No, the files under profiles/ are simply my own diffconfigs for each router. You will need to copy to .config manually. Could also explain 1a I guess.
    2d. Confirmed not true.
  3. It will most likely keep everything you need. If you want details, look at the sysupgrade script.

#39

gotta hand it to you, thanks for the quick post!
regarding your answer to 1a:

I can report I did issue the feed updates and install to your cloned repo:

./scripts/feeds update -a
./scripts/feeds install -a
  • I even went so far as to post a copy of each step I took over at pastebin

all-in-all, thank you for your post! it gives me great hope that I'm on the right track here.
thank you for everything @escalade!


#40

I'm quite thrilled to post that as of today, I have everything working properly on a personal build+image of @escalade's optimized build for the TP-Link C2600. in my case, I'm utilizing kernel modules locally built using @escalade's buildsystem published on github listed in OP

I can't thank everyone enough who helped me = escalade, slh, drawz, and all the other posters at this page :grin:
(new users cannot mention more then 2 people in a single post, lol)

if anyone else has interest in this process, I noted and published it on pastebin with relevant links, and processes. my documentation is more geared toward Qubes 4.