ARM – Rock2 – Fix for SDCard Boot, and Ethernet..
Kernel 4.5-rc7 had booted successfully on the Radxa Rock2, but 4.5 Final failed, as the SDcard was ‘loaded’ just too late:
mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0) dwmmc_rockchip ff0f0000.dwmmc: 1 slots initialized ........................... VFS: Cannot open root device "mmcblk1p1" or unknown-block(0,0): error -6 .............................. Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
The solution to this was simple – just add ‘rootdelay=2‘ to the kernel command line parameter in the U-Boot commands:
setenv bootargs "console=ttyS2,115200n8 root=/dev/mmcblk1p1 rootdelay=2 earlyprintk ignore_loglevel"
Th device then booted OK, but the Ethernet driver failed:
[ 11.822938] eth0: device MAC address 86:d7:74:ee:31:69 [ 11.828080] libphy: PHY stmmac-0:ffffffff not found [ 11.832956] eth0: Could not attach to PHY [ 11.836963] stmmac_open: Cannot attach to PHY (error: -19)
This is caused by a patch applied – between -rc7 and Final – to ~/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c and ~/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
This affects other devices – including the Banana Pi, and more details are at: http://www.spinics.net/lists/netdev/msg368231.html
The simple fix is to copy the 4.5-rc7 version of these two source files to replace the ones in the 4.5 Final tree, and recompile..
Then, the Rock2 boots, and loads the Ethernet driver:
[ 1.653101] rk_gmac-dwmac ff290000.ethernet eth0: No MDIO subnode found [ 1.704156] mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 50000000Hz, actual 50000000HZ div = 0) [ 1.713406] libphy: stmmac: probed [ 1.713409] eth0: PHY ID 001cc915 at 0 IRQ POLL (stmmac-0:00) active [ 1.713410] eth0: PHY ID 001cc915 at 1 IRQ POLL (stmmac-0:01) ............................. [18.900162] rk_gmac-dwmac ff290000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 18.908788] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready ................................ Fedora 23 (Twenty Three) Kernel 4.5.0 on an armv7l (ttyS2) ................. # uname -a Linux rgrock2 4.5.0 #2 SMP Sat Mar 19 01:38:49 EDT 2016 armv7l armv7l armv7l GNU/Linux
Robert Gadsdon. March 19, 2016.
Comments
ARM – Rock2 – Fix for SDCard Boot, and Ethernet.. — No Comments