LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   Slackware-ARMv7 15.0 on Banana Pi BPI-R2 Can't Parse 'link-gpios' Property of Node (https://www.linuxquestions.org/questions/slackware-arm-108/slackware-armv7-15-0-on-banana-pi-bpi-r2-cant-parse-link-gpios-property-of-node-4175734118/)

Stragonian 02-22-2024 09:08 AM

Slackware-ARMv7 15.0 on Banana Pi BPI-R2 Can't Parse 'link-gpios' Property of Node
 
I'm new to using ARM Single Board Computers, or Embedded Systems, whatever you like to call them.

Although, I recently got Slackware ARMv7 15.0 to successfully install and boot on a Banana Pi BPI-R2 Single Board Router.

However, there are a few problems with devices. My most pressing problem are the GMAC network devices, they come up, but they can only ping themselves. Looking through the boot information, I found this ... and believe it may have something to do with the problem.

Code:

Slackware OS boot ...
mtk_soc_eth 1b100000.ethernet: generated random MAC address 82:b9:3b:be:52:27
of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/ethernet@1b100000/mac@0/fixed-link[0]'
of_get_named_gpiod_flags: can't parse 'link-gpio' property of node '/ethernet@1b100000/mac@0/fixed-link[0]'
mtk_soc_eth 1b100000.ethernet: generated random MAC address f2:7e:05:62:1b:9e
of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/ethernet@1b100000/mac@1/fixed-link[0]'
of_get_named_gpiod_flags: can't parse 'link-gpio' property of node '/ethernet@1b100000/mac@1/fixed-link[0]'
....
of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ethernet@1b100000/mdio-bus[0]'
of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ethernet@1b100000/mdio-bus[0]'
....
mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xe0ce0000, irq 226
mtk_soc_eth 1b100000.ethernet eth1: mediatek frame engine at 0xe0ce0000, irq 226

While using the Ubuntu OS boot image to set up the eMMC with the Slackware 15.0 installer and packages, the Ubuntu kernel displayed the following boot messages and the GMAC network devices were able to function, albeit it they would often disconnect and reconnect to the network.

Here are the lines from the Ubuntu OS boot image I used to prep the eMMC with Slackware ARMv7 15.0.

Code:

Ubuntu OS boot ...
mtk_eth_soc 1b100000.ethernet: generated random MAC address ee:fc:e6:c6:84:42
mtk_eth_soc 1b100000.ethernet: connected mac 0 to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
mtk_eth_soc 1b100000.ethernet eth0: mediatek frame engine at 0xe3780000, irq 68
mtk_eth_soc 1b100000.ethernet: generated random MAC address 6e:4b:00:9e:20:27
mtk_eth_soc 1b100000.ethernet: connected mac 1 to PHY at fixed-0:01 [uid=00000000, driver=Generic PHY]
mtk_eth_soc 1b100000.ethernet eth1: mediatek frame engine at 0xe3780000, irq 68
netif_napi_add() called with weight 128 on device

I'm not entirely sure if this could be solved through the use of udev? dts? kernel?

I have been using Slackware since around 2001-ish, but ARM systems are rather new to me.

Plus, another problem is that Linux Questions does not have a tag for BPI-R2 or GMAC.

business_kid 02-22-2024 11:23 AM

You have a device there with 5 ethernet card instances apparently controlled by the same chip from a manufacturer with a less than stellar reputation for drivers?

I would expect that not to land jammy side up on most distributions. You need to Power down your sbc, power up your pc and go web searching for instructions on how to configure that. Is there module options, or stuff you can put in /etc/modprobe.d/ ??

Just because you can put 5 nics in one chip doesn't mean it's a good idea. There must be an article up on the ether, and you need to follow it to the letter. Each one needs
  • A device name, e.g. eth0-4.
  • MAC Address (probably fixed).
  • I/O address.
  • Interrupt.
There will also be stuff the kernel wants, no doubt. If there's an 'official' OS (e.g. Debian aka 'BPI OS' or similar) it might be no harm to see how that makes them sing, or trawl the mail archives for some words or wisdom.

