[RFH] ath79: chunking diff from wndr3800 tarball

Daniel F. Dickinson cshored at thecshore.com
Tue Mar 24 07:53:55 CET 2020


Please note this email has two parts: the technical / working on stuff 
part and some footnotes[1].  Please do not reply to the footnotes on 
list.  While they are u-boot related they are only included for reasons 
outlined in[2].

I know I'm late to the party but I ended up wanting to replace the 
u-boot on my various Netgear WNDR3800 devices[1].  This led to looking 
for support in current master (not present; there is some ar71xx/ath79 
support but not enough (from what I can see) and the wndr3800 also 
requires an rtl8366s driver which is not currently available in u-boot.

Unfortunately there are reasons, which I discovered, that the support 
has never made it into master.  The fact that the devices are based on a 
highly modified version of u-boot from a point between 1.1.4 and 1.1.5, 
combined with the fact the mod looks (to me) rather ugly has hindered 
efforts to get the support into mainline.

One can see the >43k-line diff (although some of that is context) at 
https://github.com/cshoredaniel/u-boot-wndr3800/commit/145826194799377f48671fb3354f3bed159a21c7 
which is based on copying the Netgear open source tarball onto 
https://github.com/cshoredaniel/u-boot-wndr3800/commit/5fbb2cd3b1b11352dfb73f0b8326c323662182a8 
(upstream u-boot commit 5fbb2cd3b) which is the commit of the last 
changelog message that appears in netgear tarball.

It looks like there may be some other commits without changelog entries 
that are in the tarball code, which I have not yet identified.  It be 
nice to have help with that, if there is anyone still interested in this 
support, since even though I could do it, there is a rather a big chunk 
of work to do, and it'd go faster with help.

It is my thought that rather than trying to use huge diff to identify 
what needs to be added to mainline, that the first step is to take a 
relaxed tree (the github repo from I've pointed to specific commits 
above) and split the diff into separate commits that are more like the 
kind of commits one would normally see (that is reasonably small commits 
that are changing the base code for a narrow and specific purpose).

If you are aware of someone who has already done this, or part of it, 
please point me to the code!  For that matter any docs or work that's 
already been done, I'd like to know about.  So far I've taken a brief 
look at the OpenWrt ar71xx for a different device (which looks like it 
can help) and https://github.com/pepe2k/u-boot_mod (which doesn't 
because it looks more like hacking on top of merge of various ar71xx 
tarballs, although I haven't looked closely; that and the README 
specifically warns against trying to use that repo get anything upstream 
(here)).

I've seen the occasional patch series to add ar71xx support to mainline, 
but from a *brief* peek it looks like it was more a case taking chunks 
of the tarball diff, and merging against mainline, without actually 
understanding mainline and/or the tarball.  I'm trying to avoid doing 
that, but first the diff needs to be chunked into manageable bits.  I'll 
be working on it, but any help in getting there would appreciated (this 
is a side scratch-my-own-itch project so it won't happen quickly, if it 
all, without help).

I know I have reading and learning to do on mainline to make this happen 
too, but I'm not sure how much help can be offered there other me just 
reading the available docs and poking away at the sandbox and x86 and/or 
qemu versions (which are the supported devices I currently have available).

So, please, if anyone can offer help and/or helpful suggestions, info, 
or advice, it would be appreciated.

===============================================================

Footnotes: Do not reply to anything below here on the u-boot mailing list[2]

[1] The short summary is that I ended up needing to use the u-boot 
serial console to recover a soft-bricked WNDR3800 and thought that the 
devices I'd bought on eBay had been maliciously altered.

I turns out that the reboot behavior of advertising the router's 
readiness to accept a firmware, and being able to reflash the router 
over the network was by design.  (You read that right, on boot a number 
of netgear devices *advertise* themselves as reflashable over the 
network and accepts firmware via a protocol netgear calls NMRP -- am I 
the only one who wonders what exec in their right mind thought this was 
fine for millions of production units, and am boggled that it's real? )

(For the curious the main NMRP code sections are in these files: 
https://github.com/cshoredaniel/u-boot-wndr3800/commit/145826194799377f48671fb3354f3bed159a21c7#diff-158d650f8c314f5cf37ed472eed53b5b, 
https://github.com/cshoredaniel/u-boot-wndr3800/commit/145826194799377f48671fb3354f3bed159a21c7#diff-6e2be3e4732599d1f72e8f01bc470020, 
https://github.com/cshoredaniel/u-boot-wndr3800/commit/145826194799377f48671fb3354f3bed159a21c7#diff-672b862a81954376cf7802c24acc3791, 
https://github.com/cshoredaniel/u-boot-wndr3800/commit/145826194799377f48671fb3354f3bed159a21c7#diff-88d7ea1aabdbadf91c69a50c75eec587, 
https://github.com/cshoredaniel/u-boot-wndr3800/commit/145826194799377f48671fb3354f3bed159a21c7#diff-d5b8f667ae217b2549a8e0607fc32a45, 
and 
https://github.com/cshoredaniel/u-boot-wndr3800/commit/145826194799377f48671fb3354f3bed159a21c7#diff-9257873a471f8127b74b6091b1484a5f).

This has been well known for long enough that the OpenWrt WNDR3700v2 
page has had information on how to use NMRP to install OpenWrt for quite 
a long time.

Just **boggle!**

[2] I kept [1] in this email because, for personal reasons I've not been 
posting on tech or tech-social lists for quite some time and have no 
idea where **high-quality** discussion of this sort of thing can be had 
(reddit need not apply, for example) and would be quite happy if a 
helpful soul on this list (who are more likely than a search engine to 
give useful results) would move replies and discussion of to a more 
appropriate venue with good quality (but please if someone else has 
already done so, don't make this war of venues on the u-boot list).
It's also definitely of interest to u-boot folks (I'd think), but I 
discussion of it could quickly get off-topic, hence my request to have 
the discussion elsewhere (unless the list admins step in and say 
otherwise, that is).

And a reminder: PLEASE DO NOT SEND REPLIES TO THE FOOTNOTES TO THE 
U-BOOT LIST.



More information about the U-Boot mailing list