FAQ: Zeroconf, dhcp (2011-01-28)

Document created by Aaronwu Employee on Aug 28, 2013Last modified by sonic on Sep 8, 2013
Version 2Show Document
  • View in full screen mode

2011-01-28 09:53:24     Zeroconf, dhcp

Daniele Pagani (ITALY)

Message: 97732   

 

Dear sirs,

 

I'm running uClinux 2.6.28.10-ADI-2009R1.1 on a Blackfin537.

 

I'm running avahi-daemon 0.6.25 and it works fine

 

I've installed and it works fine udhcpc

 

Now, I need zeroconf protocol, so I try both zcip (from Busybox) and avahi-autoipd 0.6.25

 

I've not success with them.

 

 

 

1) zcip -v eth1 zcip.script

 

init eth1

zcip: init eth1: No such file or directory

 

(I'm using a ethernet switch, but it works fine, so I need to use eth1)

 

2)

 

root:~> ./avahi-autoipd -s -t avahi-autoipd.action eth1

root:~>

 

I don't see anything...

 

So, could somebody suggest me something?

 

Regards,

 

Daniele.

 

zcip.script

avahi-autoipd.action

TranslateQuoteReplyEditDelete

 

 

2011-02-03 03:05:19     libdaemon

Daniele Pagani (ITALY)

Message: 97874   

 

I need to use avahi-autoipd with uClinux on BF537.

 

I see that I need also libdaemon.

 

Who can I build it?

 

Regards,

 

Daniele.

TranslateQuoteReplyEditDelete

 

 

2011-02-04 12:09:46     Re: libdaemon

Mike Frysinger (UNITED STATES)

Message: 97934   

 

what are you looking for exactly ?  you want someone to d/l libdaemon and document compile instructions for you ?

QuoteReplyEditDelete

 

 

2011-02-07 05:29:03     Re: libdaemon

Daniele Pagani (ITALY)

Message: 97977   

 

My goal is to have autoip feature on my board.

 

I've tested dhcpcd with link-local support, but autoip doesn't work (I don't see anything).

 

So, I've tested zcip, but it always answers "no file found".

 

So, I want to test avahi-autoip. I compiled avahi-daemon, but avahi-autoip needs libdaemon and I don't find it in library selection.

 

Regards,

 

Daniele.

TranslateQuoteReplyEditDelete

 

 

2011-02-07 10:26:47     Re: libdaemon

Mike Frysinger (UNITED STATES)

Message: 97978   

 

it is not in the dist.  you'll have to d/l it from its website and integrate it into the dist, or compile by hand.

QuoteReplyEditDelete

 

 

2011-02-07 14:10:17     Re: libdaemon

Mike Frysinger (UNITED STATES)

Message: 97979   

 

some quick notes:

- you'll have to use "export ac_cv_func_setpgrp_void=yes" ... if integrating into the dist, adding to its Makefile should be fine

- libdaemon/dexec.c needs the one call to fork() changed to vfork() ... this change looks safe for everyone and shouldnt require anything else

- libdaemon/dfork.c wont work under nommu.  what it does is:

    - create a pipe

    - fork a child

    - the child forks again to daemonize (this step could be gutted and replaced with daemon())

    - the child writes its pid to the pipe and returns

    - the parent reads the pid from the pipe and returns

 

since the daemon_fork() expects both the parent and the grandchild to continue to execute, we cant support this on nommu.  the calling code will need tweaking to expect a more vfork/exec or daemon style.

QuoteReplyEditDelete

 

 

2011-02-10 10:05:46     Re: libdaemon

Daniele Pagani (ITALY)

Message: 98076   

 

Thank you for information,

 

but I prefer to use zcip, if possible.

 

I don't understand why zcip doesn't work.

 

root:~> zcip -v eth1 zcip.script

 

init eth1

zcip: init eth1: No such file or directory

 

 

root:~> ifconfig

 

eth0      Link encap:Ethernet  HWaddr 12:34:56:78:9A:34

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:1385 errors:0 dropped:0 overruns:0 frame:0

          TX packets:321 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:152005 (148.4 KiB)  TX bytes:31632 (30.8 KiB)

 

eth1      Link encap:Ethernet  HWaddr 12:34:56:78:9A:34

          inet addr:192.168.1.34  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:1385 errors:0 dropped:0 overruns:0 frame:0

          TX packets:321 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:127075 (124.0 KiB)  TX bytes:31632 (30.8 KiB)

 

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          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)

 

 

root:~> dmesg

Linux version 2.6.28.10-ADI-2009R1.1 (root@linux-26md) (gcc version 4.1.2 (ADI svn)) #630 Tue Feb 1 16:15:25 CET 2011                                                                               

Warning: limiting memory to 27MB due to hardware anomaly 05000263                                

Board Memory: 32MB                                                                               

Kernel Managed Memory: 28MB                                                                      

