1 2 | cd / tar cvpjf backup.tar.bz2 --exclude=/proc --exclude=/lost+found --exclude=/backup.tar.bz2 --exclude=/mnt --exclude=/sys / |
制作rootfs.img
1 | git clone https://github.com/friendlyarm/debian_nanopi2 |
在debian_nanopi2目录内新建rootfs目录,将一个已经装好程序的板子里所有文件及目录打包,方法见:
再解压到此rootfs目录,再执行build.sh,它会调用debian_nanopi2/tools/make_ext4fs生成rootfs.img
由于make_ext4fs为32位的,可能系统为64位,则要安装32位支持库:
1 2 3 4 | apt-get install lib32ncurses5 apt-get install lib32z1 apt-get install libstdc++6 apt-get install lib32stdc++6 |
生成rootfs.img后,则可以替换eflasher img里的对应文件,再刷机。详情见:
http://wiki.friendlyarm.com/wiki/index.php/EFlasher/zh
但是,此wiki页面中提供的刷机包有可能存在问题,可以直接下官方百度盘里的刷机包,比如:
https://pan.baidu.com/s/1kVySP6Z/#list/path=%2FFriendlyARM-S5P6818
里面的s5p6818-eflasher-sd8g-20171102-full.img.zip,在Windows里,刷到SD卡后,安全卸载SD卡,再插上,直接把做好的rootfs.img替换SD卡的fat分区里的对应文件就可刷机了。
此方法适用于nanopc t2和nanopc t3。
build_directory_structure: unknown file type on root/dev/adc
1 2 3 | cd rootfs rm -Rf dev/* rm -Rf run/* |
defaultlib 'mfc120.lib' conflicts with use of other libs
project property->Linker->Input->Additional Dependencies,
remove nafxcw.lib
修改interfaces文件重启网络还是启动不了
比如,修改/etc/network/interfaces为这样
1 2 3 4 5 6 | auto eth0 iface eth0 inet static address 192.168.1.38 gateway 192.168.1.1 netmask 255.255.255.0 dns-nameservers 192.168.1.1 |
保存再重启,发现网络还是不通,经测试,是要去掉最后一行
1 | #dns-nameservers 192.168.1.1 |
保存再重启,网络就通了。
opencv 3编译时download失败
编辑OpenCV源码目录下cmake\OpenCVDownload.cmake
找到INACTIVITY_TIMEOUT改大一百倍
找到TIMEOUT改大一百倍
再让cmake编译下载,放一晚上,第二天就成功了。
BUILD_TBB option supports Windows on ARM only
编译OpenCV时,在cmake gui里把BUILD_TBB禁掉就可以了。
CLM-Framework人脸跟踪BOX跟丢了
把
1 | clm_parameters.validate_detections = false; |
这行去掉。
xfce命令行关闭屏保
1 | xset s 0 #关闭屏幕保护 |
还有一种方法就是关掉ubuntu桌面,命令行为:
1 | /etc/init.d/lightdm stop |
ubuntu不能上网的dns问题
不能上网也就不能apt-get,也就不能
apt-get install resolvconf
所以先修改/etc/resolv.conf,加入dns,如:
nameserver 8.8.8.8
再重启网络:
/etc/init.d/networking restart
这样就可以暂时上网了,若现在重启系统,/etc/resolv.conf会被清空的,就又不能上网了。所以现在,马上执行:
apt-get install resolvconf
完成后编辑/etc/resolvconf/resolv.conf.d/base文件,加入如:
nameserver 8.8.8.8
保存并重启系统,会看到可以永久上网了。