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脚 ...
随机推荐
- 你相信吗:空气污染改变了我们的DNA
空气与人类的生存是息息相关的,它直接参与人体的气体代谢.物质代谢和体温调节等过程.世界卫生组织和联合国环境组织发表的一份报告说:"空气污染已成为全世界城市居民生活中一个无法逃避的现实. ...
- [资讯]同济D&I出品 | 绝对是史上最萌的机器人教具!!!
机器人小曼……" 3D打印.激光切割等先进工艺. Anibot中包含三种不同的动物形象:小鸡安妮.小鹿安娜.猫头鹰安迪.孩子们通过对各个元器件的学习及编程确保它们幸福成长在阳光氤氲的森林 ...
- 月薪20k+的测试工程师都会这项技能!
一说到测试,很多人认为就是在一直"点点点"找bug的重复性工作,这是早期手工测试给人的刻板印象,随着测试行业的发展,"会代码"越来越成为测试工程师的一个标签. ...
- 手机视频APP将关闭 生态梦成空的三星如何自救?
生态梦成空的三星如何自救?"> 三星如今的处境,只能用"屋漏偏逢连夜雨"来形容.继营收.利润.智能手机销量等大幅下滑之后,裁员也接踵而来,股价的下跌也自然在情理之中 ...
- 亚马逊,谷歌,Facebook,IBM和微软:为了AI,是的,我们在一起了
美国时间9月28日,也就是几个小时前,亚马逊,谷歌,Facebook,IBM和微软宣布成立了一家非盈利组织:人工智能合作组织(Partnership on AI),目标是为人工智能的研究制定和提供范例 ...
- .NET Core 获取程序运行环境信息与反射的应用
目录 RuntimeInformation.Environment 获取信息 反射获取信息 获取某个属性的值以及别名 反射获取信息 使用 总结 笔者的九篇反射系统文章已经完结,但是笔者会持续更新反射在 ...
- java内存区域----运行时数据区
Java虚拟机的内存区域也叫做java运行时数据区,共分为五个部分:程序计数器,方法区,本地方法栈,虚拟机栈和堆.方法区和堆是线程之间所共有的,程序计数器,本地方法栈,虚拟机栈是线程私有的.其中虚拟机 ...
- 线程中断 interrupt 和 LockSupport
本文章将要介绍的内容有以下几点,读者朋友也可先自行思考一下相关问题: 线程中断 interrupt 方法怎么理解,意思就是线程中断了吗?那当前线程还能继续执行吗? 判断线程是否中断的方法有几个,它们之 ...
- 成长日记(2) Java面向对象
本篇主要是记录自己在学习路上的笔记,如果有哪里记错了请大家直接指出 面向对象的概念 *人为抽象的一种编程模型 *面向过程 代码集中 难以维护 *类:对事物 算法 逻辑 概念等的抽象 理解成 模板 图纸 ...
- 记一次crontab执行和日志生成问题
一.crontab未执行 crontab里面设置定时任务如下: 1 19 * * * /usr/bin/python3 /home/nola/a.py > /home/nola/logs/a_l ...