Missing interfaces on clearfog base

Hi,

I am trying to set up ipfire on a clearfog base SoB following the instructions at wiki.ipfire.org - ClearFog Base / Pro.

I am using the downloadable sdhc, base uboot image from MEGA

together with the arm legacy, v 2.27 ipfire image from the download page.

Uboot reports all three interfaces present on the board (the SFP interface is empty, and neither of the RJ45 connectors is in use for the initial setup), and assigns them eth1 - eth3 values:

U-Boot 2018.01-02337-gdc4398fdb8-dirty (Nov 21 2018 - 15:25:52 +0100)

SoC: MV88F6828-A0 at 1600 MHz
DRAM: 1 GiB (800 MHz, 32-bit, ECC not enabled)
MMC: mv_sdh: 0
Model: SolidRun Clearfog
Board: SolidRun ClearFog Base
SCSI: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
Net: eth1: ethernet@70000, eth2: ethernet@30000, eth3: ethernet@34000
Hit any key to stop autoboot: 0

but ipfire is only seeing a single interface. /var/log messages

cat /var/log/messages | grep ethernet
Mar 9 23:54:06 (none) kernel: mvneta f1070000.ethernet eth0: PHY [f1072004.mdio -mii:00] driver [Marvell 88E1510] (irq=POLL)
Mar 9 23:54:06 (none) kernel: mvneta f1070000.ethernet eth0: configuring for ph y/rgmii-id link mode
Mar 9 23:59:34 (none) kernel: mvneta f1070000.ethernet green0: renamed from eth 0
Mar 10 00:01:30 ipfire kernel: mvneta f1070000.ethernet green0: PHY [f1072004.md io-mii:00] driver [Marvell 88E1510] (irq=POLL)
Mar 10 00:01:30 ipfire kernel: mvneta f1070000.ethernet green0: configuring for phy/rgmii-id link mode
Mar 10 00:04:43 ipfire kernel: mvneta f1070000.ethernet green0: PHY [f1072004.md io-mii:00] driver [Marvell 88E1510] (irq=POLL)
Mar 10 00:04:43 ipfire kernel: mvneta f1070000.ethernet green0: configuring for phy/rgmii-id link mode
Mar 10 00:12:03 ipfire kernel: mvneta f1070000.ethernet green0: PHY [f1072004.md io-mii:00] driver [Marvell 88E1510] (irq=POLL)
Mar 10 00:12:03 ipfire kernel: mvneta f1070000.ethernet green0: configuring for phy/rgmii-id link mode

UPDATE: I just replaced uboot with the version from images.solid-run DOT com/A38X/U-Boot

No change in behaviour.

U-Boot SPL 2018.01-02337-gdc4398fdb8 (May 14 2018 - 18:25:17)
High speed PHY - Version: 2.0
Detected Device ID 6828
board SerDes lanes topology details:
| Lane # | Speed | Type |

| 0 | 3 | SATA0 |
| 1 | 0 | SGMII1 |
| 2 | 5 | PCIe1 |
| 3 | 5 | USB3 HOST1 |
| 4 | 5 | USB3 HOST0 |
| 5 | 0 | SGMII2 |

:** Link is Gen1, check the EP capability
PCIe, Idx 1: Link upgraded to Gen2 based on client capabilities
High speed PHY - Ended Successfully
DDR3 Training Sequence - Ver TIP-1.29.0
DDR3 Training Sequence - Switching XBAR Window to FastPath Window
DDR3 Training Sequence - Ended Successfully
Trying to boot from MMC1

U-Boot 2018.01-02337-gdc4398fdb8 (May 14 2018 - 18:25:17 +0200), Build: jenkins-u-boot-clearfog-model=base,variant=sdhc-10

SoC: MV88F6828-A0 at 1600 MHz
DRAM: 1 GiB (800 MHz, 32-bit, ECC not enabled)
MMC: mv_sdh: 0
Model: SolidRun Clearfog
Board: SolidRun ClearFog Base
SCSI: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
Net: eth1: ethernet@70000, eth2: ethernet@30000, eth3: ethernet@34000
Hit any key to stop autoboot: 0

=> env print
api_address=3fc0cc78
arch=arm
autoload=no
baudrate=115200
board=clearfog
board_name=clearfog
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=mmc0 usb0 scsi0 pxe dhcp
bootcmd=run distro_bootcmd
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z “${fdtfile}” -a -n “${soc}”; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00010:UNDI:003000;setenv bootp_arch 0xa;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_scsi0=setenv devnum 0; run scsi_boot
bootcmd_usb0=setenv devnum 0; run usb_boot
bootdelay=3
console=ttyS0,115200
cpu=armv7
delete=fdt_addr_r
distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
eth1addr=d2:63:b4:1b:b5:03
eth2addr=d2:63:b4:1b:b5:05
eth3addr=d2:63:b4:1b:b5:07
fdt_addr=0x8000000
fdt_addr_r=0x8000000
fdt_high=0x10000000
fdtcontroladdr=3fb880a8
fdtfile=armada-388-clearfog-base.dtb
initrd_high=0x10000000
kernel_addr_r=0x800000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
pxefile_addr_r=0x300000
ramdisk_addr_r=0x1800000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}…; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z “${fdtfile}” -a -n “${soc}”; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing…; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing…; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing…; fi; done
scriptaddr=0x200000
scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi
soc=mvebu
stderr=serial@12000
stdin=serial@12000
stdout=serial@12000
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi
vendor=solidrun

