FAQ: [#6113] Wake up through ethernet fail when I boot up kernel step by step in uboot(2010)

Document created by Aaronwu Employee on Sep 11, 2013
Version 1Show Document
  • View in full screen mode

[#6113] Wake up through ethernet fail when I boot up kernel step by step in uboot

Submitted By: Vivi Li

Open Date

2010-07-13 00:09:00     Close Date

2010-07-28 05:59:51

Priority:

Medium     Assignee:

Vivi Li

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2010R1     Release:

Category:

N/A     Board:

N/A

Processor:

ALL     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

gcc4.3-2010_Apr_07

App binary format:

N/A     

Summary: Wake up through ethernet fail when I boot up kernel step by step in uboot

Details:

 

Wake up through ethernet fail on all platforms when I boot up kernel step by step in uboot.

 

Bellow is the error log:

--

U-Boot 2010.06-svn2356 (ADI-2010R1-pre) (Jul 10 2010 - 16:13:10)

 

CPU:   ADSP bf537-0.2 (Detected Rev: 0.2) (bypass boot)

Board: ADI BF537 stamp board

       Support: http://blackfin.uclinux.org/

Clock: VCO: 500 MHz, Core: 500 MHz, System: 125 MHz

RAM:   64 MiB

Flash: 4 MiB

In:    serial

Out:   serial

Err:   serial

KGDB:  [on serial] ready

Net:   bfin_mac

Hit any key to stop autoboot:  0

bfin>

bfin> tftp 0x1000000 uImage

Using bfin_mac device

TFTP from server 10.100.4.174; our IP address is 10.100.4.50

Filename 'uImage'.

Load address: 0x1000000

Loading: #################################################################

         #################################################################

         #################################################################

         #################################################################

         ####################################################

done

Bytes transferred = 4578775 (45ddd7 hex)

bfin> run ramargs

bfin> run addip

bfin> bootm

## Booting kernel from Legacy Image at 01000000 ...

   Image Name:   bf537-2.6.34.1-ADI-2010R1-pre-sv

   Created:      2010-07-12   7:22:00 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    4578711 Bytes = 4.4 MiB

   Load Address: 00001000

   Entry Point:  001a168c

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 001a168c

Linux version 2.6.34.1-ADI-2010R1-pre-svn8982 (test@uclinux52-bf537-spinet) (gcc version 4.3.4 (ADI-trunk/svn-3951) ) #156 Mon J0

register early platform devices

bootconsole [early_shadow0] enabled

bootconsole [early_BFuart0] enabled

early printk enabled on early_BFuart0

Limiting kernel memory to 56MB due to anomaly 05000263

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x00116188

  rodata    = 0x00116188-0x00173750

  bss       = 0x00174000-0x001844d0

  data      = 0x001844d0-0x00196000

    stack   = 0x00194000-0x00196000

  init      = 0x00196000-0x00869000

  available = 0x00869000-0x03800000

  DMA Zone  = 0x03f00000-0x04000000

Hardware Trace Active and Enabled

Boot Mode: 0

Reset caused by Software reset

Blackfin support (C) 2004-2010 Analog Devices, Inc.

Compiled for ADSP-BF537 Rev 0.2

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 500 MHz core clock and 125 MHz System Clock

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

  External memory: cacheable in instruction cache

Data Cache Enabled for CPU0

  External memory: cacheable (write-back) in data cache

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 14224

Kernel command line: root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart0,57600 console=ttyBF0,57600 ip=10.100.4.50f

PID hash table entries: 256 (order: -2, 1024 bytes)

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory available: 48164k/65536k RAM, (6988k init code, 1108k kernel code, 512k data, 1024k dma, 7740k reserved)

Hierarchical RCU implementation.

NR_IRQS:138

Configuring Blackfin Priority Driven Interrupts

console [ttyBF0] enabled, bootconsole disabled

console [ttyBF0] enabled, bootconsole disabled

Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)

Security Framework initialized

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Data A SRAM: 16 KB (16 KB free)

Blackfin L1 Data B SRAM: 16 KB (16 KB free)

Blackfin L1 Instruction SRAM: 48 KB (35 KB free)

NET: Registered protocol family 16

Blackfin DMA Controller

stamp_init(): registering device resources

bio: create slab <bio-0> at 0

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7

Switching to clocksource bfin_cs_cycles

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

UDP hash table entries: 256 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

msgmni has been set to 94

io scheduler noop registered

io scheduler cfq registered (default)

bfin-uart: Blackfin serial driver

bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART

brd: module loaded

bfin_mii_bus: probed

bfin_mii_bus: Can't get IRQ 65535 (PHY)

bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=24)@sclk=125MHz)

bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

TCP cubic registered

NET: Registered protocol family 17

6IP-Config: Complete:tting system clock to 1970-01-05 08:36:28 UTC (376588)

     device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,

     host=bf537-stamp, domain=, nis-domain=(none),

     bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=

dma_alloc_init: dma_page @ 0x028da000 - 256 pages at 0x03f00000

Freeing unused kernel memory: 6988k freed

                           _____________________________________

        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            - http://blackfin.uclinux.org/

