2020-05-20 09:56:15 星期四
全志芯片相关的论坛帖
https://whycan.cn/t_3019.html#p25005
f1c100s移植帖
https://whycan.cn/t_3211.html
交叉编译器的安装
# 此处为获取7.2.1版本,您可获取其他版本或者通过链接直接下载
wget http://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/arm-linux-gnueabi/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz
tar -vxJf gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz
sudo cp -r ./gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi /opt/
sudo vim /etc/bash.bashrc
# 在文件末尾 添加以下内容
PATH="$PATH:/opt/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin"
# 添加完毕
# 使路径生效
source /etc/bash.bashrc
#如果使用临时环境变量,执行以下命令即可
export PATH=$PATH:/home/ll/f1c100s/gcc/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin
uboot的编译适配
sudo apt-get install git
git clone https://github.com/Lichee-Pi/u-boot.git
cd u-boot
# 查看分支
git branch -a
# 切换到 Nano 分支
git checkout nano-v2018.01
#或者直接在http 下载
https://github.com/Lichee-Pi/u-boot/tree/nano-v2018.01
配置
# 此处告知make采用arm-linux-gnueabi下的所有交叉编译工具,目标架构为Arm,设定各项默认配置为 nano 的spiflash支持版
1、make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- licheepi_nano_spiflash_defconfig
# 若不带spi-flash的板子,请换成 licheepi_nano_defconfig
这2个默认 的预先设置的配置文件存放在configs目录下
# 进行可视化配置
2、make ARCH=arm menuconfig
开始编译
uboot-2018.05移植GCC报错:gcc is older than 6.0
编译报错 ,需要指定编译器
*** Your GCC is older than 6.0 and is not supported
arch/arm/config.mk:66: recipe for target 'checkgcc6' failed
make: *** [checkgcc6] Error 1
# 开始编译,不能直接make 需要指定编译器,否则会提示gcc版本太老
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j1
uboot编译遇坑
error: command ‘swig’ failed with exit status 1
需要安装swig
apt install swig