quagga/zebra - 交叉编译(cross)和本地编译(native)
https://github.com/dramalife/note.git
AUTHOR : Dramalife@live.com
Init : 2020.03.19
Update :
转载请注明出处:https://github.com/dramalife/note
本文source url
Cross Compile
https://github.com/dramalife/note.git
AUTHOR : Dramalife@live.com
Init : 2020.03.19
Update :
1 Build
config.log
# warning : sysconfdir -- confdir of target !!!!
./configure --host=arm-linux-gnueabihf --with-sysroot=/usr/local/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf --disable-nhrpd --prefix=/home/dramalife/prefix_quagga/usr/local --sysconfdir=/home/dramalife/prefix_quagga/usr/local/etc --enable-vtysh --enable-user=root --enable-group=root --enable-vty-group=root
1.1 configure - libreadline
1.1.1 ErrMsg
not found
configure: error: vtysh needs libreadline but was not found and usable on your system.
1.1.2 config.log
# Error - configure
configure:18303: checking for main in -lreadline
configure:18322: arm-linux-gnueabihf-gcc -o conftest -g -O2 -g -Os -fstack-protector-strong --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fpie -fno-omit-frame-pointer -Wall -Wextra -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers conftest.c -lreadline >&5
/usr/local/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lreadline
collect2: error: ld returned 1 exit status
1.1.3 Solve
# Download source code
wget https://mirrors.sjtug.sjtu.edu.cn/gnu/readline/readline-8.0.tar.gz
# Install to sysroot of cross_tool, for compilation.
./configure --host=arm-linux-gnueabihf --prefix=/usr/local/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf
# Install to target rootfs, for runtime.
./configure --host=arm-linux-gnueabihf --prefix=/home/dramalife/prefix_quagga
make
sudo make install
1.2 configure - libncurses
1.2.1 ErrMsg
found but not usable !
configure: error: vtysh needs libreadline but was not found and usable on your system.
1.2.2 config.log
$ arm-linux-gnueabihf-gcc -o conftest -g -O2 -g -Os -fstack-protector-strong --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fpie -fno-omit-frame-pointer -Wall -Wextra -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers conftest.c -L=/usr/local/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/lib -lreadline
/usr/local/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/lib/libreadline.so: undefined reference to `tputs'
/usr/local/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/lib/libreadline.so: undefined reference to `tgoto'
/usr/local/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/lib/libreadline.so: undefined reference to `tgetflag'
/usr/local/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/lib/libreadline.so: undefined reference to `UP'
/usr/local/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/lib/libreadline.so: undefined reference to `tgetent'
/usr/local/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/lib/libreadline.so: undefined reference to `tgetnum'
/usr/local/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/lib/libreadline.so: undefined reference to `PC'
/usr/local/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/lib/libreadline.so: undefined reference to `tgetstr'
/usr/local/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/lib/libreadline.so: undefined reference to `BC'
collect2: error: ld returned 1 exit status
1.2.3 Solve
# Download source code
wget https://mirrors.sjtug.sjtu.edu.cn/gnu/ncurses/ncurses-6.2.tar.gz
# Install to sysroot of cross_tool, for compilation.
./configure --host=arm-linux-gnueabihf --prefix=/usr/local/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf
# Install to target rootfs, for runtime.
./configure --host=arm-linux-gnueabihf --prefix=/home/dramalife/prefix_quagga
make
sudo make install
1.3 libtool - libcares (optional)
1.3.1 ErrMsg
libtool: warning: library '/usr/local/lib/libcares.la' was moved.
libtool: warning: library '/usr/local/lib/libcares.la' was moved.
/usr/local/lib/libcares.so: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
Makefile:475: recipe for target 'nhrpd' failed
make[2]: *** [nhrpd] Error 1
make[2]: Leaving directory '/home/dramalife/temp/quagga-1.2.4/nhrpd'
Makefile:467: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/dramalife/temp/quagga-1.2.4'
Makefile:399: recipe for target 'all' failed
make: *** [all] Error 2
1.3.2 Solve
# Download source code
wget https://c-ares.haxx.se/download/c-ares-1.15.0.tar.gz
# Install to sysroot of cross_tool, for compilation.
./configure --host=arm-linux-gnueabihf --prefix=/usr/local/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf
# Install to target rootfs, for runtime.
./configure --host=arm-linux-gnueabihf --prefix=/home/dramalife/prefix_quagga
make
sudo make install
2 Install
root@Raisecom:/# cp /usr/local/lib/libzebra.* /lib
root@Raisecom:/# zebra --version
zebra version 1.2.4
Copyright 1996-2005 Kunihiro Ishiguro, et al.
configured with:
--host=arm-linux-gnueabihf --with-sysroot=/usr/local/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf --disable-nhrpd --prefix=/home/dramalife/prefix_quagga/usr/local --sysconfdir=/home/dramalife/prefix_quagga/usr/local/etc --enable-vtysh --enable-user=root --enable-group=root --enable-vty-group=root
root@Raisecom:/# uname -a
Linux Raisecom 4.1.15 #1 SMP PREEMPT Wed Jan 8 09:38:46 CST 20 armv7l GNU/Linux
root@Raisecom:/# cat /etc/issue
Freescale i.MX Release Distro 4.1.15-2.1.0 \n \l
root@Raisecom:/#
3 Exec
root@Raisecom:/# telnet 127.0.0.1 01
Entering character mode
Escape character is '^]'.
Hello, this is Quagga (version 1.2.4).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
User Access Verification
Password:
Router>
Router> enable
Password:
Password:
Router#
Router#
clear Clear stored data
configure Configuration from vty interface
copy Copy configuration
debug Debugging functions (see also 'undebug')
disable Turn off privileged mode command
echo Echo a message back to the vty
enable Turn on privileged mode command
end End current mode and change to enable mode.
exit Exit current mode and down to previous mode
help Description of the interactive help system
list Print command list
logmsg Send a message to enabled logging destinations
no Negate a command or set its defaults
quit Exit current mode and down to previous mode
show Show running system information
terminal Set terminal line parameters
who Display who is on vty
write Write running configuration to memory, network, or terminal
Router#
Native compile
https://github.com/dramalife/note.git
AUTHOR : Dramalife@live.com
Init : 2019.01.21
Update : ... ...
Update : 2020.03.19
Update :
1 Build
1.1 Error1 - libreadline
error: vtysh needs libreadline but was not found and usable on your system.
sudo apt-get install libreadline-dev
1.2 Error2 - libtool version
missing: line 81: aclocal-1.15: command not found
libtool: Version mismatch error. This is libtool 2.4.2 Debian-2.4.2-1.7ubuntu1, but the
libtool: definition of this LT_INIT comes from libtool 2.4.6.
autoreconf --force --install
1.3 Error3 - libtool
# Ref : https://blog.csdn.net/github_29989383/article/details/51886234
#
# libtool: Version mismatch error. This is libtool 2.4.2 , but the
# libtool: definition of this LT_INIT comes from libtool 2.4.6.
# libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2
# libtool: and run autoconf again
# make maintainer-clean 清理干净后,在运行上面的命令
autoreconf --force --install
./configure
make
2 install&runquagga
./configure --enable-vtysh --enable-user=root --enable-group=root --enable-vty-group=root
make
sudo make install
zebra: error while loading shared libraries: libzebra.so.1: cannot open shared object file: No such file or directory
sudo cp /usr/local/lib/libzebra.so* /usr/lib
3 Exec
# /etc/services #zebra 2601/tcp #zebra vty
sudo zebra -d
telnet 7.0.0.1 2601
# usr:admin passwd:zebra,,,enablepasswd:zebra
quagga/zebra - 交叉编译(cross)和本地编译(native)的更多相关文章
- .NET跨平台之旅:在Linux上以本地机器码(native)运行ASP.NET Core站点
在将“.NET跨平台之旅”示例站点 about.cnblogs.com 从 ASP.NET 5 RC1 升级至 ASP.NET Core 1.0 (博文链接)之后,我们有一个难以抗拒的冲动 —— 体验 ...
- 【转】用串口登录Beaglebone Black、用usb共享电脑网络、内核模块的本地编译
原文网址:http://bbs.eeworld.com.cn/thread-431507-1-1.html 串口连接BBB使用usb线可以连接BBB和电脑,用ssh就可以登录BBB来进行操作.但有时候 ...
- Sql server2014 内存优化表 本地编译存储过程
参考文献:http://www.infoq.com/cn/news/2013/09/Compiled-Queries http://www.bianceng.cn/database/SQLServer ...
- oracle本地编译问题
oracle10.2: --将过程重新编译为本地编译方式,提示有编译错误,经查提示未设置plsql_native_library_dir 参数 SQL> alter procedure p_xx ...
- (OK) Installing Quagga—zebra—configure—make—CentOS7
-------------------Installing Quagga # tar xzf quagga-0.99.21mr2.2.tar.gz # cd quagga-0.99.21mr2.2 / ...
- maven项目引入外部第三方jar包,引入、本地编译、第三方jar一起打到jar中、在linux机器中解决classnotfound(配置classpath),笔记整理。
文章目录 引用的第三方jar的目录结构(示例) 引入第三方jar进行dependency使项目内能import 本地编译 第三方jar一起打到jar中 在linux机器中解决classnotfound ...
- Chrome 插件: 起动本地应用 (Native messaging)
Chrome 插件: 起动本地应用 (Native messaging) www.MyException.Cn 网友分享于:2014-08-01 浏览:3次 Chrome 插件: 启动本地应用 ...
- Chrome 小工具: 启动本地应用 (Native messaging)
最近遇到一个新的问题.需要使用Chrome 插件, 从我们对我们当地的一个网站之一启动C#应用,同时通过本申请值执行不同的操作. 在这里记录下解决的过程.以便以后查找 首先我们须要新建一个google ...
- Apollo-3.0本地编译
Apollo-3.0本地编译 用docker编译所用的dev.x86_64.dockerfile文件(具体位置在apollo/docker/build)中有所有的依赖库或包, 还会执行一些shell脚 ...
随机推荐
- 添加找回鼠标右键新建菜单里的新建office2003/2007/2010文档的简洁方法
鼠标右键新建菜单里的新建office文档丢失了怎么办?我们可以通过一些优化设置软件如优化大师来定制,但更简单的方法是只需要导入相应的注册表设置就行了. 下面即在鼠标右键新建菜单里添加新建office2 ...
- Daily Practice 2016-09-20
算法 回文(Palindrome)数字:判断一个数字是不是回文数字,不能使用另外的空间. 提示: 负数可以是回文数字吗? 如果转为字符串需要新分配空间 你也许想到了反转数字,但反转数字可能溢出,怎样处 ...
- 基于webhook方案的Git自动部署方案
之前已经用Git实现了自己博客的提交自动部署,并自动提交到GitHub和coding以备不时之需.平时项目代码都托管在Coding或者GitHub上,也已经用上了coding提供的webhook功能, ...
- AI未来如何应对人类的欺骗?
人工智能正以可预见.不可预见的种种形式无孔不入地涉足社会的各个层面,这既让人兴奋,也让人不安.我们能够预测到这样的情绪反应,但我们真的能够预测到人工智能所涉及的相关风险吗? 假若现在是2022年,你乘 ...
- 对话|人工智能先驱Yoshua Bengio
Bengio"> 今年1月份,微软收购深度学习初创公司Maluuba时,Maluuba公司德高望重的顾问.深度学习先驱Yoshua Bengio也接手了微软的人工智能研究顾问 ...
- 初识Flask框架
Flask简介: Flask诞生于2010年,是Armin ronacher(人名)用 Python 语言基于 Werkzeug 工具箱编写的轻量级Web开发框架. Flask 本身相当于一个内核,其 ...
- 达拉草201771010105《面向对象程序设计(java)》第九周学习总结
达拉草201771010105<面向对象程序设计(java)>第九周学习总结 实验九异常.断言与日志 实验时间 2018-10-25 1.实验目的与要求 (1) 掌握java异常处理技术: ...
- python数组和字符串互相转换
字符串转数组 str = '1,2,3' arr = str.split(',') 数组转字符串 arr = ['a','b'] str = ','.join(arr) arr = [1,2,3] s ...
- AVCaptureInput和AVCaptureOutput子类介绍
AVCaptureInput AVCaptureDeviceInput:用于从AVCaptureDevice对象捕获数据. AVCaptureScreenInput:从macOS屏幕上录制的一种捕获输 ...
- C++ 迷宫寻路问题
迷宫寻路应该是栈结构的一个非常经典的应用了, 最近看数据结构算法应用时看到了这个问题, 想起来在校求学时参加算法竞赛有遇到过相关问题, 感觉十分亲切, 在此求解并分享过程, 如有疏漏, 欢迎指正 问题 ...