radxa / meta-rockchip

Yocto BSP layer for the Rockchip SOC boards
MIT License
24 stars 14 forks source link

Rock 5b sees no ethernet device with default built #7

Closed yrik closed 1 year ago

yrik commented 1 year ago

I've followed the steps from the readme to build and flash the image, with some changes described in #3 (e.g. use rkdeveloptool instead of upgrade_tool)

When I launch the Rock 5b have no ethernet connection. ifconfig shows only loopback device, the same for ip link show

RadxaStephen commented 1 year ago

1.Check hardware:

lspci would show r8125 device.

2.Check software:

The Ethernet dirver is built as ko. https://github.com/radxa/kernel/blob/linux-5.10-gen-rkr4.1/arch/arm64/configs/rockchip_linux_defconfig#L602

Can you check if your os has r8125.ko file?

yrik commented 1 year ago

Thank you for the reply.

  1. there is no lspci in the linux built using yocto config from this repository, so I've tried to look into /proc/bus/pci/devices, I don't see r8125, but I see pci port
  2. There is no r8125.ko file in the system

I can also attach the linux image, but it's literally the result of building this repo

Here is the log of what I see when I run the commands you have suggested.

Screenshot from 2023-08-27 21-19-18

and some more logs from dmesg | grep pci, modprobe r8125.ko and ls /sys/firmware/devicetree/base/ethernet..

image

RadxaStephen commented 1 year ago

I find that the r8125.ko is not added in the built image. To solve this, I add a patch of adding kernel-modules. See https://github.com/radxa/meta-rockchip/commit/ef027f4455f705da7b4c24a63570ad9f0c512ff9.

For lspci tool, please add the following lines to your build/conf/local.conf

IMAGE_INSTALL:append = " \
    pciutils \
"
yrik commented 1 year ago

Thanks, now I can see the ethernet interface!

However, I still could not access internet. See logs attached. I've tried assigning ip manually but it did not help.

image

image

yrik commented 1 year ago

ok, internet does work when connected directly to the router and manually set gateaway address, but not when internet is shared from the ubuntu laptop (raspberry pi works fine with laptop thought).