Buildroot for Orange pi PC: U-Boot supports Ethernet, while Linux does not

Hi,

I've managed to buy a few Orange PI PC boards for very nice price, to be used as controllers for simple measurement and control system. I have created the Linux image using the newest Buildroot 2016.11

The board booted correctly, but I have found a very strange thing. Even though U-Boot supported Ethernet (also DHCP and TFTP), the Linux kernel didn't see the Ethernet interface.

I've checked the DTS files, and I have found that there is a small difference in the sun8i-h3-orangepi-pc.dts file between U-Boot and Linux:

168,178d167 < < &emac { < phy = ; < phy-mode = "mii"; < allwinner,use-internal-phy; < allwinner,leds-active-low; < status = "okay"; < phy1: ethernet-phy@1 { < reg = ; < }; < };

It looks, like the Linux version of the DTS does not contain the definition of the Ethernet PHY. Is it done on purpose (due to e.g. incorrect operation of the related Ethernet driver), or the U-Boot uses simply a newer version of DTS? The latter seems to be justified by the fact, that the kernel version has the modification data of 2016.09.19, while the U-Boot version: 2016.09.07.

TIA & Regards, Wojtek

Reply to
wzab01
Loading thread data ...

Someone may well come on and show me wrong, but I think the answer for this group (unfortunately) is that this is a _general_ embedded systems group, and getting an answer about some _specific_ setup is very sporadic. You _may_ luck out, but you're almost certainly going to have a better chance on an Orange pi forum or mailing list.

Did the Orange pi come with Linux loaded? Did Ethernet work? Can you get the source for that specific build (you should, if it's in compliance with the GPL)? If so, are you building from that source? If not -- maybe you should.

--
www.wescottdesign.com
Reply to
Tim Wescott

I'm not up to date with the state of Allwinner upstreaming, but mention that Allwinner had their own device-tree-but-incompatible called Fex:

formatting link

I think that has now been abandoned in favour of device tree, however Fex originally required support foir getting Fex properties to be baked into drivers. It may be there are still some remnants lying around - eg a driver using a legacy Fex structure and thus not DT.

Are you using an Allwinner-specific kernel repo, or upstream Linux sources? As far as I know the upstream folks wanted nothing to do with Fex, so upstream is Fex-clean but not Allwinner-specific trees.

Theo

Reply to
Theo Markettos

I have finally managed to get Ethernet on OrangePiPC working with Linux created in Buildroot 2016.11 However, it appeared to be a little more complicated, than I hoped sending my first post. First of all I had to patch not only sun8i-h3-orangepi-pc.dts, but also sun8i-h3.dtsi, as described in

formatting link
Additionally I had to add the kernel driver, available from:
formatting link
I have encapsulated it in a BR package and added reference to it at the end of the package/Config.in

The modifications are not polished sufficiently to submit them to Buildroot, so at the moment I have posted them as a shar archive to alt.sources:

formatting link

With best regards, Wojtek

Reply to
wzab01

It appeared, that the mainline 4.7.3 kernel does not correctly support the USB in Orange Pi PC. Therefore I had to use the newer kernel: 4.8.13. That required to change the patches. The new modifications are available at:

formatting link

With best regards, Wojtek

Reply to
wzab01

Take a look at Armbian and DietPI distros; they both support the OrangePi-PC, among many other boards. Plenty of useful information in their forums.

formatting link
formatting link

Reply to
asdf

Finally I have reconfigured Buildroot 2016.11 to use kernel 4.9. Now it is possible to get minimal Linux system for Orange Pi PC, suited to the particular embedded system with Ethernet, USB, GPIO and I2C working. Necessary patches are described in

formatting link
and in
formatting link

With best regards, Wojtek

Reply to
wzab01

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.