Firefly开源社区
标题: firefly-rk3288 uboot以太网无法使用 [打印本页]
作者: xhzhou1234 时间: 2020-7-27 14:38
标题: firefly-rk3288 uboot以太网无法使用
想通过tftp+nfs来调试程序,网线已经插到板子上,使用emmc boot启动ubuntu没有问题。启动log如下:
U-Boot 2017.09-03676-g0cbcc01 (Mar 26 2020 - 14:06:50 +0800)
Model: Firefly-RK3288
DRAM: 2 GiB
Sysmem: init
Relocation Offset is: 00000000
Using default environment
dwmmc@ff0c0000: 1, dwmmc@ff0f0000: 0
MMC: no card present
mmc_init: -123, time 0
switch to partitions #0, OK
mmc0(part 0) is current device
Bootdev: mmc 0
MMC0: High Speed, 52Mhz
PartType: EFI
rockchip_get_boot_mode: Could not found misc partition
boot mode: None
Load FDT from boot part
DTB: rk-kernel.dtb
I2c0 speed: 400000Hz
vdd_log 1100000 uV
In: serial@ff690000
Out: serial@ff690000
Err: serial@ff690000
Model: Firefly-RK3288 Board (Linux Opensource)
Rockchip UBOOT DRM driver version: v1.0.1
xfer: num: 2, addr: 0x50
xfer: num: 2, addr: 0x50
Monitor has basic audio support
Could not find baseparameter partition
mode:1920x1080
CEA mode used vic=16
final pixclk = 148500000 tmdsclk = 148500000
PHY powered down in 0 iterations
PHY PLL locked 1 iterations
PHY powered down in 1 iterations
PHY PLL locked 1 iterations
sink has audio support
hdmi_set_clk_regenerator: fs=48000Hz ftdms=148.500MHz N=6144 cts=148500
CLK: (uboot. arm: enter 1000000 KHz, init 1000000 KHz, kernel 0N/A)
apll 1000000 KHz
dpll 396000 KHz
cpll 742000 KHz
gpll 594000 KHz
npll 24000 KHz
aclk_bus 297000 KHz
Net: No ethernet found.
测试如下:
=> print ipaddr
ipaddr=192.168.1.20
=> print serverip
serverip=192.168.1.8
=> ping 192.168.1.8
No ethernet found.
ping failed; host 192.168.1.8 is not alive
请问如何解决
作者: 时间的蝴蝶 时间: 2020-7-28 10:16
有更新 kernel 代码吗?
看下这个节点,rk3288-firefly-port.dtsi
```
&gmac {
phy-supply = <&vcc_lan>;
phy-mode = "rgmii";
clock_in_out = "input";
snps,reset-gpio = <&gpio4 7 0>;
snps,reset-active-low;
snps,force_thresh_dma_mode;
snps,reset-delays-us = <0 10000 1000000>;
assigned-clocks = <&cru SCLK_MAC>;
assigned-clock-parents = <&ext_gmac>;
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins &phy_rst &phy_pmeb &phy_int>;
tx_delay = <0x1d>;
rx_delay = <0x16>;
max-speed = <1000>;
status = "okay"; // <---
};
```
CLK: (uboot. arm: enter 1000000 KHz, init 1000000 KHz, kernel 0N/A)
apll 1000000 KHz
dpll 396000 KHz
cpll 742000 KHz
gpll 594000 KHz
npll 24000 KHz
aclk_bus 297000 KHz
Net: eth0: ethernet@ff290000
Hit key to stop autoboot('CTRL+C'): 0
作者: xhzhou1234 时间: 2020-7-29 07:32
你好!就是使用官方下载下来的linux sdk代码,然后按照http://wiki.t-firefly.com/zh_CN/Firefly-RK3399/ubuntu_desktop_support.html#wang-luo-qi-dong中的说法,kernel配置中使能nfs相关配置,更改dts中的bootargs并使能内核nfs相关配置。gmac是使能的:
现象如下:
1、不中断内核引导,正常运行Linux,在Linux下eth0可以联网,没问题;
2、中断内核引导,进入u-boot命令行交互模式,则出现题述问题。
作者: 时间的蝴蝶 时间: 2020-7-29 09:30
你应该是在 uboot 命令行配置过后,就会出现该问题吧; `Net: No ethernet found` 这个错误是 uboot 解析 kernel.dtb 的 gmac节点 错误时会出现的打印。
rk3288 没有验证过这个功能,可能是地址设置的问题。
作者: xhzhou1234 时间: 2020-7-29 21:02
是的,按照这个教程做的,是不是因为setenv的设置而引发的,因为我没有对比设置前后的情况,所以没法确定。不过你说的是一种可能性
作者: xhzhou1234 时间: 2020-7-30 18:51
你好!
我猜uboot里面已经开启了mmu,所以我把所有地址最高位加了0x10000000以后TFTP可以进行下去,若是原来的0x0027f800,则停在“Loading”。log如下:
=> setenv bootcmd 'tftpboot 0x1027f800 boot.img; tftpboot 0x18300000 rk3288-firefly.dtb; bootm 0x1027f800-0x18300000' #所有地址最高位加了0x10000000以后TFTP可以进行下去,若是原来的0x0027f800,则停在“Loading”
=> setenv bootargs 'root=/dev/nfs rw nfsroot=192.168.1.8:/nfs/rootfs,v3 ip=192.168.1.20:192.168.1.8:192.168.1.1:255.255.255.0::eth0:off'
=> boot
ethernet@ff290000 Waiting for PHY auto negotiation to complete.... done
Speed: 100, full duplex
Using ethernet@ff290000 device
TFTP from server 192.168.1.8; our IP address is 192.168.1.20
Filename 'boot.img'.
Load address: 0x1027f800
Loading: #################################################################
############################T ##############T ########T ########T ########
#################################################################
############T #####################################################
#################################################################
################################T #################################
######################################################T ###########
#################################################################
#################################################################
#########T ########################################################
############################################T #####################
#################################################################
#T #######################################
Retry count exceeded; starting again
Speed: 100, full duplex
Using ethernet@ff290000 device
TFTP from server 192.168.1.8; our IP address is 192.168.1.20
Filename 'rk3288-firefly.dtb'.
Load address: 0x18300000
Loading: ######
210.9 KiB/s
done
Bytes transferred = 81457 (13e31 hex)
bootm - boot application image from memory
Usage:
bootm [addr [arg ...]]
- boot application image stored in memory
passing arguments 'arg ...'; when booting a Linux kernel,
'arg' can be the address of an initrd image
When booting a Linux kernel which requires a flat device-tree
a third argument is required which is the address of the
device-tree blob. To boot that kernel without an initrd image,
use a '-' for the second argument. If you do not pass a third
a bd_info struct will be passed instead
For the new multi component uImage format (FIT) addresses
must be extended to include component or configuration unit name:
addr:<subimg_uname> - direct component image specification
addr#<conf_uname> - configuration specification
Use iminfo command to get the list of existing component
images and configurations.
Sub-commands to do part of the bootm sequence. The sub-commands must be
issued in the order below (it's ok to not issue all sub-commands):
start [addr [arg ...]]
loados - load OS image
ramdisk - relocate initrd, set env initrd_start/initrd_end
fdt - relocate flat device tree
cmdline - OS specific command line processing/setup
bdt - OS specific bd_t processing
prep - OS specific prep before relocation or go
go - start OS
=> bootm 0x1027f800
## Booting Android Image at 0x1027f800 ...
Kernel load addr 0x10280000 size 20436 KiB
RAM disk load addr 0x0a200000 size 8946 KiB
XIP Kernel Image ... OK
Loading Ramdisk to 0f743000, end 0ffff739 ... OK
FDT and ATAGS support not compiled in - hanging # 怎么解决?
### ERROR ### Please RESET the board ###
所以,是否可以给我一个firefly-rk3288上可以完整操作的教程?我要调试内核,使用烧写的方法,太麻烦了,还容易出问题。谢谢!
作者: 时间的蝴蝶 时间: 2020-7-31 11:13
我也没弄过啊 ,目前只能参考 rk3399 的 WIKI。rk3288 的支持可能之后会验证。
作者: xhzhou1234 时间: 2020-7-31 17:52
你好!setenv bootcmd 'tftpboot 0x02007800 boot.img; tftpboot 0x08300000 rk3288-firefly.dtb; bootm 0x02007800-0x08300000'
其实关键就是这个几个信息:
1)tftpboot后面boot.img和rk3288-firefly.dtb的下载地址
2)确认rk3288的uboot的bootm命令是否也支持通过连接符“-”指定多个下载地址。通用的的bootm命令好像后面只能跟一个内存地址
3)环境变量保存
麻烦您跟同事或者瑞芯微确认一下,非常感谢!
作者: tomshawn 时间: 2021-1-14 12:04
你好 我在core-rk3328-jd4上面也遇到了同样的问题。No ethernet found.
请问你的这个问题是怎样解决的?
作者: 七月清风 时间: 2022-8-12 15:22
使用bootz跑的最新版本内核
最新版本内核,但是无法跑起来
作者: yongwn 时间: 2023-3-7 10:36
如果我没猜错,把uboot里面的assigned-clock删了就能正常工作了
assigned-clocks = <&cru SCLK_MAC>;
assigned-clock-parents = <&ext_gmac>;
欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) |
Powered by Discuz! X3.1 |