交叉编译(ISC)DHCP:dhcp-4.3.0b1

参考:  Cross_Compiling_ISC_dhcp_for_ARM     移植dhclient到arm linux

./configure --host=aarch64-himix100-linux --prefix=xxx  --build=i686-pc-linux-gnu ac_cv_file__dev_random=yes

make 过程会出现一下警告错误:

ns_name.c:25:19: error: ‘rcsid’ defined but not used [-Werror=unused-const-variable=]

将对应文件的MakeFile中的 -Werror 去除即可。

拷贝生成的dhclient到开发板上,可以将其放在/usr/bin/下;

拷贝另外两个配置文件到开发板,分别是/home/dhcp-3.1.3/client/dhclient.conf和/home/dhcp-3.1.3/client/scripts/linux 到开发板的/sbin/目录下。

并修改后者文件名为dhclient-script,并修改该文件的第一行#!/bin/bash 为#!/bin/sh,保存后,修改权限。

为eth0 或者wlan0配置dhcp服务,输入dhclient eth0 即可。

posted @ 2021-06-10 14:42  朱果果  阅读(651)  评论(0编辑  收藏  举报