Compile ntp on none-x86 platform

Download newest version from NTP website: http://www.ntp.org/downloads.html [crayon-6801521b9ea5d058690476/] You must indicate '--with-hardenfile=default' argument when your compile don't support libssp or else you will get errors seem as: [crayon-6801521b9ea62473709827/] refs: https://gitlab.com/atilla/buildroot/commit/5766b6fb34a897092092f7d76d6b4f2bc8c48571
CrossCompile openssh

CrossCompile openssh

ChangeLog Download sources [crayon-6801521b9efb0318708620/] Build openssl 如果编译器中自带了openssl库则不需要自己重新编译openssl。如果编译器不带openssl,或者自带的openssl有漏洞,则需要自己下载并编译openssl。 http://kaoru.tech/archives/50 http://kaoru.tech/archives/1385 Build zlib (i.MX6Ul) [crayon-6801521b9efb3384600133/] Build openssh [crayon-6801521b9efb4203473883/] SAM9X5 (CROSS_COMPILE:arm-linux) [crayon-6801521b9efb5122648558/] i.MX6UL (CROSS_COMPILE:arm-poky-linux-gnueabi) [crayon-6801521b9efb6305159765/] Deploy [crayon-6801521b9efb7132686029/] Reference https://bbs.archlinux.org/viewtopic.php?id=165382

i.MX交叉编译openssl

freescale的i.MX采用了yocto的框架编译。提取toolchain并安装后,在toolchain的安装目录有一个脚本可以用来设置交叉编译的环境变量。 ISSUE 但是当使用此环境变量编译openssl后,会出现以下问题: [crayon-6801521b9f16a903021849/] FIXes 此时可以通过手动配置编译环境解决: 重新开一个shell 设置交叉编译器目录到PATH [crayon-6801521b9f16d788495310/] 采用通用32位配置Autoconf [crayon-6801521b9f16e208001968/] 修改Makefile中的CC为交叉编译器的GCC,注意不要忘了后面的参数 [crayon-6801521b9f16f715023606/] 编译 [crayon-6801521b9f170281732612/] 参考 http://berniechenopenvpn.blogspot.com/2015/10/wpasupplicant-am335x.html

How to Cross Compile openssl

下载 [crayon-6801521b9f2eb109147299/] 编译 openssl-0.9.7a [crayon-6801521b9f2ed577375921/] openssl-1.0.0 and later 查看支持的平台 [crayon-6801521b9f2ee401139342/] 配置参数&编译 [crayon-6801521b9f2ef154696835/] Status of different versions: OpenSSL 1.0.1 through 1.0.1f (inclusive) are vulnerable OpenSSL 1.0.1g is NOT vulnerable OpenSSL 1.0.0…

CrossCompile snmpd

$ ./configure --build=i386-linux --host=arm-linux --enable-mini-agent --disable-ipv6 --with-endianness=little --disable-manuals --disable-ucd-snmp-compatibility --enable-as-needed --disable-embedded-perl --without-perl-modules --disable-snmptrapd-subagent --disable-applications --disable-scripts $ make LDFLAGS="-static"

Cross-compile iptables

今天编译了iptables着实令我郁闷了一下。 我们的kernel用的是linux-2.6.36-rc2。由于历史原因,客户应用层使用的编译器和我们编译kernel的编译器不一样。 结果就很悲摧: iptables v1.4.12.1: can't initialize iptables table `filter': Invalid argument Perhaps iptables or your kernel needs to be upgraded. 查了一下bing,从什么大之前开始google就一直在抽风。 找到了一个更加令人悲摧的地方:http://www.iptables.info/en/iptables-problems.html This is a bit more serious since…

Cross-compile vsftpd

下载vsftp源码 然后修改Makefile,将CC修改为$(CROSS_COMPILE)gcc 编译即可。 默认vsftpd需要PAM支持。如果使用busybox做rootfs的话支持PAM比较麻烦,可以将sysdeputil.c文件中关于“pam_”开头的函数调用全部删除。然后重新编译。 编译最后会出现如下错误: arm-linux-gcc -o vsftpd main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o tunables.o ftpdataio.o secbuf.o ls.o postprivparent.o logging.o str.o netstr.o sysstr.o strlist.o banner.o filestr.o parseconf.o secutil.o ascii.o oneprocess.o…

Cross-compile tcpdump

tcpdump是用来debug网络的无上利器,虽然我不怎么会用。但是嵌入式板子上面还是带一个好。 看了busybox好像没有移植过去。看来只能自己编译了。 第一步当然要去下载最新版本。点击进入官网 tcpdump分为2块,一块是libpcap,一块是tcpdump。 编译libpcap 解压。我们不需要can,不需要bluetooth,指定linux版本为2.6。执行: [crayon-6801521b9f561828302636/] 编译tcpdump 解压。运行: [crayon-6801521b9f563243904304/] 编译出来的tcpdump是不需要libpcap的。 That's all.

Cross-crompile minicom

minicom需要ncurses,如果你的交叉编译环境自带的话会省很多事情。否则需要先编译ncurses。 不然会出现如下的错误信息: [crayon-6801521b9f649142307494/] 从http://www.gnu.org/software/ncurses/ncurses.html下载ncurses [crayon-6801521b9f64b843222746/] 因为我们指定了prefix,ncurses会到错误的地方(prefix/share/terminfo)找terminfo。执行minicom的时候就会出现如下的错误信息: No termcap entry for vt102 所以需要修改TERMINFO默认寻找路径。 [crayon-6801521b9f64d074532502/] 修改TERMINFO_DIRS和TERMINFO宏为"/usr/share/terminfo" [crayon-6801521b9f64e046361244/] [crayon-6801521b9f64f430602502/] 从http://alioth.debian.org/projects/minicom/下载minicom [crayon-6801521b9f650013917131/] [crayon-6801521b9f651896426959/] 就可以获得minicom 最后拷贝libncurses.so到/lib,拷贝文件/usr/share/terminfo/v/vt102即可。