[Commotion-discuss] Help compiling for TL-WR1043N/ND v3

Josh King jking at chambana.net
Wed Aug 17 01:13:46 UTC 2016


I spent a couple hours today on this problem of rebasing on CC, and it's definitely going to be
somewhat tricky, though I haven't even gotten to the issue of specific problems with packages.

The CMake build system is based on downloading the precompiled OpenWRT imagebuilder and SDK and
using those. That has the advantage of being relatively self-contained and stable, and fast as the
toolchain is already in place. However, the SDK has the problem of being somewhat "leaky." So many
of the packages (talking base OpenWRT stuff, not the Commotion packages) end up trying to use system
utilities to compile stuff, rather than utilities actually included in the SDK toolchain. So for
instance, my compile of some core package (expat, I believe) is bombing out because my system has a
newer version of Gettext than was used to create the autotools input files! I'm tempted to go back
to a simpler build script based on the full buildroot. In any event, I'll clean up and push some
fixes tomorrow so that it can be targeted against Chaos Calmer (though that's a ways from
necessarily having a working image) and see if I can get around the packaging issues. I may also see
about building from a LEDE snapshot in the off chance that some of these issues have been fixed.

On Tue, 2016-08-16 at 13:19 -0500, Ben West wrote:
> Commotion exists as a collection of custom packages overlaid atop the OpenWRT BB build
> environment.  You can see how its build environment comes together in the CMakeLists.txt file in
> this repo:
> https://github.com/opentechinstitute/commotion-router
> 
> This repo is provides pointers to more repos containing the individual custom packages integrated
> into Commotion:
> https://github.com/opentechinstitute/commotion-feed
> 
> I'm uncertain about progress made towards compiling over CC.  The latter detail may be something
> Adam @ Meta Mesh could answer to better.
> 
> Getting Commotion to compile atop OpenWRT DD, aka trunk, would require lots of edits to Makefiles,
> patchsets to source files, etc etc.  No graphical menuconfig available for this.  Also, some
> Commotion-specific packages may just not compile (thinking of the olsrd-mdp package specifically,
> off the top of my head), and have to be excluded.
> 
> Do note that Josh King had earlier mentioned interest in rebasing Commotion atop current
> generation OpenWRT, i.e. precisely what you're asking about.  I gather this will be a work-in-
> progress for some time.
> 
> 
> On Mon, Aug 15, 2016 at 6:31 PM, Nicolas North <star at nikksno.io> wrote:
> > Ok that sounds like excellent news. Thank you for verifying this on your router. So how can I
> > compile commotion for it? I've been able to compile pure owrt cc in the past for a picostation
> > as a test but I wasn't able to do the same with commotion as I never found the pseudo-grafical
> > menu for device specific variables such as wireless card type, etc, and only ever found an svn
> > tutorial on your website but I've only found the git repos. That's all I've been able to do. How
> > can I get the final cw firmware image to flash on the tplink? At what point do I apply the v2/v3
> > hex trick?
> > Thank you so much again!
> >  
> > > Well, what appears to confirm some of what you report is that my
> > > TL-WR1043ND v3 reports its compiled image to be that shared between v2
> > > and v3:
> > > 
> > > root at OpenWrt:~# cat /tmp/sysinfo/model 
> > > TP-Link TL-WR1043N/ND v3
> > > root at OpenWrt:~# cat /tmp/sysinfo/board_name 
> > > tl-wr1043nd-v2
> > > 
> > > Ideally the TFTP recovery will remain operational if the image you
> > > flash doesn't boot, i.e. letting you un-brick it if necessary.
> > > 
> > > On Mon, Aug 15, 2016 at 2:30 PM, Nicolas North <star at nikksno.io>
> > > wrote:
> > > 
> > > > Hi again Ben!
> > > > 
> > > > Thank you so much for your reply
> > > > 
> > > > Ok I see. However we might have a glimpse of hope with this little
> > > > suggestion I found on the TOH:
> > > > 
> > > > HOW TO FLASH CHAOS CALMER (15.05) INTO THE V3 VERSION WITH THE V2
> > > > OPENWRT FACTORY FILE
> > > > 
> > > > Since there is another TP-Link software installed on the V3 version
> > > > of the router which does not accept the firmware file for the V2
> > > > version it is not possible to install CC on it.
> > > > But there is a little trick to install it anyways.
> > > > 
> > > > *
> > > > Download the V2
> > >  version:https://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/openwrt-15.05-ar71xx-
> > > generic-tl-wr1043nd-v2-squashfs-factory.bin 
> > > [1]
> > > 
> > > *
> > > Change with an Hex editor the version number in the header of the
> > > file from 02 to 03 and save the file. It is located in byte 43.
> > > [2]
> > > command-line version for linux:
> > > 
> > > echo -e "\003" | dd seek=67 bs=1 count=1 conv=notrunc
> > > of=firmware_file.bin
> > > *
> > > 
> > > Rename the file to "wr1043v3_tp_recovery.bin" and flash it via tftp
> > > how described above
> > > 
> > > Would this trick solve the issue even for the commotion firmware? If
> > > so, how would I compile it?
> > > 
> > > Thank you so much! Fingers crossed! :)
> > > 
> > > Nicolas
> > > 
> > > On 2016-08-15 20:50, Ben West wrote:
> > > 
> > > I've compiled OpenWRT trunk r49379 for the TL-WR1043N v3.  My
> > > understanding is that a trunk version is required for this device,
> > > i.e. can't flash it with BB or CC.
> > > 
> > > From prior experience compiling Commotion atop r3xxxx-era OpenWRT,
> > > I'd
> > > anticipate these specific difficulties:
> > > 
> > > - Compiling Commotion's luci packages atop recent OpenWRT trunk.  I
> > > think there is significant enough delta in the OpenWRT luci repo
> > > that
> > > current revisions won't compile cleanly with Commotion.
> > > - Compiling Commotion's olsr packages atop olsrd v0.9, which is now
> > > the version packaged with OpenWRT trunk.  Similar situation.
> > > - Dealing with Commotion libcyassl dependencies, since that package
> > > appears to be gradually phasing out in favor of libpolarssl as
> > > lightweight alternative to libopenssl.
> > > 
> > > Please note I can't offer availability in addressing these barriers
> > > to
> > > a clean compile, just sharing experience to help guide others.
> > > 
> > > On Sun, Aug 14, 2016 at 6:22 PM, Nicolas North <star at nikksno.io>
> > > wrote:
> > > 
> > > Hi there!
> > > 
> > > I'm starting a mesh network project here in Milano, Italia, where I
> > > live, and I already have 40 nodes up and running both outside and
> > > inside
> > > peoples' houses, with both commotion and a pure openwrt + olsrd
> > > setup as
> > > described on the Metamesh website. I intend to switch to a 100%
> > > commotion network because of some potentially show stopping issues
> > > I'm
> > > encountering on Tplink routers with Metamesh's setup [I'm doing
> > > something wrong I'm sure - more details below].
> > > 
> > > I WOULD IMMENSELY APPRECIATE ANY HELP IN GETTING COMMOTION COMPILED
> > > FOR THE TP-LINK TL-WR1043N/ND V3 AND IF POSSIBLE THE TP-LINK ARCHER
> > > C7 V2 [WHICH IS DUAL BAND AC SO I ONLY HAVE TWO OF THEM AS A TEST
> > > FOR NOW].
> > > 
> > > In the past I was able to compile openwrt on a linux
> > > vm with a lot of trial and error but was never able to access the
> > > command line config menu for the commotion compiler. I also ran into
> > > svn
> > > tutorials for commotion but only ever found git repos. Also I don't
> > > know
> > > the specs to compile for my speficic hardware, are those available
> > > on
> > > the owrt toh? How can I avoid using the trunk version of openwrt if
> > > there's no stable version listed for the WR1043N/ND v3? I have very
> > > little experience with software compilation so
> > > any help would be fantastic.
> > > 
> > > I've had a very lengthy back and forth conversation that started
> > > here on
> > > the list and then went private with Josh and Ben and Adam over at
> > > Metamesh who have all been extremely nice and helpful and I thank
> > > them
> > > if the project is where it is today. But now I need your help in
> > > ensuring this doesn't all just collapse in front of us because of
> > > these
> > > issues. For the record, Metamesh is amazing, Adam, has been great,
> > > and
> > > I'm sure their setup works, and I'm doing something wrong, but after
> > > reading Josh's message about the future of commotion, I want all my
> > > nodes on commotion for the future of the project.
> > > 
> > > ANY HELP IS OF VITAL IMPORTANTANCE FOR OUR PROJECT. ABOUT 100
> > > PEOPLE
> > > ARE
> > > WAITING FOR THIS TO WORK EVERY DAY. PLEASE HELP. THANK YOU VERY
> > > MUCH IN ADVANCE.
> > > 
> > > Nicolas
> > > _______________________________________________
> > > Commotion-discuss mailing list
> > > Commotion-discuss at lists.chambana.net
> > > https://lists.chambana.net/mailman/listinfo/commotion-discuss [3] [1
> > > [3]]
> > > --
> > > 
> > > Ben West
> > > ben at gowasabi.net
> > > 
> > > Links:
> > > ------
> > > [1] https://lists.chambana.net/mailman/listinfo/commotion-discuss
> > > [3]
> >  
> > -- 
> > 
> > Ben West
> > ben at gowasabi.net
> >  
> > 
> > Links:
> > ------
> > [1]
> > https://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/openwrt-15.05-ar71xx-generic-tl-
> > wr1043nd-v2-squashfs-factory.bin
> > [2]
> > https://wiki.openwrt.org/_detail/media/tplink/tl-wr1043/tl-wr1043nd_version_nr_in_bin_header.jpg
> > ?id=toh%3Atp-link%3Atl-wr1043nd
> > [3] https://lists.chambana.net/mailman/listinfo/commotion-discuss
> 
> 
> 
> 
> _______________________________________________
> Commotion-discuss mailing list
> Commotion-discuss at lists.chambana.net
> https://lists.chambana.net/mailman/listinfo/commotion-discuss
-- Josh King
PGP Fingerprint: 8269 ED6F EA3B 7D78 F074 1E99 2FDA 4DA1 69AE 4999
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.chambana.net/pipermail/commotion-discuss/attachments/20160816/5b8e03de/attachment-0001.sig>


More information about the Commotion-discuss mailing list