Updated toolchains?

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
rkboni
DD-WRT User


Joined: 04 Mar 2016
Posts: 51

PostPosted: Wed Jul 17, 2019 6:12    Post subject: Updated toolchains? Reply with quote
Hello Devs!

I just recently updated my main DDWRT router which I'd kept on a 2-year old version since I had built a few additional kernel modules for e.g. USB HID support so I could control the APC UPS from it.

My 2017-vintage modules were all built with GCC: (LEDE GCC 6.3.0 r3143-e982c4b) 6.3.0 (which I believe I downloaded from the toolkit bundle on the DDWRT downloads site).

However, the new build (v3.0-r40189 std, TPLink Archer C9), is using gcc version 9.1.0 (OpenWrt GCC 9.1.0 r10178+1-0e1d07af1d), which doesn't look to be available anywhere.

Can someone update the toolchains bundle, or at least push the above toolchain up so the rest of us can grab it?

Thanks!
Sponsor
rkboni
DD-WRT User


Joined: 04 Mar 2016
Posts: 51

PostPosted: Wed Jul 31, 2019 20:31    Post subject: Reply with quote
So it looks like the newest builds are using OpenWRT's toolchain, which as soon as you clone the right Git repo (the mirror at GitHub ought to do: https://github.com/openwrt/openwrt, or the official one at https://git.openwrt.org/openwrt/openwrt.git), is fairly easy to set up per https://github.com/openwrt/openwrt/blob/master/README

Note that you don't have to build the entire kit, just the toolchain package when selecting what to build via make menuconfig.

I did have to alias a bunch of commands in the toolchain bin/ directory since the DD-WRT build assumes arm-linux- or arm-linux-uclibc- prefixes for the toolchain tools. I merely linked them to the arm-openwrt-linux- equivalents.

One you have all that, then it's the same old stumble through the DD-WRT builds which has been discussed elsewhere. I didn't get far enough to rebuild the entire firmware, just to get a kernel build and the associated modules. Note that for the above, I had to disable CONFIG_WL and CONFIG_DHDAP or I got linking complaints (IIRC, against some GPL-only locking/mutex methods), as otherwise the module check failed and none of the modules were linked as a result.

Hope this helps someone.

PS: the USB HID device apparently got turned into a USB sub-device (vs. a top-level HID device), so my device nodes also needed to be re-created.


Last edited by rkboni on Thu Aug 01, 2019 2:13; edited 1 time in total
rkboni
DD-WRT User


Joined: 04 Mar 2016
Posts: 51

PostPosted: Wed Jul 31, 2019 20:35    Post subject: Reply with quote
Also worth noting that I wasn't pedantic enough to check out the same Git rev as the DD-WRT toolchain was built from, but everything still worked. My GCC version is: OpenWrt GCC 9.1.0 r10569-11617bcb3b

Last edited by rkboni on Thu Aug 01, 2019 2:12; edited 1 time in total
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14244
Location: Texas, USA

PostPosted: Wed Jul 31, 2019 21:12    Post subject: Reply with quote
Honestly, using anything newer than 6.x or 7.x (or even 8.x) for embedded is a bit overkill. BUT, I think that is the same or close to the same toolchain currently used in DD-WRT.
rkboni
DD-WRT User


Joined: 04 Mar 2016
Posts: 51

PostPosted: Wed Jul 31, 2019 22:48    Post subject: Reply with quote
kernel-panic69 wrote:
Honestly, using anything newer than 6.x or 7.x (or even 8.x) for embedded is a bit overkill. BUT, I think that is the same or close to the same toolchain currently used in DD-WRT.


Yeah my aim was not to up the ante but merely match the toolchain the latest version I upgraded to was built with.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14244
Location: Texas, USA

PostPosted: Fri Feb 28, 2020 3:34    Post subject: Reply with quote
The problem with more recent firmware images now is there is no libstdc* to run strings on to figure out which toolchain is required to compile. None of the other library files have anything in them of use that I can find. Yet another hurdle to overcome.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
rkboni
DD-WRT User


Joined: 04 Mar 2016
Posts: 51

PostPosted: Sat Feb 29, 2020 1:32    Post subject: Reply with quote
kernel-panic69 wrote:
The problem with more recent firmware images now is there is no libstdc* to run strings on to figure out which toolchain is required to compile. None of the other library files have anything in them of use that I can find. Yet another hurdle to overcome.


Hmm, I hadn't thought of using the userland binaries for this. I think I got the toolchain info from kernel build info, ie /proc/version
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14244
Location: Texas, USA

PostPosted: Sat Feb 29, 2020 2:12    Post subject: Reply with quote
rkboni wrote:
kernel-panic69 wrote:
The problem with more recent firmware images now is there is no libstdc* to run strings on to figure out which toolchain is required to compile. None of the other library files have anything in them of use that I can find. Yet another hurdle to overcome.


Hmm, I hadn't thought of using the userland binaries for this. I think I got the toolchain info from kernel build info, ie /proc/version


That's probably the only way you're going to now. Thanks for helping me think outside the box.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
rkboni
DD-WRT User


Joined: 04 Mar 2016
Posts: 51

PostPosted: Sat Feb 29, 2020 4:03    Post subject: Reply with quote
kernel-panic69 wrote:
rkboni wrote:
kernel-panic69 wrote:
The problem with more recent firmware images now is there is no libstdc* to run strings on to figure out which toolchain is required to compile. None of the other library files have anything in them of use that I can find. Yet another hurdle to overcome.


Hmm, I hadn't thought of using the userland binaries for this. I think I got the toolchain info from kernel build info, ie /proc/version


That's probably the only way you're going to now. Thanks for helping me think outside the box.


Sure! It did help that I was more interested in building kmods than a whole new router image Wink Laughing
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum