Using the OpenWRT 22.03rc5 SDK

Just documenting another adventure while trying to debug tcpdump - Tcpdump segfault

I have downloaded https://archive.traverse.com.au/pub/traverse/ls1088firmware/openwrt/branches/22_03/585453076/image/openwrt-sdk-armvirt-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz, extracted it in a Debian virtual machine and run

scripts/feeds update -a
Updating feed 'base' from 'https://gitlab.com/traversetech/ls1088firmware/openwrt.git;22-03' ...
Cloning into './feeds/base'...
warning: Could not find remote branch 22-03 to clone.
fatal: Remote branch 22-03 not found in upstream origin

The first line of feeds.conf.default in https://archive.traverse.com.au/pub/traverse/ls1088firmware/openwrt/branches/22_03/585453076/image/openwrt-sdk-armvirt-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz should be src-git base https://gitlab.com/traversetech/ls1088firmware/openwrt.git;22_03

After fixing this I could run scripts/feeds update -a && scripts/feeds install -a and run make menuconfig to turn on package builds with debug symbols and disable stripping.

Unfortunately the SDK tarball seems to lack the ability to build a host cross gdb, but I’ll just run gdb on the Ten64 itself.

make package/tcpdump/compile
make package/gdb/compile
make package/gdbserver/compile #in case I do get cross gdb working

Ah, the openwrt build scripts change _ to - in feeds.conf when generating the SDK, which is not what I want. I have patched it out before but forgot to do it on this branch.

I’ll check on gdbserver soon.

So I don’t forget, this is the patch in question:

It fixes the git reference in the generated SDK feeds.conf to be the exact commit the build was generated from. Otherwise you might end up building for a later base/kernel version than you are running.
(formal OpenWrt.org releases are generated from tags so don’t have this problem)

It also sidesteps the substitution of _ with - that occur in the SDK feeds.conf

To fix a broken SDK, change the base package reference in feeds.conf(.default) to the exact commit

$ cat feeds.conf.default
src-git base https://gitlab.com/traversetech/ls1088firmware/openwrt.git^6a2b44e4cefae89bf069a4746c75464c92cd9faa

Our build numbers are the GitLab CI pipeline IDs so you can look up the commits here