Introduction
In a computer network, a link-local address is a network address that is valid only for communications within the network segment (link) or the broadcast domain that the host is connected to.
Link-local addresses are not guaranteed to be unique beyond a single network segment. Routers therefore do not forward packets with link-local addresses.
For protocols that have only link-local addresses, such as Ethernet, hardware addresses assigned by manufacturers in networking elements are unique, consisting of a vendor identification and a serial identifier.
Link-local addresses for IPv4 are defined in the address block 169.254.0.0/16 in CIDR notation. In IPv6, they are assigned the address block fe80::/10.
prepare
- git 只用來從github copy檔案,可以用自己習慣的方式像是wget
- automake 必要
- gcc-arm-linux-gnueabihf cross compiler,視自己需求決定
- libdaemon 必要,須準備ARM的share object file (我是用gentoo 的 ARM package manager 產生的)
build
先去下載source code,然後執行autogen.sh
理論上會失敗停止,但沒關係,接著用configure指令 將設定代入,可以看到我關掉很多東西
(因為我不熟這個autoconf的流程,所以先用autogen.sh幫我產生configure檔案再去修改)
修改 avahi\avahi-autoipd\Makefile
找到 LIBDAEMON_LIBS=-ldaemon
修改成 LIBDAEMON_LIBS=-L/usr/arm-linux-gnueabihf/lib -ldaemon (簡單說你要讓Makefile找到ARM的libdaemon)
將ARM的 libdaemon.so 放入 /usr/arm-linux-gnueabihf/lib
因為我只需要autoipd,所以直接在 avahi/avahi-autoipd 裡面 make
如果出現找不到libdaemon.so.X ,就去 /usr/arm-linux-gnueabihf/lib 建symbolic link 將libdaemon.so 指向他要的檔案
deploy
將檔案放到對應的ARM rootfs 位置,並新增需要的目錄
runtime
先確認有沒有root這個group,若沒有就新增
為了讓 avahi-autoipd.action 運作,要在ARM裝net-tools 或 iproute2
如果出現找不到libdaemon,一樣去建symbolic link
若出現 avahi-autoipd.action 找不到指令
請先確認 avahi-autoipd.action 的第一行,bash 是否是跟ARM上面的一樣
例如 busybox 可能是 ash
沒有留言:
張貼留言