mralk3 02-22-2024 03:01 PM

Try searching your kernel configuration for "GMAC" or "MT7530". You can search the kernel configuration here: https://slackware.uk/slackwarearm/sl...s/armv7/config

I noticed the following:
Code:

# CONFIG_NET_DSA_MT7530 is not set
The banana pi wiki is very helpful for identifying chip make/model: https://wiki.banana-pi.org/Banana_Pi_BPI-R2

Anyway, that board isn't officially supported by Slackware ARM and 15.0 (32 bit) is the last stable release for 32 bit ARM.

You will likely need to rebuild your kernel to add full support for that board.

Stragonian 02-22-2024 09:11 PM

Greetings business_kid, I thank you for your comment.

However, Five Banana Pis and one Raspberry Pi are the ARM and Aarch64 SBCs that I have. As far as ARM SBCs go, I am not a big fan of waste, so those are the SBCs I have to make do with, and since I am a huge fan of Slackware, running Slackware is the operating system I do hope to get working on all those SBCs.

The instruction I have found on the Banana Pi forum relate to setting the MAC addresses, I have not found any references to link-gpio failures. I think it may be due to a naming difference between Slackware and Ubuntu, as Slackware is looking for "fixed-link[0]" and at least within Ubuntu the link is named "fixed-0:00" and "fixed-0:01"

Greetings mralk3, I thank you for your comment too.

I do understand that the CPU (MT7623) communicates with the onboard switch (MT7530) through the two ethernet ports eth0 and eth1, and the switch communicates with each physical port, port "Wan" through eth1, and ports "Lan0, Lan1, Lan2, Lan3" through eth0.

Code:

--------              --------------------------------  I have set up virtual switches through a bridge br0 -> [eth0 and tap0], within Slackware.  In fact, I am running one right now, for the use
|  CPU  | <- eth0 -> |            SWITCH              |  of running all my virtual machines.  As each VM boots, it acquires an IP address through the vswitch and each VM is seen on my local network
| MT7623 | <- eth1 -> |            MT7530              |  as though it were a real machine on the network.
 --------              --------------------------------
                        |      |      |      |      |    Slackware is great for setting up some complicated networking solutions.  Although, I still think the network failure is related to this link-gpio
                      [wan] [lan0] [lan1] [lan2] [lan3]  parse to node failure somehow.

I have CONFIG_NET_DSA_MT7530=y set under Distributed Switch Architecture Drivers. I have been combing through my kernel's make menuconfig, looking for anything that might be related to linking mac X to PHY at fixed-X.

I have also been looking at udev rules, and module setting parameters from all over the net, in an attempt to find the solution.

Stragonian 02-22-2024 10:35 PM

I have a lead.

I originally started my kernel configuration by using ...

Code:

# make mt7623n_evb_fwu_defconfig
As a number of other users on the banana pi forum stated, they used that particular defconfig as their starting point in their kernel compile. However, combing through my kernel's make menuconfig I noticed that:

Code:

# CONFIG_BONDING is not set
Seeing how the network bonding module is required to bond lan0-lan1-lan2-lan3 into a single network device, it may be the solution. So, I set the variable to m, and I am currently recompiling. ...

I'll let you know if it works.

Stragonian 02-24-2024 05:34 AM

Update, so compiling the bonding modules failed as it produced the warning ....

Code:

Warning: DSA_CORE: Offsetting No Permitted
Whatever that means ... So, I decided to write a php utility that compare to lists, and using kwrite I thinned out both kernel configs to find all matching variables names.

Then I wrote a bash script that compared both kernels to determine where they had different and matching variable settings.

You can't see it on the post, but I wrote the script to output in color. Where kernel variables match the variables are green and where the kernel variables do not match the variables are in red.

I did not write a script to automatically update one kernel with the variables of the other because I may not want to set a variable from the Old Ubuntu kernel in the New Slackware Kernel, or I may not want to override the Slackware Kernel variable setting.

So, I just wrote the script to report the differences between like variables and different variables, so I can go through and decide if I want to set or unset a particular Kernel variable.

