The idea with poking into NetBSD was twofold. One was to actually see the Orange Pi running at 100 Mbit, and we did that. This had the interesting byproduct of seeing "jumbo packets" being used. The second was to examine either the NetBSD source or U-Boot sources to see how they handled the initialization of the emac and the PHY. We now have confirmed that both indeed use the network at 100 Mbit, so our interest now lies in looking at the sources.
A side not has a place here. Why not examine linux, and in particular Armbian. Armbian, unlike NetBSD, has a debian centric build system and has always been hostile towards other linux setups. I use Fedora, making doing anything with Armbian extremely unpleasant. That aside, linux source are much less straightforward than NetBSD sources to study. There is a big learning curve for someone wanting to work with the linux sources and drivers. Not only that, it is continualy changing. Perhaps it is now becoming more stable, but it would be another "rabbit hole" to tackle becoming a linux driver expert, just to be able to study the emac network driver for the Orange Pi.
This leaves us with the choice now of looking at U-boot or NetBSD sources. Now that I know that the recent U-Boot can run the network at 100 Mbit, I am choosing to study it, hoping that U-Boot will offer less complexity than NetBSD. This may by no means be true. U-Boot is heavily influenced by linux concepts in the way it handles its sources and may at this point be no simpler (or even less so) than examining NetBSD. With this in mind, we will forge ahead and take a look at U-Boot.
What U-Boot? The obvious choices are to fetch the mainline U-boot from git or to take a look at the NetBSD pkgsrc system. I obtained "pkgsrc" from the NetBSD project page on Github and in that I find:
pkgsrc/sysutils/u-bootThis is not U-boot sources however. I find patch files, a Makefile, and various "distinfo" files. There are also a variety of "*.mk" files for different systems. Rather than do anything with these directly, the thing to do is to learn about pkgsrc and how a person is intended to use it.
The pkgsrc option is a dead end. NetBSD won't run in a stable way on the Orange Pi, and when it does run, pkg_add has bugs. The whole situation is a mess. I really had expected better from NetBSD, but it seems to be more of a toy and a research project that a stable system a person can use -- at least on the Orange Pi ARM boards.
Kyu / [email protected]