SNLA450 July 2024 DP83822H , DP83822HF , DP83822I , DP83822IF , DP83826E , DP83826I , DP83848-EP , DP83848Q-Q1 , DP83867CR , DP83867CS , DP83867E , DP83867IR , DP83867IS , DP83TC812R-Q1 , DP83TC812S-Q1 , DP83TC813R-Q1 , DP83TC813S-Q1 , DP83TC814R-Q1 , DP83TC814S-Q1 , DP83TG720R-Q1 , DP83TG720S-Q1 , DP83TG721R-Q1 , DP83TG721S-Q1
This section describes how to add a driver (newDriver.c, where newDriver is an Ethernet PHY) to an SDK on a linux system that is either missing the driver or using an outdated version.
In the SDK, find the Linux kernel directory (LKD). An example file path looks like:
SDK_Install_Directory/board-support/TI-linux-kernel/
TI-Linux-kernel is the LKD in this example. From here, you can navigate to:
LKD/drivers/net/phy/
Copy
newDriver.c into this directory. Within this same directory are Makefile and
Kconfig , both files need to be edited for newDriver.c to be built.
Edit Makefile
Add the following line to the Makefile. Note the assignment is newDriver.o and not newDriver.c
obj-$(CONFIG_newDriver_PHY) += newDriver.o
Edit Kconfig
Add the following lines to the Kconfig,
config newDriver PHY
tristate "<Insert Company name> newDriver PHY"
--help--
Supports the newDriver PHY.
After both the Makefile and Kconfig
files have been edited, return to the LKD. From here, go
to:LKD/arch/arm64/configs
Here you can find a defconfig file, add the following line:
CONFIG_newDriver_PHY = y
The
naming convention, CONFIG_newDriver_PHY, needs to match what was set in the
Makefile.
From here, you can return to the SDK install directory and run the make command on the terminal.