作者:革斤Hero_394 | 来源:互联网 | 2023-09-08 09:17
1. tarxvzfdhcp-4.2.5-P1.tar.gz2. .configure--hostarm-linuxac_cv_file__dev_randomyes3. vibi
1. tar xvzf dhcp-4.2.5-P1.tar.gz
2. ./configure --host=arm-linux ac_cv_file__dev_random=yes
3. vi bind/Makefile
(cd ${bindsrcdir} && ./configure --disable-kqueue --disable-epoll --disable-devpoll --without-openssl --without-libxml2 --enable-exportlib --enable-threads=no --with-export-includedir=${binddir}/include --with-export-libdir=${binddir}/lib --with-gssapi=no > ${binddir}/configure.log);
修改为
(cd ${bindsrcdir} && ./configure BUILD_CC=gcc ac_cv_file__dev_random=yes --host=arm-linux --disable-kqueue --disable-epoll --disable-devpoll --without-openssl --without-libxml2 --enable-exportlib --enable-threads=no --with-export-includedir=${binddir}/include --with-export-libdir=${binddir}/lib --with-gssapi=no > ${binddir}/configure.log);
4. cd bind/
5. tar xvzf bind.tar.gz
6. vi bind-9.8.4-P2/lib/export/dns/Makefile.in
gen: ${srcdir}/gen.c
${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ ${srcdir}/gen.c ${LIBS}
修改为
gen: ${srcdir}/gen.c
${BUILD_CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ ${srcdir}/gen.c ${LIBS}
7. make
8. make DESTDIR=$PWD/tmp install
9. cp tmp/usr/local/bin/* /mnt/hgfs/tftpDownload
10. cp tmp/usr/local/sbin/* /mnt/hgfs/tftpDownload
11. cp tmp/usr/local/etc/dhclient.conf.example /mnt/hgfs/tftpDownload/dhclient.conf
12. cp tmp/usr/local/etc/dhcpd.conf.example /mnt/hgfs/tftpDownload/dhcpd.conf
13. cp client/scripts/linux /tftpDownload/dhclient_script //整个文件夹
开发平台:
1. chmod +x /etc/dhclient_script
2. dhclient -d usb0
3. vi /etc/dhclient_script
#!/bin/sh 修改
4. mkdir -p /var/db
dhcp源码编译支持4G上网卡