\    YP"    `| 8P  `.          - http://docs.blackfin.uclinux.org/

/     \.___.d|    .'           - http://www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    - http://www.analog.com/blackfin

 

Have a lot of fun...

 

 

BusyBox v1.16.2 (2010-07-12 03:50:38 CST) hush - the humble shell

 

root:/> PHY: 0:01 - Link is Up - 100/Full

 

root:/> ethtool -s eth0 wol g

root:/> echo standby > /PM: Syncing filesystems ... sys/power/state

done.

Freezing user space processes ... (elapsed 0.01 seconds) done.

Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.

Suspending console(s) (use no_console_suspend to debug)

 

(On PC: wol -i 10.100.4.50 00:E0:22:FE:BF:96, can not make it wake up)

--

 

 

Bellow is the steps which make this case pass. The only difference is that in u-boot I use "run ramboot" instead of all those separated steps.

--

U-Boot 2010.06-svn2356 (ADI-2010R1-pre) (Jul 10 2010 - 16:13:10)

 

CPU:   ADSP bf537-0.2 (Detected Rev: 0.2) (bypass boot)

Board: ADI BF537 stamp board

       Support: http://blackfin.uclinux.org/

Clock: VCO: 500 MHz, Core: 500 MHz, System: 125 MHz

RAM:   64 MiB

Flash: 4 MiB

In:    serial

Out:   serial

Err:   serial

KGDB:  [on serial] ready

Net:   bfin_mac

Hit any key to stop autoboot:  0

bfin> run ramboot

Using bfin_mac device

TFTP from server 10.100.4.174; our IP address is 10.100.4.50

Filename 'uImage'.

Load address: 0x1000000

Loading: #################################################################

         #################################################################

         #################################################################

         #################################################################

         ####################################################

done

Bytes transferred = 4578775 (45ddd7 hex)

## Booting kernel from Legacy Image at 01000000 ...

   Image Name:   bf537-2.6.34.1-ADI-2010R1-pre-sv

   Created:      2010-07-12   7:22:00 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    4578711 Bytes = 4.4 MiB

   Load Address: 00001000

   Entry Point:  001a168c

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 001a168c

Linux version 2.6.34.1-ADI-2010R1-pre-svn8982 (test@uclinux52-bf537-spinet) (gcc version 4.3.4 (ADI-trunk/svn-3951) ) #156 Mon J0

register early platform devices

bootconsole [early_shadow0] enabled

bootconsole [early_BFuart0] enabled

early printk enabled on early_BFuart0

Limiting kernel memory to 56MB due to anomaly 05000263

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x00116188

  rodata    = 0x00116188-0x00173750

  bss       = 0x00174000-0x001844d0

  data      = 0x001844d0-0x00196000

    stack   = 0x00194000-0x00196000

  init      = 0x00196000-0x00869000

  available = 0x00869000-0x03800000

  DMA Zone  = 0x03f00000-0x04000000

Hardware Trace Active and Enabled

Boot Mode: 0

Reset caused by Software reset

Blackfin support (C) 2004-2010 Analog Devices, Inc.

Compiled for ADSP-BF537 Rev 0.2

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 500 MHz core clock and 125 MHz System Clock

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

  External memory: cacheable in instruction cache

Data Cache Enabled for CPU0

  External memory: cacheable (write-back) in data cache

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 14224

Kernel command line: root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart0,57600 console=ttyBF0,57600 ip=10.100.4.50f

PID hash table entries: 256 (order: -2, 1024 bytes)

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory available: 48164k/65536k RAM, (6988k init code, 1108k kernel code, 512k data, 1024k dma, 7740k reserved)

Hierarchical RCU implementation.

NR_IRQS:138

Configuring Blackfin Priority Driven Interrupts

console [ttyBF0] enabled, bootconsole disabled

console [ttyBF0] enabled, bootconsole disabled

Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)

Security Framework initialized

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Data A SRAM: 16 KB (16 KB free)

Blackfin L1 Data B SRAM: 16 KB (16 KB free)

Blackfin L1 Instruction SRAM: 48 KB (35 KB free)

NET: Registered protocol family 16

Blackfin DMA Controller

stamp_init(): registering device resources

bio: create slab <bio-0> at 0

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7

Switching to clocksource bfin_cs_cycles

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

UDP hash table entries: 256 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

msgmni has been set to 94

io scheduler noop registered

io scheduler cfq registered (default)

bfin-uart: Blackfin serial driver

bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART

brd: module loaded

bfin_mii_bus: probed

bfin_mii_bus: Can't get IRQ 65535 (PHY)

bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=24)@sclk=125MHz)

bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

TCP cubic registered

NET: Registered protocol family 17

IP-Config: Complete:etting system clock to 1970-01-05 08:33:23 UTC (376403)

     device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,

     host=bf537-stamp, domain=, nis-domain=(none),

     bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=

dma_alloc_init: dma_page @ 0x028da000 - 256 pages at 0x03f00000

Freeing unused kernel memory: 6988k freed

                           _____________________________________

        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            - http://blackfin.uclinux.org/

