Hi all,
I meet a problem. In my customer board, referenced from sabreauto-ai board, the eth0 link is not ready. could some one give me some advice? I really confused for some days. the log is as below:
====log below======
root@sabreauto_6q:/ # eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=1:01, irq=-1)
ADDRCONF(NETDEV_UP): eth0: link is not ready
====log end========
when I input "busybox ifconfig", it print log as below:
root@sabreauto_6q:/ # busybox ifconfig
eth0 Link encap:Ethernet HWaddr 1E:ED:19:27:1A:B3
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
it seems that no ip address is obtained.
However, If I use FSL official Sabreauto-AI referenced board with the same internet wire, it is ok and the board can access internet normally. log is as below:
root@sabreauto_6q:/ # eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=1:01, irq=-1)
ADDRCONF(NETDEV_UP): eth0: link is not ready
acc_open
acc_release
init: sys_prop: permission denied uid:1003 name:service.bootanim.exit
PHY: 1:01 - Link is Up - 100/Full
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
PHY: 1:01 - Link is Down
PHY: 1:01 - Link is Up - 100/Full
binder: 2886:2895 refcount change on invalid ref 34
root@sabreauto_6q:/ # busybox ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:9F:03:0C:C9
inet addr:192.168.2.123 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::204:9fff:fe03:cc9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:57 errors:0 dropped:0 overruns:0 frame:0
TX packets:61 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10645 (10.3 KiB) TX bytes:5835 (5.6 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
compared with official referened board, my customer board cannot print the log in red. we have not changed ethnet module, it follows offcial referenced board. could you give some advices please? Any advices are appreciated.. thx a lot.
Hi jianhua
you can check if new board has valid mac, setting
Uboot kernel boot parameter
fec_mac=xx:xx:xx:xx:xx:xx
Best regards
igor
Hi, igor
thx a lot for your reply.
After reading your information, I pay attention to the uboot log. The referenced board which connected to internet well can get right MAC addr, log is as below:
MMC: FSL_USDHC: 0,FSL_USDHC: 1,FSL_USDHC: 2,FSL_USDHC: 3
In: serial
Out: serial
Err: serial
Net: got MAC address from IIM: 00:04:9f:03:0c:c9
FEC0 [PRIME]
Hit any key to stop autoboot: 0
MX6Q SABREAUTO U-Boot >
However, my customer board seems cannot obtain such addr, log is as below:
MMC: FSL_USDHC: 0,FSL_USDHC: 1,FSL_USDHC: 2,FSL_USDHC: 3
*** Warning - bad CRC or MMC, using default environment
In: serial
Out: serial
Err: serial
boot from emmc2
Net: got MAC address from IIM: 00:00:00:00:00:00
FEC0 [PRIME]
Hit any key to stop autoboot: 0
========
Maybe this is the cause. I just guess ^_^. I think i must check this difference firstly.
and I also input "printenv" in the referenced board and customer board:
=====reference board output as below========
MX6Q SABREAUTO U-Boot > printenv
baudrate=115200
ipaddr=192.168.1.103
serverip=192.168.1.101
netmask=255.255.255.0
loadaddr=0x10800000
rd_loadaddr=0x11000000
netdev=eth0
ethprime=FEC0
fastboot_dev=mmc2
bootcmd=booti mmc2
splashimage=0x30000000
splashpos=m,m
lvds_num=1
ethact=FEC0
bootdelay=1
bootargs=console=ttymxc3,115200 init=/init video=mxcfb0:dev=ldb,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=10M vmalloc=400M androidboot.console=ttymxc3 androidboot.hardware=freescale
stdin=serial
stdout=serial
stderr=serial
Environment size: 488/8188 bytes
===========customer board output as below=================
MX6Q SABREAUTO U-Boot > printenv
bootdelay=3
baudrate=115200
ipaddr=192.168.1.103
serverip=192.168.1.101
netmask=255.255.255.0
loadaddr=0x10800000
rd_loadaddr=0x11000000
netdev=eth0
ethprime=FEC0
fastboot_dev=mmc2
bootcmd=booti mmc2
splashimage=0x30000000
splashpos=m,m
lvds_num=1
bootargs=console=ttymxc4,115200 init=/init video=mxcfb0:dev=ldb,bpp=32 video=mxcfb1:dev=hdmi,1024x768@60,bpp=32 video=mxcfb2:off fbmem=10M fb1base=0x27b00000 vmalloc=400M androidboot.console=ttymxc4 androidboot.hardware=freescale
stdin=serial
stdout=serial
stderr=serial
ethact=FEC0
Environment size: 533/8188 bytes
================
it seems the enviaroment is same.
igor, could you teach me : does the mac addr need to set manually or obtained automatically by systmem ?
Hi jianhua
just for test you can set for new board mac address
the same as in reference board, setting
Uboot kernel boot parameter
fec_mac=xx:xx:xx:xx:xx:xx
For production boards one needs to purchase MAC addresses from
link below
http://standards.ieee.org/develop/regauth/grpmac/
Note, Freescale does not provide new mac addresses.
Best regards
igor
Hi, igor,
thx for your reply.
I set fec_addr in uboot like below:
MX6Q SABREAUTO U-Boot > setenv ethaddr 00:04:9f:03:0c:c9
MX6Q SABREAUTO U-Boot > setenv fec_addr 00:04:9f:03:0c:c9
MX6Q SABREAUTO U-Boot > printenv
bootdelay=3
baudrate=115200
ipaddr=192.168.1.103
serverip=192.168.1.101
netmask=255.255.255.0
loadaddr=0x10800000
rd_loadaddr=0x11000000
netdev=eth0
ethprime=FEC0
fastboot_dev=mmc2
bootcmd=booti mmc2
splashimage=0x30000000
splashpos=m,m
lvds_num=1
bootargs=console=ttymxc4,115200 init=/init video=mxcfb0:dev=ldb,bpp=32 video=mxcfb1:dev=hdmi,1920x1080@60,bpp=32 video=mxcfb2:off fbmem=10M fb1base=0x27b00000 vmalloc=400M androidboot.console=ttymxc4 androidboot.hardware=freescale
ethact=FEC0
stdin=serial
stdout=serial
stderr=serial
ethaddr=00:04:9f:03:0c:c9
fec_addr=00:04:9f:03:0c:c9
Environment size: 587/8188 bytes
MX6Q SABREAUTO U-Boot >
================
after savenv and reboot, the macaddr is still 00:00:00:00:00:00 in uboot, and still cannot connected to internet. there are no ipaddr with using "busybox ifconfig" after anroid booted up.
Is the seting way right or not?
Hi jianhua
you rebooted so settings were lost.
For permanent settings you can look at example below:
program_mac_address.c
for linux boot one needs to use
Uboot kernel boot parameter, refer to attached file
Table 6. Kernel Boot Parameters p.9
~igor
Hi igor,
thx for your reply.
I use android 4.3 OS, but i think u-boot and kernel might be same as linux as what you attached. I set fec_mac according to the document and what you said. however, the mac address is still not correct after execute "busybox ifconfig". It's really strange symptom.:smileyconfused:
Anyway, I'm very appreciated with you:smileyhappy:. I think I should check more and more :smileyshocked:
Hi jianhua
I think it should work with below
IMX6_JB43_110_ANDROID_SOURCE_BSP : i.MX 6Quad, i.MX 6Dual, i.MX 6DualLite, i.MX 6Solo
and i.MX 6Sololite Android jb4.3_1.1.0 0 BSP, Documentation and Source Code for BSP and Codecs..
~igor
Hi jianhua
MAC can be blown to fuses, please check
Table 5-10. Fusemap Descriptions IMX6DQRM
procedure given below
Q&A: How to program i.MX6 eFUSE?
~igor
Hi, igor
I just try to do efuse for mac addr according to your way. it show below log:
MX6Q SABREAUTO U-Boot > imxotp blow --force 62 039f0400
ERROR: otp_wait_busy timeout. 0x262
ERROR: read failed
MX6Q SABREAUTO U-Boot > imxotp read 62
Reading fuse at index: 0x62
ERROR: otp_wait_busy timeout. 0x262
ERROR: read failed
Both writing and reading is failed. Why such operation is failed ?:smileyconfused:
efuse index of mac is 0x62 and 0x63
Hi, igor,
I have burn mac address to efuse with blew way after android boot up:
echo 0x9f00ead3 > /sys/fsl_otp/HW_OCOTP_MAC0
echo 0x0004 > /sys/fsl_otp/HW_OCOTP_MAC0
uboot and kernel can get the correct mac addre now:
===========uboot log=======
boot from emmc2
Net: got MAC address from IIM: 00:04:9f:00:ea:d3
FEC0 [PRIME]
Hit any key to stop autoboot: 0
=======busybox ifconfig log=====
root@sabreauto_6q:/ # busybox ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:9F:00:EA:D3
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
However, there is still no ip address obtained? Igor, do you have any advices?
Hi jianhua
you can try "ip" kernel boot parameter, described
in attached in previous answer i.MX_6Dual6Quad_SABRE-SD_Linux_Release_Notes.pdf
Table 6. Kernel Boot Parameters
ip=none
ip = dhcp
ip=static_ip_address
~igor
Hi, igor
I have tried to set ip = non or ip = 192.168.2.199, there seems no effect and no ip address obtained after android booted up.
and I have also tried to set ip like this way:
busybox ifconfig eth0 192.168.2.199 netmask 255.255.255.0
and it show log as below :
root@sabreauto_6q:/ # busybox ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:9F:00:EA:D3
inet addr:192.168.2.199 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
but no "inet6 addr: fe80::204:9fff:fe03:cc9/64 Scope:Link" displayed as FSL referenced board.:smileyconfused: