OK3568 4.19.206 Buildroot Adding PCIe-to-NIC Driver 81111H

Document classification: □ Top secret □ Secret □ Internal information ■ Open

Revision History

Date

Version

Revision History

05/30/2025

V1.0

Initial Version

Adding PCIe-to-NIC Driver 81111H

In the project, the 3568 two-channel native gigabit network port is not enough, and the gigabit network port needs to be expanded. This manual takes the pcie expansion of the single-channel gigabit network rtl8111H as an example.

1. Add Source Code to the Kernel

Since the 8111H is compatible with the 8168, the source code files to be added are for the 8168 driver. First, copy the r8168 folder to OK3568-linux-source/kernel/drivers/net/ethernet/realtek/.

Image

Then, add the line obj-y += r8168/ at the end of the Makefile in this folder, as shown in the figure below.

Image

Image

2. Modify the Makefile in the 8168 Folder

Enter the r8168 folder and modify the Makefile inside as follows:

obj-y := r8168.o

r8168-objs := r8168_n.o r8168_asf.o rtl_eeprom.o rtltool.o

Image

3. Modify the Configuration File

Navigate to OK3568-linux-source/kernel/arch/arm64/configs/ and change the line # CONFIG_NET_VENDOR_REALTEK is not set in OK3568-C-linux_defconfig to:

Image

4. Compile and Flash

Enter the source code directory, execute ./build.sh kernel, wait for the compilation to complete, and then flash boot.img to the development board.

Image

5. Attachments

r8168-8.050.03.tar.zip