\    YP"    `| 8P  `.          - http://docs.blackfin.uclinux.org/

/     \.___.d|    .'           - http://www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    - http://www.analog.com/blackfin

 

Have a lot of fun...

 

 

BusyBox v1.16.2 (2010-07-12 03:50:38 CST) hush - the humble shell

 

root:/> PHY: 0:01 - Link is Up - 100/Full

 

root:/> ethtool -s eth0 wol g

root:/> echo standby > /sys/power/state

PM: Syncing filesystems ... done.

Freezing user space processes ... (elapsed 0.01 seconds) done.

Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.

Suspending console(s) (use no_console_suspend to debug)

 

(On PC: wol -i 10.100.4.50 00:E0:22:FE:BF:96)

 

PM: suspend of devices complete after 0.274 msecs

PM: late suspend of devices complete after 0.105 msecs

PM: early resume of devices complete after 0.024 msecs

PM: resume of devices complete after 0.429 msecs

Restarting tasks ... done.

root:/>

--

 

 

Bellow is the u-boot environment:

--

U-Boot 2010.06-svn2356 (ADI-2010R1-pre) (Jul 10 2010 - 16:13:10)

 

CPU:   ADSP bf537-0.2 (Detected Rev: 0.2) (bypass boot)

Board: ADI BF537 stamp board

       Support: http://blackfin.uclinux.org/

Clock: VCO: 500 MHz, Core: 500 MHz, System: 125 MHz

RAM:   64 MiB

Flash: 4 MiB

In:    serial

Out:   serial

Err:   serial

KGDB:  [on serial] ready

Net:   bfin_mac

Hit any key to stop autoboot:  0

bfin>

bfin> printenv

bootargs=root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart0,57600 console=ttyBF0,57600

bootdelay=5

baudrate=57600

loads_echo=1

autoload=no

rootpath=/romfs

netmask=255.255.255.0

hostname=bf537-stamp

loadaddr=0x1000000

nc=set ncip ${serverip};set stdin nc;set stdout nc

ubootfile=u-boot.bin

update=tftp $(loadaddr) $(ubootfile);protect off 0x20000000 +$(filesize);erase 0x20000000 +$(filesize);cp.b $(loadaddr) 0x200000)

addip=set bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):eth0:off

ramfile=uImage

ramargs=set bootargs root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart0,57600 console=ttyBF0,57600

ramboot=tftp $(loadaddr) $(ramfile);run ramargs;run addip;bootm

nfsfile=vmImage

nfsargs=set bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3

nfsboot=tftp $(loadaddr) $(nfsfile);run nfsargs;run addip;bootm

flashboot=bootm 0x20100000

ethact=bfin_mac

ipaddr=10.100.4.50

serverip=10.100.4.174

gatewayip=10.100.4.174

ethaddr=00:E0:22:FE:BF:96

bootcmd=run ramboot

stdin=serial

stdout=serial

stderr=serial

 

Environment size: 1099/8188 bytes

bfin>

--

 

Follow-ups

 

--- Michael Hennerich                                        2010-07-23 08:54:04

Not a bug - not even related to u-boot at all.

 

What happens...

When u-boot issues the automatic bootcmd the time between uboot TFTP done and

linux kernel networking up, is short.

It therefore can receive an ARP request from the HOST PC.

It then answers the ARP and the HOST has a matching IP/MAC address pair in its

table.

 

This is the case where your WOL command:

 

#wol -i 10.100.4.50 00:E0:22:FE:BF:96

 

successfully wakes up the target.

 

In case the time between uboot TFTP done and linux kernel networking up is long

 

- the ARP packet send by the host is not replied it therefore doesn't know

which MAC corresponds to 10.100.4.50.

 

However if you issue the WOL command without IP reference it still succeeds.

 

#wol 00:E0:22:FE:BF:96

 

I would recommend - use wol without IP.

 

-Michael

 

--- Vivi Li                                                  2010-07-28 01:57:59

Use wol without IP can't wake up the board.

 

I tried four combination (run step by step or run ramboot, use wol with or

without IP).

The only combination can wake up is run ramboot plus use wol without IP.

 

--- Mike Frysinger                                           2010-07-28 02:01:42

does your test machine have multiple network interfaces ?  maybe you need to

specify the interface to use since it'll use the default interface otherwise.

and without an IP, the packet will probably go to the wrong one.

 

--- Vivi Li                                                  2010-07-28 05:59:51

Yeah, we have two network interfaces in one machine.

So ping host PC to make IP/MAC of target board stored in route table, and then

run this test.

Fixed in test script.

 

--- Mike Frysinger                                           2010-07-28 11:22:31

alternatively, my wakeonlan man page says to use the broadcast address.  then

you wouldnt need to muck with things ahead of time.

 

       -i ip_address

           Destination IP address. Unless you have static ARP tables you should

use some kind of broadcast address (the broadcast address of the network

           where the computer resides or the limited broadcast address).

Default: 255.255.255.255 (the limited broadcast address).

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

config.config.ethernet_wakeup    application/octet-stream    49014    Vivi Li

config.linux.ethernet_wakeup    application/octet-stream    37534    Vivi Li

Outcomes