dhcp cross compile
来源:互联网 发布:8086汇编软件 编辑:程序博客网 时间:2024/05/01 11:08
This document describes how to cross-compile DHCP package, providedby Internet
Software Consortium (www.isc.org), for powerpc platform.
1. Getting the package
Get the latest package from http://www.isc.org/products/DHCP/(at the time
of writing it is dhcp-3.0pl2.tar.gz) and untar it to your home directory:
> cd /home/gorjup
> tar xzvf dhcp-3.0pl2.tar.gz
2. Cross-compiling
After you have installed your development kit (I used DTDK-0.3 toolchain,built by
Markus Haag ), set the proper environment variables:
> export CROSS_COMPILE=ppc-linux-
> PATH=$PATH:/opt/dtdk-0.3/mpc860/bin
> export CC=ppc-linux-gcc
> export AR=ppc-linux-ar
> export STRIP=ppc-linux-strip
> export RANLIB=ppc-linux-ranlib
> export LD=ppc-linux-ld
> export NM=ppc-linux-nm
Go to the dhcp directory and configure the dhcp package:
> cd /home/gorjup/dhcp-3.0pl2
> ./configure
Now a new directory, named work.linux-2.2, has been created. Go to thisdirectory
and edit Makefiles. In all makefiles (in the main one and in all thesubdirectories)
you need to do some changes:
> cd work.linux-2.2
- add the destination directory for cross-compiled files and man pages:
DESTDIR = /home/gorjup/target_ppc_dhcp
- change line, beginning with RANLIB:
- RANLIB = ranlib
+ RANLIB = ppc-linux-ranlib
- add the definition for CC variable:
+ CC = ppc-linux-gcc
In following makefiles:
common/Makefile, dhcpctl/Makefile, dst/Makefile, minires/Makefile andomapip/Makefile
you need to replace ar binutility with ppc-linux-ar.
You find ar binutility at the end of Makefiles.
Now cross-compile the package:
> make
> make install
At the end you can strip the binaries by using ppc-linux-strip.
3. Testing
In directory /home/gorjup/target_ppc_dhcp you will find all necessaryfiles that
you need to add to the file system of your target.
Then you can test the client, server and relay agent:
Starting client:
# dhclient -q
Option -q disables printing out copyrights on the screen.
Starting server:
# dhcpd -q
Starting relay agent:
# dhcrelay -q x.x.x.x
x.x.x.x is an IP address of the remote DHCP server.
===========================================================================
# dhclient ra0
Internet Systems Consortium DHCP Client V3.0.3
Copyright 2004-2005 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
execve (/sbin/dhclient-script, ...): No such file or directory
Listening on LPF/ra0/00:24:a5:21:05:d6
Sending on LPF/ra0/00:24:a5:21:05:d6
Sending on Socket/fallback
DHCPREQUEST on ra0 to 255.255.255.255 porRcv Wcid(1) AddBAReq
t 67
Start Seq = 00000000
DHCPACK from 192.168.7.1
execve (/sbin/dhclient-script, ...): No such file or directory
bound to 192.168.7.100 -- renewal in 3369 seconds.
--------------------------------------------------------------------------
There isn't "bash" in the directory "/bin/bash" belonging to your file system. So you should modify words "#!/bin/bash" in file "/sbin/dhclient-script" to "#!/bin/sh"
- dhcp cross compile
- cross compile
- au1200 kdrive cross compile
- mplayer cross compile
- mplayer cross compile 2
- mplayer cross compile 3
- ffmpeg cross compile
- ffmpeg cross compile 2
- mplayer cross compile 4
- mplayer cross compile 5
- mplayer_r29702 cross compile
- live555 cross compile
- Cross compile - scratchbox
- Cross Compile zlib
- Cross Compile libpng
- git cross-compile
- cross compile tcpdump tool
- cross compile ethtool
- jQuery--闭包
- MTK6235 09A平台超大拨号数字界面实现
- vim 的用法
- 过滤release下因异常而弹出的对话框
- 帮同学翻译的一段摘要
- dhcp cross compile
- UNIX常用命令详解
- 哈哈
- Cassandra 0.6 发布-下载
- 常见struts面试题
- 手机UI设计建议(转自stackoverflow的回复)
- 关于浏览器关闭之后session就变了的问题
- 两厢车、三厢车的“厢”的具体概念是什么?
- PDF-XChange Pro 4.0.0174 简体中文特别版