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

  • 相关阅读:
    【IntelliJ Idea】git commit 显示 Local Changes
    【Nginx】worker_connections设置
    【Java Web开发学习】DataSource获取的Connection要不要关闭
    【Redis】LOADING Redis is loading the dataset in memory
    shell 常用
    insert DB
    mq部署
    systemctl启动方式
    mq启动报错ERROR: Please set the JAVA_HOME variable in your environment, We need java(x64)! !!
    redis哨兵centos7开机自启动
  • 原文地址:https://www.cnblogs.com/pokerface/p/5778234.html
Copyright © 2011-2022 走看看