1.

如果需要让pppd支持packet filtering 功能的话就需要编译libpcap.

cross compile libpcap-1.0.0

./configure --host=arm-xscale-linux-gnu --prefix=/usr/arm-xscale-linux-gnu/

直接出错了

configure: error: pcap type not determined when cross-compiling; use --with-pcap=...

比较了非交叉编译的log,发现需要加上--with-pcap=linux

./configure --host=arm-xscale-linux-gnu --prefix=/usr/arm-xscale-linux-gnu/ --with-pcap=linux

checking Linux kernel version... unknown
configure: error: cannot determine linux version when cross-compiling

查configure文件if test $ac_cv_linux_vers = unknown ; then
                { { echo "$as_me:$LINENO: error: cannot determine linux version when cross-compiling" >&5
echo "$as_me: error: cannot determine linux version when cross-compiling" >&2;}
   { (exit 1); exit 1; }; }

原来是交叉编译器无法通过uname获得arm linux 的版本.只能通过cache文件设置了.

echo ac_cv_linux_vers=linux-2.6.15.6-xyz4>arm-linux.cache
./configure --cache-file=arm-linux.cache --host=arm-xscale-linux-gnu --prefix=/usr/arm-xscale-linux-gnu/ --with-pcap=linux
make
make install

这下过了libpcap-1.0.0被安装到了/usr/arm-xscale-linux-gnu/ 目录下

2.

cross compile ppp-2.4.4
./configure --prefix=/usr/arm-xscale-linux-gnu   <--  ppp-2.4.4 只支持--prefix/--sysconf参数,其他都不支持

make CC=/opt/gcc-4.1.2-glibc-2.4/arm-xscale-linux-gnu/bin/arm-xscale-linux-gnu-gcc

options.c:59:18: error: pcap.h: No such file or directory
options.c: In function 'process_option':
options.c:781: warning: dereferencing type-punned pointer will break strict-aliasing rules
options.c: In function 'setpassfilter':
options.c:1458: error: 'pcap_t' undeclared (first use in this function)
options.c:1458: error: (Each undeclared identifier is reported only once
options.c:1458: error: for each function it appears in.)
options.c:1458: error: 'pc' undeclared (first use in this function)

个人觉得,ppp的Makefile 有问题,没有在configure的时候把 --prefix 所指向的路径作为默认路径.

我的做法有两种
第一种在  pppd/Makefile 文件中

line86 行 CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="/usr/arm-xscale-linux-gnu"'
后添加
CFLAGS += -I$(DESTDIR)/include

LDFLAGS = -L$(DESTDIR)/lib

或者
第二种也是在 pppd/Makefile 文件中

直接disable PPP packet filtering,这样的话libpcap-1.0.0甚至都不用编译

# Uncomment the next line to include support for PPP packet filtering.
# This requires that the libpcap library and headers be installed
# and that the kernel driver support PPP packet filtering.
#FILTER=y

两种任一种改完,再运行
make CC=/opt/gcc-4.1.2-glibc-2.4/arm-xscale-linux-gnu/bin/arm-xscale-linux-gnu-gcc
make install

ppp的包就被安装在pc的/usr/arm-xscale-linux-gnu/, 把该目录原封不动拷贝到板子的相同路径下,就可以在板子上运行pppd了.

OK.

How to cross compile the PPP to arm-xscale相关推荐

  1. 添加arm系列相关的cross compile toolchain

    将共享文件夹中的交叉编译工具压缩包复制到/usr/local/arm文件夹下,并且解压: $sudo cp arm-toolchain.tar.bz2 /usr/local/arm/ $sudo ta ...

  2. Cross compile webrtc for ios on mac os.

    编译步骤 下载depot_tools svn co http://src.chromium.org/svn/trunk/tools/depot_tools 设置PATH变量 export PATH=$ ...

  3. cross compile WiringPi

    刚入手了树莓派4代8G,与我之前的树莓派2代有很大进步,包括板载的wifi5,供电为typec,双hdmi,直接插入microsd,还有一个装配精度上乘的塑料壳. 下面开始讲如何交叉编译动态库,使用的 ...

  4. xscale linux内核编译,Building arm-linux toolchain for ARM/XSCALE

    4. Bootstrap compiler gcc Setup (1) kernel和库头文件 mkdir ${PRJROOT}/kernel make ARCH=arm menuconfig (选择 ...

  5. cross_compile = arm-linux-,cross compile grpc for arm

    8种机械键盘轴体对比 本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选? This post will tell you how to cross compile gPRC static lib ...

  6. 我见过最全的剖析QEMU原理的文章[Z]

    转自: http://people.cs.nctu.edu.tw/~chenwj/dokuwiki/doku.php?id=qemu How To Become A Hacker 写给新手程序员的一封 ...

  7. kaldi在linux上编译,Kaldi的编译过程

    目录 本文介绍Kaldi的编译过程. 在Windows下编译 不建议在Windows下编译. configure脚本是怎么工作的 configure脚本有很多参数,其中一种用法是: ./configu ...

  8. arm服务器配置信息,ARM板 web服务器交叉编译及配置

    httpd 一.apr 安装 1.解压 tar -xvf apr-1.7.0.tar.bz2 2.编译 ./configure CC=aarch64-linux-gnu-gcc --host=aarc ...

  9. linux编写arm执行文件夹,嵌入式ARM-Linux平台上的编译、配置和运行使用

    本文介绍了嵌入式ARM-Linux上的常用应用程序wpa_supplicant(以及wpa_supplicant依赖的libnl和openssl)的编译.配置和运行使用,iw.hostapd等应用的编 ...

最新文章

  1. 2020-10-29 PYTORCH与Tensorflow速查表
  2. LeetCode14 Longest Common Prefix
  3. c语言结构体中整形数组初始化,c – 将{0,0}在结构体中初始化数组?
  4. java nio 心跳包_请问Java中Socket的心跳包如何实现?
  5. QCA9377 QCA1023系列蓝牙WiFi二合一模块方案选型参考
  6. java qq音乐接口 api,QQ音乐的各种相关API
  7. 《人工智能简史》读后感
  8. 什么是文本分析,文本分析主要运用到了哪些关键技术?
  9. XenServer 7.0基础命令及故障处理办法
  10. 网站隐藏跳转代码php,域名跳转代码[可隐藏与不隐藏域名转向代码(自动跳转代码) ]...
  11. 使用MYSITE.github.io的免费二级域名实现顶级域名的重定向网址跳转
  12. 对话系统 NLU项目总结报告
  13. Python中Scrapy框架的代理使用
  14. vim自动格式化代码转载
  15. 中国网络安全人才需求
  16. 【从零开始学极狐gitlab】07作业关键字allow_failure、when、timeout(二) #JIHULAB101
  17. 行为金融(五):非有效市场
  18. linux系统怎么退出文本模式,linux的有关重启,文本模式的切换
  19. uni-app线上引入阿里矢量图
  20. 福昕阅读器的放大镜,拯救近视小伙伴的不开心

热门文章

  1. WP7手机屏蔽全屏震动
  2. 链塔智库|区块链产业要闻及动态周报(2021年3月第4周)
  3. 怎么禁止链接微软的更新服务器,Win10正式版怎么禁止强制自动更新系统?
  4. VBA智慧办公——高效处理Excel表格(序)
  5. VBA操作Excel
  6. Vagrant环境搭建
  7. coins feast 题解_feast英语月考阅读理解
  8. python如何定义类?
  9. 简述区块链开发与应用
  10. 关于环球安防 Global CCTV Security Co.,Ltd