zoukankan      html  css  js  c++  java
  • 嵌入式Linux之移植dhcp源码

    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

  • 相关阅读:
    闲谈《一》
    GoldenGate系列一:快速搭建单向同步GoldenGate环境
    读取并分析wgetrc文件
    oracle之Flash Recovery Area全面介绍
    使用Subversion进行版本控制 附录A
    使用lstat()判断文件类型
    连接数据库时提示归档器失败 ORA00257: archiver error
    GoldenGate系统三:trouble shooting and log
    关于VMware虚拟机的上网
    使用C语言读取properties文件V1.0
  • 原文地址:https://www.cnblogs.com/pokerface/p/5778234.html
Copyright © 2011-2022 走看看