基本理论:
$ export TOOL_PATH=path_to_xycloud_devtools $ export PATH=${TOOL_PATH}/gcc/bin:$PATH $ ./configure --host=arm-linux-gnueabihf --build=x86-linux
具体见:https://docs.xycloud.com/products/1/3/2.html
如果出现:命令 'ls' 可在 '/bin/ls' 处找到 由于/bin 不在PATH 环境变量中,故无法找到该命。。。,解决方法:$cd /etc/environment,执行 $source /etc/environment
具体见:https://jingyan.baidu.com/article/63acb44af85a2861fcc17efb.html
-----------------------------------------------------------------------------------------------------------
1、 下载xinetd
官网http://www.wendangwang.com/连接失败,于是到http://www.wendangwang.com的下载中心下载
版本为xinetd-2.3.14。
2、 编译
解压源码到工作目录tar zxvf xinetd-2.3.14.tar.gz;
在xinetd-2.3.14目录下配置:
./configure --host=arm-linux --prefix=/home/xxxx/testrootfs/usr
交叉编译:make
安装:make install
之后在prefix指定的目录中将会创建sbin和man目录,xinetd可执行文件在sbin中。其中还有两个文件itox和xconv.pl,是可以将原来inetd配置文件(/etc/inetd.conf)转换为xinetd配置文件(/etc/xinetd.conf),一个是可执行文件一个是Perl脚本,功能一样。
缩减大小,xinetd将从500多K字节缩减为120K左右:
arm-linux-strip /home/xxxx/testrootfs/usr/sbin/itox
arm-linux-strip /home/xxxx/testrootfs/usr/sbin/xinetd
3、 在目标板中部署
将/home/xxxx/testrootfs/usr/sbin/中所有文件复制到目标板文件系统的/usr/sbin/中;
在目标板控制台执行inetd配置文件转换:
$xconv.pl < /etc/inetd/conf > /etc/xinetd.conf
修改/etc/rc.d/init.d/netd,将其中
base=inetd
改为
base=xinetd
至此,重启开发板后自动运行的就是xinetd了。
具体见:https://www.wendangwang.com/doc/e7db401c08ddc229df7f5533
-----------------------------------------------------------------------------------------------------
1、板子 sudo apt-get install tftp-hpa
2、主机chmod 777 tftp—dir
3、tftp 192.168.1.122 -c put lib2.tar.gz lib2.tar.gz