PPP官网下载:
https://download.samba.org/pub/ppp/
编译:
root@zhaoxc-VBox:/opt/arm-tools/ppp-2.4.5# ./configure --prefix=/opt/arm-tools/ppp-2.4.5/install-arm/
root@zhaoxc-VBox:/opt/arm-tools/ppp-2.4.5# make CC=arm-none-linux-gnueabi
root@zhaoxc-VBox:/opt/arm-tools/ppp-2.4.5# make install
注1:由于一开始的编译命令式./configure --host=arm-none-linux-gnueabi --prefix=/opt/arm-tools/ppp-2.4.5/install-arm/ 实际上生成的Makefile里面并没有指定编译器,但是make时使用的是gcc,而不是arm-none-linux-gnueabi-gcc,所以在ARM无法运行。报错“pppd -sh: cannot execute binary file ”
注2:make时出错“ppp install "error: field ‘pppol2tp’ has incomplete type”然后搜索原因,在网上找到一位大神的修复方法:在ppp-2.4.5/include/linux/if_pppol2tp.h中添加程序如下:
--- ppp-2.4.5/include/linux/if_pppol2tp.h
+++ ppp-2.4.5/include/linux/if_pppol2tp.h
@@ -32,6 +32,45 @@
+
+struct pppol2tpin6_addr {
+
+
+
+
+
+
+
+};
+
+
+struct pppol2tpv3_addr {
+
+
+
+
+
+
+
+};
+
+struct pppol2tpv3in6_addr {
+
+
+
+
+
+
+
+};
+
复制到ARM上:
按照上面的make好之后,由于make install出错,所以直接在目录中找到如下的四个文件:
chat
复制到ARM的/usr/sbin目录下
建立/etc/ppp目录:
从ppp-2.4.5相应目录中拷贝文件,建立如下目录结构:
/etc/ppp/chap-secrets
/etc/ppp/pap-secrets
/etc/ppp/ip-up
/etc/ppp/ip-down
/etc/ppp/peer/
拨号上网:
见本博客其他文章。
参考网页:https://forums.gentoo.org/viewtopic-p-7100056.html
https://bugs.gentoo.org/attachment.cgi?id=320466&action=edit