I use the board is Sama5d3xek, the original board core is linux-at91-3.13, upgrade use linux-at91-4.10
First go to the official website to download a linux-at91-4.10 compressed package, and then unzip in Ubuntu, into the source file directory, I use the ARM board so change makefile
The following VI Makefile
The ARCH? = $ (Subarch)
Cross_compile = $ (config_cross_compile: "%" =%)
Change to ARCH? = Arm
Cross_compile? = arm-linux-
And then save the exit
View Arch/arm/configs/sama5_defconfig
Enter command make Arch=arm sama5_defconfig
Kernel-related configuration in input make Arch=arm menuconfig (maximize the window when configuring)
The kernel compiles the Make-j4 arch=arm and generates the Zimage
If you want Uimage to execute (no load address)
loadaddr=0x20008000
Export LOADADDR
Make Arch=arm Uimage
There is a load address directly make Arch=arm Uimag
Compiling device tree
Make Arch=arm Dtbs.
Eventually get Zimage uimage and sama5d3*. DtB
Ⅱ NIC driver Add-on
What I need here is 1000M dp83867 network card driver, found that linux4.3 above version has his network card driver,
A decisive transplant, dp83867. C and ti-dp83867.h files and then kernel configuration, there was an error,
Put the 4.3 kernel phy. h in the
Static inline bool Phy_interface_is_rgmii (struct Phy_device *phydev)
{
return phydev->interface >= phy_interface_mode_rgmii &&
Phydev->interface <= Phy_interface_mode_rgmii_txid;
}; Copy to 4.10, change makefile and Kconfig files
Reconfigure the compiled kernel, OK
LINUX kernel porting and NIC driver additions