页次: 1
实验失败, ubuntu14
从这里下的虚拟机. https://d1.docs.aw-ol.com/study/study_3ubuntu/
allwinner@allwinner-VirtualBox:~$ sudo cp repo/repo /usr/bin/repo
allwinner@allwinner-VirtualBox:~$ chmod 777 /usr/bin/repo
chmod: changing permissions of ‘/usr/bin/repo’: Operation not permitted
allwinner@allwinner-VirtualBox:~$ sudo chmod 777 /usr/bin/repo
allwinner@allwinner-VirtualBox:~$ repo
The program 'repo' is currently not installed. You can install it by typing:
sudo apt-get install phablet-tools
allwinner@allwinner-VirtualBox:~$ repo init
The program 'repo' is currently not installed. You can install it by typing:
sudo apt-get install phablet-tools
allwinner@allwinner-VirtualBox:~$
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
编译报错: 搜了搜也没看懂该怎么解决, 大神帮帮忙
make[2]: *** [build/genchecksum.o] Error 1
/home/username/f1c100s/buildroot/buildroot-2017.08/output/host/arm-buildroot-linux-uclibcgnueabi/bin/as: unrecognized option '--64'
Makefile:2497: recipe for target 'build/genconstants.o' failed
make[2]: *** [build/genconstants.o] Error 1
/home/username/f1c100s/buildroot/buildroot-2017.08/output/host/arm-buildroot-linux-uclibcgnueabi/bin/as: unrecognized option '--64'
Makefile:2497: recipe for target 'build/gengenrtl.o' failed
make[2]: *** [build/gengenrtl.o] Error 1
/home/username/f1c100s/buildroot/buildroot-2017.08/output/host/arm-buildroot-linux-uclibcgnueabi/bin/as: unrecognized option '--64'
Makefile:2497: recipe for target 'build/genhooks.o' failed
make[2]: *** [build/genhooks.o] Error 1
make[2]: Leaving directory '/home/username/f1c100s/buildroot/buildroot-2017.08/output/build/host-gcc-initial-6.4.0/build/gcc'
Makefile:4113: recipe for target 'all-gcc' failed
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory '/home/username/f1c100s/buildroot/buildroot-2017.08/output/build/host-gcc-initial-6.4.0/build'
package/pkg-generic.mk:227: recipe for target '/home/username/f1c100s/buildroot/buildroot-2017.08/output/build/host-gcc-initial-6.4.0/.stamp_built' failed
make: *** [/home/username/f1c100s/buildroot/buildroot-2017.08/output/build/host-gcc-initial-6.4.0/.stamp_built] Error 2
ghosoft 说:raspberryman 说:usb插入电脑,显示要安装驱动程序,就说明板子正常。
不需要前置固件,里面开机固化的ROM与电脑USB通讯可以完成烧写。
现在情况是连上电脑一点反应没有,
晶振起振了24MHz
ID脚是悬空的
复位C104+R103
还有什么地方要检查
能不能是供电不行? 我几路都是1117出的检查VAR 的电阻 是不是200K
破案了, 是这个问题, 用的10K的, 拆了就启动了
然后用FEL把镜像烧进了SPI FLASH, 启动时候报无法识别错误
CPU: Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM: 32 MiB
Using default environment
Setting up a 800x480 lcd console (overscan 0x0)
In: serial@1c25000
Out: serial@1c25000
Err: serial@1c25000
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 2 1 0
SF: unrecognized JEDEC id bytes: ef, 70, 18
Failed to initialize SPI flash at 0:0 (error -2)
No SPI flash selected. Please run `sf probe'
No SPI flash selected. Please run `sf probe'
=>
SPI FLASH还有厂家限制么?
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
编译根文件系统时候遇到问题了, 没想好怎么解决, 因为apt安装不了4.12版本的linux-header, 我是在ubuntu18.04的虚拟机中尝试编译的
zt@ubuntu:~/buildroot$ make
>>> linux-headers custom Installing to staging directory
(cd /home/zt/buildroot/output/build/linux-headers-custom; PATH="/home/zt/buildroot/output/host/bin:/home/zt/buildroot/output/host/sbin:/home/zt/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/zt/crosstool-ng:/home/zt/LicheePi/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin" /usr/bin/make -j5 ARCH=arm HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" HOSTCXX="/usr/bin/g++" INSTALL_HDR_PATH=/home/zt/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr headers_install)
make[1]: Entering directory '/home/zt/buildroot/output/build/linux-headers-custom'
make[1]: Leaving directory '/home/zt/buildroot/output/build/linux-headers-custom'
if ! support/scripts/check-kernel-headers.sh /home/zt/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot 4.12; then exit 1; fi
Incorrect selection of kernel headers: expected 4.12.x, got 4.19.x
package/pkg-generic.mk:266: recipe for target '/home/zt/buildroot/output/build/linux-headers-custom/.stamp_staging_installed' failed
make: *** [/home/zt/buildroot/output/build/linux-headers-custom/.stamp_staging_installed] Error 1
页次: 1