Memory map:                                                                                      

  fixedcode = 0x00000400-0x00000490                                                              

  text      = 0x00001000-0x00119b50                                                              

  rodata    = 0x00119b50-0x0016f9f0                                                              

  bss       = 0x00170000-0x00181d7c                                                              

  data      = 0x00181d7c-0x00192000                                                              

    stack   = 0x00190000-0x00192000                                                              

  init      = 0x00192000-0x0051d000                                                              

  available = 0x0051d000-0x01aff000                                                              

  DMA Zone  = 0x01b00000-0x01c00000                                                              

Hardware Trace Active and Enabled                                                                

Boot Mode: 0                                                                                     

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

Compiled for ADSP-BF537 Rev 0.2                                                                  

Warning: Compiled for Rev 2, but running on Rev 3                                                

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

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

boot memmap: 000000000051d000 - 0000000001aff000 (usable)                                       

On node 0 totalpages: 6911                                                                       

free_area_init_node: node 0, pgdat 0018e85c, node_mem_map 0051f000                               

  DMA zone: 54 pages used for memmap                                                             

  DMA zone: 0 pages reserved                                                                     

  DMA zone: 6857 pages, LIFO batch:0                                                             

  Normal zone: 0 pages used for memmap                                                           

  Movable zone: 0 pages used for memmap                                                          

NOMPU: setting up cplb tables                                                                    

Instruction Cache Enabled for CPU0                                                               

Data Cache Enabled for CPU0 (write-back)                                                         

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

Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,115200 console=ttyBF0,115200 max_mem=32M mem=28M                                                                               

Configuring Blackfin Priority Driven Interrupts                                                  

PID hash table entries: 128 (order: 7, 512 bytes)                                                

console [ttyBF0] enabled                                                                         

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

Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)                                      

Kernel managed physical pages: 6911                                                              

Memory available: 22120k/28672k RAM, (3628k init code, 1122k kernel code, 482k data, 1024k dma, 296k reserved)                                                                                      

Calibrating delay loop... 997.37 BogoMIPS (lpj=1994752)                                          

Security Framework initialized                                                                   

Mount-cache hash table entries: 512                                                              

Blackfin Scratchpad data SRAM: 4 KB                                                              

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

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

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

net_namespace: 288 bytes                                                                         

NET: Registered protocol family 16                                                               

Blackfin DMA Controller                                                                          

stamp_init(): registering device resources                                                       

NET: Registered protocol family 2                                                                

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

TCP established hash table entries: 1024 (order: 1, 8192 bytes)                                  

TCP bind hash table entries: 1024 (order: 0, 4096 bytes)                                         

TCP: Hash tables configured (established 1024 bind 1024)                                         

TCP reno registered                                                                              

NET: Registered protocol family 1                                                                

Setting up Blackfin MMR debugfs                                                                  

JFFS2 version 2.2. © 2001-2006 Red Hat, Inc.                                                     

msgmni has been set to 43                                                                        

io scheduler noop registered                                                                     

io scheduler anticipatory registered (default)                                                   

io scheduler cfq registered                                                                      

Serial: Blackfin serial driver                                                                   

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

Ethernet Channel Bonding Driver: v3.3.0 (June 10, 2008)                                          

bonding: Warning: either miimon or arp_interval and arp_ip_target module parameters must be specified, otherwise bonding will not detect link failures! see bonding.txt for details.                

bfin_mii_bus: probed                                                                             

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:03, irq=-1, mdc_clk=2500000Hz(mdc_div=19)@sclk=100MHz)                                                                              

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

physmap platform flash device: 00400000 at 20000000                                              

physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank                                       

Amd/Fujitsu Extended Query Table at 0x0040                                                      

number of CFI chips: 1                                                                           

cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.

RedBoot partition parsing not available

Using physmap partition information

Creating 4 MTD partitions on "physmap-flash.0":

0x00000000-0x00040000 : "bootloader(nor)"

0x00040000-0x002d0000 : "Linux"

0x002d0000-0x00330000 : "dati"

0x00330000-0x00400000 : "app"

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

i2c /dev entries driver

i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc01400

TCP cubic registered

NET: Registered protocol family 17

Distributed Switch Architecture driver version 0.1

eth0: detected a KSZ8893M switch

dsa slave smi: probed

Freeing unused kernel memory: 3628k freed

dma_alloc_init: dma_page @ 0x00193000 - 256 pages at 0x01b00000

sport_initialize: Module loaded

eth1: link up, 100 Mb/s, full duplex

sport_open: Sport(0) opened

 

Trying 100/FULL

PHY: 0:03 - Link is Up - 100/Full

root:~>

 

 

 

 

Any suggestions?

TranslateQuoteReplyEditDelete

 

 

2011-02-17 08:16:58     Re: libdaemon

Julien Vermillard (FRANCE)

Message: 98221   

 

Look like you are not running the good cmd line.

 

you tried zcip -i eth1 ?

Attachments

    Outcomes