页次: 1
5 编译根文件系统
5.1 安装依赖
apt-get install linux-headers-$(uname -r)
5.2 使用buildroot编译根文件系统
(1)获取buildroot源码
wget https://buildroot.org/downloads/buildroot-2017.08.tar.gz
tar xvf buildroot-2017.08.tar.gz
cd buildroot-2017.08/
(2) 配置bulidroot
make menuconfig
-----------------------------------------------
Target options --->
Target Architecture Variant (arm926t) ---> // arm926ejs架构
Enable VFP extension support // Nano 没有 VFP单元,勾选会导致某些应用无法运行
Target ABI (EABI) --->
Floating point strategy (Soft float) ---> // 软浮点
(2)下载依赖工具包
https://pan.baidu.com/s/1_tBdX9K7fOkH9JdXZ_MdiQ
下载完之后,解压后复制到"buildroot-2017.08/dl/"下,没有dl文件夹可自行创建。也可以不下载此工具包,但是buildroot自动更具需求下载这些工具包也许很慢。
(3)编译
make
-----------------------------------------------
出现错误:
make[2]: g++: Command not found
安装G++工具:
sudo apt-get install g++
-----------------------------------------------
继续编译:
编译成功!
-----------------------------------------------(4)查看rootfs文件的大小
ls -l output/images/rootfs.tar
你好,我跟着你的教程做到这一步,发现编译出来的根文件系统有98M之大! flash总共才16M,这应该是不对的吧,你编译出来的文件大小多少?
-rw-r--r-- 1 yws yws 98129920 1月 15 10:03 buildroot/buildroot-2017.08/output/images/rootfs.tar
yws@win10 MINGW64 /g/project/flc100s/tools/sunxi-tools-win32support_f1c100s_v3s_201812219/F1C100s
$ ./sunxi-fel.exe -p spiflash-write 0x0 ../../Nano_flash_800480/Nano_flash_800480.bin
100% [================================================] 16777 kB, 91.2 kB/s
显示下载成功了,但接上串口并没有出来任何东西,为什么呢,烧的是百度网盘的Nano_flash_800480.bin
我把芯片吹下来,重新吹了片新的上去,竟然认到设备了!
不过奇怪的是sid读不到
yws@win10 MINGW64 /g/project/flc100s/tools/sunxi-tools-win32support_f1c100s_v3s_201812219/F1C100s
$ ./sunxi-fel.exe sid
SID registers for your SoC (F1C100s) are unknown or inaccessible.
yws@win10 MINGW64 /g/project/flc100s/tools/sunxi-tools-win32support_f1c100s_v3s_201812219/F1C100s
$ ./sunxi-fel.exe ver
AWUSBFEX soc=00001663(F1C100s) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000
yws@win10 MINGW64 /g/project/flc100s/tools/sunxi-tools-win32support_f1c100s_v3s_201812219/F1C100s
$ ./sunxi-fel.exe spiflash-info
Manufacturer: Winbond (EFh), model: 40h, size: 16777216 bytes.
页次: 1