In Linux initrd image, ethernet fails to work

101 views Asked by At

I am working on SABRE SD Development board, which uses i.Mx6 Quad core processor. I have developed a initrd image for this board. The kernel boots up and the initrd images is mounted successfully. Even the fec ethernet drivers are loaded properly.

But during the init process the dhcp fails to designate an ip for the ethernet device.

on analysis using the strace utility on the 'dhcp' command the following log was obtained: In the log a select system call Timeouts causing the error. A selective portion of the log is given bellow.

socket(PF_INET, SOCK_RAW, IPPROTO_RAW)  = 6

ioctl(6, SIOCGIFINDEX, {ifr_name="eth0", ifr_index=2}) = 0

ioctl(6, SIOCGIFHWADDR, {ifr_name="eth0", ifr_hwaddr=00:04:9f:02:b3:81}) = 0

close(6)                                = 0

clock_gettime(CLOCK_MONOTONIC, {53, 815520338}) = 0

write(1, "Sending discover...\n", 20Sending discover...
)   = 20

socket(PF_PACKET, SOCK_DGRAM, 8)        = 6

bind(6, {sa_family=AF_PACKET, proto=0x800, if2, pkttype=PACKET_HOST, addr(6)={0, 
ffffffffffff}, 20) = 0

sendto(6, "E\0\0014\0\0\0\0@\21y\272\0\0\0\0\377\377\377\377\0D\0C\1 ,h\1\1\6\0"..., 308, 0, {sa_family=AF_PACKET, proto=0x800, if2, pkttype=PACKET_HOST, add8

close(6)                                = 0

fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0

clock_gettime(CLOCK_MONOTONIC, {53, 990583005}) = 0

select(6, [3 5], NULL, NULL, {3, 0})    = 0 (Timeout)

But when the same rootfs used in initrd image is used with SD card boot the dhcp command does not fail.

Can any one help me with some clues?

with regards,

Vivek

0

There are 0 answers