Environment size: 4321/8188 bytes

Getting closer. It looks like the devices are making it through to linux, but only at the dev tree level:

ls “/sys/devices/platform/soc/soc:internal-regs”/

driver f1018300.phy f1090000.crypto
driver_override f1020000.mbus-controller f10a3800.rtc
f1001400.sdramc f1020300.timer f10a8000.sata
f1008000.cache-controller f1020300.watchdog f10c8000.bm
f100c000.scu f1020800.cpurst f10d8000.sdhci
f100c200.timer f1020d20.mpcore-soc-ctrl f10e0000.sata
f100c600.timer f1021010.coherency-fabric f10e4078.thermal
f1011000.i2c f1022000.pmsu f10f8000.usb3
f1011100.i2c f1030000.ethernet modalias
f1012000.serial f1034000.ethernet of_node
f1012100.serial f1058000.usb power
f1018000.pinctrl f1060800.xor subsystem
f1018100.gpio f1060900.xor uevent
f1018140.gpio f1070000.ethernet
f1018200.system-controller f1072004.mdio

[root@ipfire soc:internal-regs]# less f1030000.ethernet/uevent
OF_NAME=ethernet
OF_FULLNAME=/soc/internal-regs/ethernet@30000
OF_COMPATIBLE_0=marvell,armada-370-neta
OF_COMPATIBLE_N=1
OF_ALIAS_0=ethernet2
MODALIAS=of:NethernetT(null)Cmarvell,armada-370-neta
f1030000.ethernet/uevent (END)

[root@ipfire soc:internal-regs]# less f1034000.ethernet/uevent
OF_NAME=ethernet
OF_FULLNAME=/soc/internal-regs/ethernet@34000
OF_COMPATIBLE_0=marvell,armada-370-neta
OF_COMPATIBLE_N=1
OF_ALIAS_0=ethernet3
MODALIAS=of:NethernetT(null)Cmarvell,armada-370-neta
f1034000.ethernet/uevent (END)

[root@ipfire soc:internal-regs]# less f1070000.ethernet/uevent
DRIVER=mvneta
OF_NAME=ethernet
OF_FULLNAME=/soc/internal-regs/ethernet@70000
OF_COMPATIBLE_0=marvell,armada-370-neta
OF_COMPATIBLE_N=1
OF_ALIAS_0=ethernet1
MODALIAS=of:NethernetT(null)Cmarvell,armada-370-neta

Pretty sure the f1070000 device is the one I see as GREEN and f1034000 is the other RJ45 which I don’t see. Might try creating a udev rule to see if I that will activate the interface.

Please try to test with acpi-listen if the rear gpio button work, if not the kernel miss the driver for the gpio controller which is also needed to reset the phy chip for the second ethernet (eth1)

https://git.ipfire.org/?p=people/arne_f/kernel.git;a=blob;f=arch/arm/boot/dts/armada-388-clearfog-base.dts;h=53b4bd35522ad92a2456fe3196cc8778b2afe1a7;hb=1ecf4aecc782470c1c601e948084f389a2146894

Good catch! No output from acpi_listen when pushing the button. Do you know the name of the driver / kernel module?

Sorry to be a noob here:

I’ve never been very good at device tree files, but my clearfog base .dts file looks completely different from Arne’s git link. The file from the system is much larger but does seem to be missing Arne’s devices.

clearfog-base.dts
clearfog.dts

I have been trying to compile this, but see now that the .dts from the blob on the system is flattened, while Arne’s patch needs the include tree in order to compile. I have no idea how to do this and no idea how to correctly insert Arne’s code into the flattened .dts file that I decompiled from my ipfire system.

I fixed this the dumb/blind way, by replacing all the armada-3* dtb files with ones I lifted from armbian. System now comes up with all the interfaces

As a FYI and an excuse: Identifying the correct interfaces and setting up was quite difficult and confusing, as deleted interface configurations were partially persistent (sticky) until the system was rebooted. In the end, I found that the best approach was to delete red and green configs, save, accepting the warnings, then reboot the system and check ifconfig, the setup dialog and /var/log/messages before attempting to create a new config in setup.

Even then, DHCP and DHCPD often failed until the unit was rebooted again.

This is my excuse for not RTFM-ing regarding access to the web interface. I was so happy to finally have two working interfaces. This may well be a problem with the clearfog base rather than ipfire. Accept that this is not a problem if everything is well enough planned that the initial setup works and doesn’t need to be changed and repeated.

Not sure if you came across this but there is a feature that blinks the LED associated with the NIC. This works with some NICs but not all.

select_NIC

4 Likes