Code:

Example of kernel-compare.sh output ...
Old Kernel CONFIG_NFS_V3_ACL=y New Kernel CONFIG_NFS_V3_ACL=y Both Kernels match.
Old Kernel CONFIG_NFS_V4=y New Kernel CONFIG_NFS_V4=y Both Kernels match.
Old Kernel # CONFIG_NFS_SWAP is not set New Kernel CONFIG_NFS_SWAP=y Kernels do not match!
Old Kernel # CONFIG_NFS_V4_1 is not set New Kernel CONFIG_NFS_V4_1=y Kernels do not match!
Old Kernel CONFIG_ROOT_NFS=y New Kernel CONFIG_ROOT_NFS=y Both Kernels match.
Old Kernel # CONFIG_NFS_USE_LEGACY_DNS is not set New Kernel CONFIG_NFS_USE_LEGACY_DNS=y Kernels do not match!
Old Kernel CONFIG_NFSD=y New Kernel CONFIG_NFSD=m Kernels do not match!
Old Kernel CONFIG_NFSD_V3=y New Kernel CONFIG_NFSD_V3=y Both Kernels match.
Old Kernel # CONFIG_NFSD_V3_ACL is not set New Kernel CONFIG_NFSD_V3_ACL=y Kernels do not match!
Old Kernel CONFIG_NFSD_V4=y New Kernel CONFIG_NFSD_V4=y Both Kernels match.
Old Kernel # CONFIG_NFSD_PNFS is not set New Kernel CONFIG_NFSD_PNFS=y Kernels do not match!
Old Kernel CONFIG_GRACE_PERIOD=y New Kernel CONFIG_GRACE_PERIOD=y Both Kernels match.
Old Kernel CONFIG_LOCKD=y New Kernel CONFIG_LOCKD=y Both Kernels match.
Old Kernel CONFIG_LOCKD_V4=y New Kernel CONFIG_LOCKD_V4=y Both Kernels match.
Old Kernel CONFIG_NFS_ACL_SUPPORT=y New Kernel CONFIG_NFS_ACL_SUPPORT=y Both Kernels match.
Old Kernel CONFIG_NFS_COMMON=y New Kernel CONFIG_NFS_COMMON=y Both Kernels match.
Old Kernel CONFIG_SUNRPC=y New Kernel CONFIG_SUNRPC=y Both Kernels match.
Old Kernel CONFIG_SUNRPC_GSS=y New Kernel CONFIG_SUNRPC_GSS=y Both Kernels match.
Old Kernel # CONFIG_SUNRPC_DEBUG is not set New Kernel # CONFIG_SUNRPC_DEBUG is not set Both Kernels match.
Old Kernel # CONFIG_CEPH_FS is not set New Kernel # CONFIG_CEPH_FS is not set Both Kernels match.
Old Kernel # CONFIG_CIFS is not set New Kernel CONFIG_CIFS=m Kernels do not match!
Old Kernel # CONFIG_CODA_FS is not set New Kernel # CONFIG_CODA_FS is not set Both Kernels match.
Old Kernel # CONFIG_AFS_FS is not set New Kernel # CONFIG_AFS_FS is not set Both Kernels match.
Old Kernel CONFIG_NLS=y New Kernel CONFIG_NLS=y Both Kernels match.
Old Kernel CONFIG_NLS_DEFAULT="utf8" New Kernel CONFIG_NLS_DEFAULT="iso8859-1" Kernels do not match!
Old Kernel CONFIG_NLS_CODEPAGE_437=y New Kernel CONFIG_NLS_CODEPAGE_437=y Both Kernels match.

So, to make a long story short, I am going to go through the new kernel using this output data, and see if I can fix the problem through compiling a new kernel.

I'll let you all know how it works. ...

Stragonian 03-18-2024 09:51 PM

Ok, So I got a working kernel with the network working now. The kernel still posts "of_get_named_gpiod_flags: can't parse 'link-gpios' property of node" errors, but the eth is up and running.


All times are GMT -5. The time now is 10:49 PM.