Eth0 and usb devices don't exist running Poplar recovery image


#1

Hello,
I’m new to the poplar board. I followed the exact instruction “Building Poplar System Recovery Media From Source”, cloned the source code and toolchains from linaro, built and ran recovery image on poplar board. However neither eth0 nor usb device worked on the board. Please help provide insight/directions/suggestions/actions to resolve the issue. Thanks.

root@linaro-developer:~# lsusb
root@linaro-developer:~# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1000 (Local Loopback)
RX packets 6 bytes 372 (372.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 372 (372.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

root@linaro-developer:~# ifconfig -a
eth0: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether ba:d8:58:6a:24:b6 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 18

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1000 (Local Loopback)
RX packets 6 bytes 372 (372.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 372 (372.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

root@linaro-developer:~# ifconfig eth0 up
SIOCSIFFLAGS: No such device
root@linaro-developer:~# lsmod
Module Size Used by
root@linaro-developer:~# lspci
-bash: lspci: command not found
root@linaro-developer:~#

There were some failures during boot up:

Booting using the fdt blob at 0x32200000
device_remove: Device ‘ehci@9890000’ failed to remove, but children are gone
Loading Device Tree to 000000003df44000, end 000000003df49418 … OK

Starting kernel …

[ 0.130753] OF: amba_device_add() failed (-19) for /soc@f0000000/spi@8b1a000
[ 0.138303] OF: amba_device_add() failed (-19) for /soc@f0000000/gpio@8004000
[ 0.154457] dmi: Firmware registration failed.
[ 0.186865] hisi-gmac f9841000.ethernet: SMI bus read not valid

Below is the full console log:

Bootrom start
Boot Media: eMMC
Decrypt auxiliary code …OK

lsadc voltage min: 000000FE, max: 000000FF, aver: 000000FE, index: 00000000

Entry boot auxiliary code

Auxiliary code - v1.00
DDR code - V1.1.2 20160205
Build: Mar 24 2016 - 17:09:44

Reg Version: v134
Reg Time: 2016/03/18 09:44:55
Reg Name: hi3798cv2dmb_hi3798cv200_ddr3_2gbyte_8bitx4_4layers.reg

Boot auxiliary code success
Bootrom success

LOADER: Switched to aarch64 mode
LOADER: Entering ARM TRUSTED FIRMWARE
LOADER: CPU0 executes at 0x0000e000

INFO: BL1: 0x16000 - 0x1c000 [size = 24576]
NOTICE: Booting Trusted Firmware
NOTICE: BL1: v1.4(debug):401e491
NOTICE: BL1: Built : 14:53:50, Sep 6 2017
INFO: BL1: RAM 0x16000 - 0x1c000
INFO: BL1: cortex_a53: errata workaround for 835769 was applied
INFO: BL1: cortex_a53: errata workaround for 843419 was applied
INFO: BL1: cortex_a53: errata workaround for 855873 was applied
INFO: BL1: Loading BL2
INFO: Loading image id=1 at address 0x1e000
INFO: Image id=1 loaded at address 0x1e000, size = 0x4008
NOTICE: BL1: Booting BL2
INFO: Entry point address = 0x1e000
INFO: SPSR = 0x3c5
NOTICE: BL2: v1.4(debug):401e491
NOTICE: BL2: Built : 14:53:54, Sep 6 2017
INFO: BL2: Loading BL31
INFO: Loading image id=3 at address 0x2a000
INFO: Image id=3 loaded at address 0x2a000, size = 0x6020
INFO: BL2: Loading BL33
INFO: Loading image id=5 at address 0x37000000
INFO: Image id=5 loaded at address 0x37000000, size = 0x59265
NOTICE: BL1: Booting BL31
INFO: Entry point address = 0x2a000
INFO: SPSR = 0x3cd
INFO: Boot BL33 from 0x37000000 for 365157 Bytes
NOTICE: BL31: v1.4(debug):401e491
NOTICE: BL31: Built : 14:53:59, Sep 6 2017
INFO: ARM GICv2 driver initialized
INFO: BL31: Initializing runtime services
INFO: BL31: cortex_a53: errata workaround for 835769 was applied
INFO: BL31: cortex_a53: errata workaround for 843419 was applied
INFO: BL31: cortex_a53: errata workaround for 855873 was applied
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x37000000
INFO: SPSR = 0x3c9

U-Boot 2017.07-g3aff931 (Sep 06 2017 - 14:17:45 -0400)poplar

Model: HiSilicon Poplar Development Board
BOARD: Hisilicon HI3798cv200 Poplar
DRAM: 1023.5 MiB
MMC: Hisilicon DWMMC: 0
*** Warning - bad CRC, using default environment

In: serial_pl01x
Out: serial_pl01x
Err: serial_pl01x
Net: Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot: 2 1 0
starting USB…
USB0: USB EHCI 1.00
scanning bus 0 for devices… 2 USB Device(s) found
scanning usb for storage devices… 0 Storage Device(s) found
scanning usb for ethernet devices… 0 Ethernet Device(s) found

USB device 0: unknown device
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:2…
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
reading /extlinux/extlinux.conf
158 bytes read in 3 ms (50.8 KiB/s)
1: Buildroot
Retrieving file: /extlinux/…/Image
reading /extlinux/…/Image
16548352 bytes read in 1459 ms (10.8 MiB/s)
append: loglevel=4 mem=1G root=/dev/mmcblk0p3 rootfstype=ext4 rootwait rw earlycon
Retrieving file: /extlinux/…/hi3798cv200-poplar.dtb
reading /extlinux/…/hi3798cv200-poplar.dtb
9241 bytes read in 7 ms (1.3 MiB/s)
Flattened Device Tree blob at 32200000
Booting using the fdt blob at 0x32200000
device_remove: Device ‘ehci@9890000’ failed to remove, but children are gone
Loading Device Tree to 000000003df44000, end 000000003df49418 … OK

Starting kernel …

[ 0.130753] OF: amba_device_add() failed (-19) for /soc@f0000000/spi@8b1a000
[ 0.138303] OF: amba_device_add() failed (-19) for /soc@f0000000/gpio@8004000
[ 0.154457] dmi: Firmware registration failed.
[ 0.186865] hisi-gmac f9841000.ethernet: SMI bus read not valid

Welcome to Debian GNU/Linux 9 (stretch)!

NetworkManager-wait-online.service: Cannot add dependency job, ignoring: Unit NetworkManager-wait-online.service is masked.
[ OK ] Created slice User and Session Slice.
[ OK ] Reached target Swap.
[ OK ] Listening on Journal Audit Socket.
[ OK ] Started Dispatch Password Requests to Console Directory Watch.
[ OK ] Listening on /dev/initctl Compatibility Named Pipe.
[ OK ] Listening on Syslog Socket.
[ OK ] Listening on Network Service Netlink Socket.
[ OK ] Listening on Journal Socket (/dev/log).
[ OK ] Listening on udev Kernel Socket.
[ OK ] Listening on udev Control Socket.
[ OK ] Started Forward Password Requests to Wall Directory Watch.
[ OK ] Reached target Encrypted Volumes.
[ OK ] Created slice System Slice.
[ OK ] Created slice system-serial\x2dgetty.slice.
Mounting Debug File System…
[ OK ] Created slice system-getty.slice.
Mounting POSIX Message Queue File System…
Mounting Huge Pages File System…
[ OK ] Reached target Remote File Systems.
[ OK ] Listening on Journal Socket.
Starting Load Kernel Modules…
Starting Nameserver information manager…
Starting Journal Service…
Starting Create Static Device Nodes in /dev…
Starting Remount Root and Kernel File Systems…
Starting Set the console keyboard layout…
[ OK ] Reached target Slices.
[ OK ] Started Load Kernel Modules.
Mounting Configuration File System…
Starting Apply Kernel Variables…
[ OK ] Started Journal Service.
[ OK ] Started Apply Kernel Variables.
[ OK ] Mounted Debug File System.
[ OK ] Mounted Configuration File System.
[ OK ] Mounted Huge Pages File System.
[ OK ] Mounted POSIX Message Queue File System.
[ OK ] Started Remount Root and Kernel File Systems.
Starting Load/Save Random Seed…
Starting udev Coldplug all Devices…
Starting Flush Journal to Persistent Storage…
[ OK ] Started Create Static Device Nodes in /dev.
[ OK ] Started Nameserver information manager.
Starting udev Kernel Device Manager…
[ OK ] Started Set the console keyboard layout.
[ OK ] Reached target Local File Systems (Pre).
[ OK ] Started Load/Save Random Seed.
[ OK ] Started Flush Journal to Persistent Storage.
[ OK ] Started udev Coldplug all Devices.
[ OK ] Started udev Kernel Device Manager.
Starting Network Service…
[ OK ] Started Network Service.
[ OK ] Found device /dev/ttyAMA0.
[ OK ] Found device /dev/mmcblk0p2.
Mounting /boot…
[ OK ] Mounted /boot.
[ OK ] Reached target Local File Systems.
Starting Set console font and keymap…
Starting Raise network interfaces…
Starting Create Volatile Files and Directories…
[ OK ] Started Set console font and keymap.
[ OK ] Started Create Volatile Files and Directories.
Starting Update UTMP about System Boot/Shutdown…
Starting Network Time Synchronization…
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Started Network Time Synchronization.
[ OK ] Reached target System Initialization.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Listening on OpenBSD Secure Shell server socket.
[ OK ] Listening on ACPID Listen Socket.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Reached target Sockets.
[ OK ] Started ACPI Events Check.
[ OK ] Reached target Paths.
[ OK ] Reached target Basic System.
Starting Provide limited super user privileges to specific users…
Starting LSB: Load kernel modules needed to enable cpufreq scaling…
Starting Restore /etc/resolv.conf i…fore the ppp link was shut down…
Starting Modem Manager…
Starting System Logging Service…
[ OK ] Started D-Bus System Message Bus.
Starting WPA supplicant…
Starting Network Manager…
Starting Login Service…
Starting Initialize hardware monitoring sensors…
Starting Resize root filesystem to fit available disk space…
[ OK ] Started Regular background program processing daemon.
Starting RealtimeKit Scheduling Policy Service…
[ OK ] Started ACPI event daemon.
[ OK ] Reached target System Time Synchronized.
[ OK ] Started System Logging Service.
[ OK ] Started Provide limited super user privileges to specific users.
[ OK ] Started Restore /etc/resolv.conf if…before the ppp link was shut down.
Starting Authorization Manager…
[ OK ] Started Login Service.
[ OK ] Started RealtimeKit Scheduling Policy Service.
[ OK ] Started LSB: Load kernel modules needed to enable cpufreq scaling.
Starting LSB: set CPUFreq kernel parameters…
[ OK ] Started LSB: set CPUFreq kernel parameters.
[ OK ] Started Raise network interfaces.
[ OK ] Started Initialize hardware monitoring sensors.
[ OK ] Started WPA supplicant.
[ OK ] Started Authorization Manager.
[ OK ] Started Network Manager.
[ OK ] Reached target Network.
[ OK ] Reached target Network is Online.
Starting LSB: exim Mail Transport Agent…
[ OK ] Started Daily apt download activities.
[ OK ] Started Daily apt upgrade and clean activities.
[ OK ] Reached target Timers.
Starting LSB: Advanced IEEE 802.11 management daemon…
Starting Permit User Sessions…
Starting Network Name Resolution…
Starting /etc/rc.local Compatibility…
[ OK ] Started LSB: Advanced IEEE 802.11 management daemon.
[ OK ] Started Permit User Sessions.
[ OK ] Closed OpenBSD Secure Shell server socket.
Starting Network Manager Script Dispatcher Service…
[ OK ] Started Modem Manager.
[ OK ] Started Network Manager Script Dispatcher Service.
Starting Hostname Service…
[ OK ] Started Hostname Service.
[ OK ] Started Network Name Resolution.
[ OK ] Started LSB: exim Mail Transport Agent.
[ OK ] Started Resize root filesystem to fit available disk space.
[ 34.630950] rc.local[2341]: Creating SSH2 RSA key; this may take some time …
[ 34.648914] rc.local[2341]: 2048 SHA256:ILGWbKQfsTD51t8W47f/zGrAX9HknmPjuK9DeaoQH7U root@linaro-developer (RSA)
[ 34.668899] rc.local[2341]: Creating SSH2 ECDSA key; this may take some time …
[ 34.684897] rc.local[2341]: 256 SHA256:V1N5BJQqvk3VzrinV+fCmN6KQrRiI7piTxxwquu7gfE root@linaro-developer (ECDSA)
[ 34.704793] rc.local[2341]: Creating SSH2 ED25519 key; this may take some time …
[ 34.724797] rc.local[2341]: 256 SHA256:U1iYGxYY28dcjIYnX4eFqVgQdwwRKFEDNDdutDkEbcM root@linaro-developer (ED25519)
Starting OpenBSD Secure Shell server…
[ OK ] Started OpenBSD Secure Shell server.
[ OK ] Started /etc/rc.local Compatibility.
[ OK ] Started Serial Getty on ttyAMA0.
[ OK ] Started Getty on tty1.
[ OK ] Reached target Login Prompts.
[ OK ] Reached target Multi-User System.
[ OK ] Reached target Graphical Interface.
Starting Update UTMP about System Runlevel Changes…
[ OK ] Started Update UTMP about System Runlevel Changes.

Debian GNU/Linux 9 linaro-developer ttyAMA0

linaro-developer login: root (automatic login)

Linux linaro-developer 4.13.0-rc3-g99c9e3a #1 SMP PREEMPT Wed Sep 6 15:22:16 EDT 2017 aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.


#2

[apkopper] apkopper http://discuss.96boards.org/u/apkopper
September 10

Hello,
I’m new to the poplar board. I followed the exact instruction “Building
Poplar System Recovery Media From Source”, cloned the source code and
toolchains from linaro, built and ran recovery image on poplar board.
However no device worked on the board. Please help provide
insight/directions/suggestions/actions to resolve the issue. Thanks.

I’m afraid USB not working is normal. The current release doesn’t have
USB support enabled.

However network should be available… and I thought it was fully
automatic (e.g. NetworkManager should automatically DHCP whenever you
connect the cable). Having said that… it’s been a little while since I
last plugged it in.

Daniel.


#3

Hi Daniel,

Thank you for the quick response. A few questions:

  1. Has anyone tried to build using the latest Poplar build instruction https://github.com/Linaro/poplar-tools/blob/latest/build_instructions.md and the latest Linaro code and verified the image worked as expected, at least network and pci working?

  2. Why did these failure come up during boot? It seemed to relate to Eth0 not working.

Booting using the fdt blob at 0x32200000
device_remove: Device ‘ehci@9890000’ failed to remove, but children are gone
Loading Device Tree to 000000003df44000, end 000000003df49418 … OK

Starting kernel …

[ 0.130753] OF: amba_device_add() failed (-19) for /soc@f0000000/spi@8b1a000
[ 0.138303] OF: amba_device_add() failed (-19) for /soc@f0000000/gpio@8004000
[ 0.154457] dmi: Firmware registration failed.
[ 0.186865] hisi-gmac f9841000.ethernet: SMI bus read not valid

Thanks.


#4

Does the SW support PCI?


#5

Firstly PCIe is not expected to work… the drivers haven’t been completed yet.

Regarding network and USB, I haven’t ever really used the official installer much, I developed my own (unreleased) proof-of-concept installer and generally used that instead. As it happens patches for USB have been shared upstream so I’ve just polished that early proof-of-concept a little to the point I decided to push it to github:

To be clear this is a skunkworks project (which is why it is on my own github rather than an official one). Nevertheless the result is a bootable USB stick with working USB2 and networking… Currently I am using a deeply unofficial kernel (https://github.com/Linaro/poplar-linux/tree/jiancheng-usb2-test ) but when the code lands upstream I’ll should be able to adopt a regular mainline kernel for this.


#6

Actually thinking about it… I do have an theory regarding why the poplar-tools installer does not result in working networking. There is no code in this installer to install any kernel modules and whilst the ethernet driver is built into the kernel, ipv6 support will be built as a module… I think the absence of IPv6 support prevents NetworkManager working as intended.

It probably would be possible to get IPv4 working manually from the command line but it is easier to either change the kernel configuration to compile IPv6 as a built-in or to use an installer that correctly handles kernel modules (noting, of course, that my own poplar-usbstick does handle modules correctly :wink: ).


#7

Thank you Daniel! We got ethernet and usb working now.
Any idea when the PCIe driver support will be available? PCIe is crucial for our project.

There is a commit for the combo phy driver (basically it can be set as PCIe, USB3, sata, etc…)

The driver seems to support the PCIe mode.
if (priv->mode == COMBPHY_MODE_PCIE)
ret = histb_pcie_phy_init(priv);

Do you have any insight how it works and how to setup the mode?

Thanks.


#8

I’m not 100% sure when PCIe will be worked on. Unfortunately PCIe is almost always the last thing on a project plan (except maybe if PCIe is needed for a critical demo).


#9

Hello;

Not sure if this issue had closure… but PCIe support has been added:

Ipoplar_defconfig: enable COMBPHY and PCIE support
(commit: 55a4eefb734e79c11b8206d178ca040698f54e82)

Thanks;

Glen