当前位置:首页 > 技术 > LINUX > 正文内容

荔枝派licheepi_nano编译uboot记录【转】

Watrt3年前 (2023-08-10)LINUX22800

板子使用我自己重新绘制的f1c100s,开源地址:复刻f1c100s/f1c200sLinux - 嘉立创EDA开源硬件平台

首先完全参照官网给的教程来前言 - Sipeed Wiki

注意选择相应的板子,安装合适的交叉编译器,我之前安装的交叉编译器是4.9版本的,编译过程报错,提示编译器版本过低

参考官网直接下载相应的交叉编译器,然后添加到环境变量中就行。如果arm-linux-gnueabi-gcc -v显示的交叉编译器版本没有改变,可以试试把老编译器的文件夹名字改了,然后把新版本的添加到老文件夹中(我也不知道是否有更好的方法)。

然后编译,报错error: command 'swig' failed: No such file or directory

 直接sudo apt install swig即可

然后又报错/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here

 参考【编译错误】multiple definition of `yylloc`_小勇者的博客-CSDN博客

我是直接改的源码中的变量

然后又又又报错了Error: arch/arm/dts/.suniv-f1c100s-licheepi-nano.dtb.pre.tmp:59.1-10 syntax error
FATAL ERROR: Unable to parse input tree

 参考编译U-Boot DTB 时报错 syntax error; FATAL ERROR: Unable to parse input tree | 柚木鉉の空間 GloomyGhost Blog

把多余的反斜杠删掉即可

然后叕报错/usr/bin/env: “python2”: 没有那个文件或目录

 我是把原系统自带的2.7连接到python2,或者直接

sudo apt install python2-minimal

 然后叒双报错

参考 【问题解决】报错:ImportError: No module named _libfdt_JavonPeng的博客-CSDN博客

然后叕双报错scripts/dtc/pylibfdt/libfdt_wrap.c:168:11: fatal error: Python.h: 没有那个文件或目录
  168 | # include <Python.h>

 参考fatal error: Python.h: 没有那个文件或目录 解决方法_我的狗叫乐乐八岁了的博客-CSDN博客

我安装的

sudo apt install python2-dev

最后经历多波多折后终于编译成功了

 然后下载官方的工具

git clone -b f1c100s-spiflash https://gitee.com/sunnyczh1/sunxi-tools.git

https://gitee.com/sunnyczh1/sunxi-tools.git

编译报错fel_lib.c:26:10: fatal error: libusb.h: 没有那个文件或目录
   26 | #include <libusb.h>
      |          ^~~~~~~~~~
compilation terminated.
make: *** [Makefile:142:sunxi-fel] 错误 1

https://gitee.com/sunnyczh1/sunxi-tools.git

 参考官方安装

sudo apt-get install libusb-1.0-0-dev

 但依旧报错,

看前一句报错,安装pkg-config即可

sudo apt-get install pkg-config
打赏 支付宝打赏 微信打赏

相关文章

使用buildroot构建根文件系统

使用buildroot构建根文件系统

使用buildroot构建根文件系统buildroot可用于构建小型的linux根文件系统。大小最小可低至2M,与内核一起可以放入最小8M的spi flash中。buildroot中可以方便地加入第三方软件包(其实已经内置了很多),省去了手工交叉编译的烦恼。下载安装首先安装一些依赖,比如linux头文件:apt-get install linux-headers-$(uname -r)然后下载安装:wget https://buildroot.org/do...

Deepin Linux修复grub引导

Deepin Linux修复grub引导

环境说明:一直使用的是Win7+Deepin 15.5。后来全新安装了Win 10,需要修复grub第一步:在Windows操作系统下使用深度官方的U盘启动制作器 制作U盘第二步:开机U盘启动进入Deepin linux安装界面,待进入到安装界面选择语言时,按住Crtl+Alt+F2/F1进入Linux tty终端。并执行以下命令完成修复sudo fdisk -l/*根据查询结果确定deepin 的/目录和/boot目录所在的分区编号*/sudo mount&nbs...

Linux没有最小只有更小----迷你Linux版本大集合

Linux没有最小只有更小----迷你Linux版本大集合

    自从去年到现在已经收集了上百种版本的Linux和Unix,至于Unix就不想说了,没有Linux的功底是很难驾驭Unix的,我在这里只把小于360M的Linux以及一些非Linux但是很像Linux的版本也发布一下,我本人喜欢安静,如果你想要这些迷你版本的Linux光盘的话,建议去官网下载就OK了。英语不行的话随时带个字典。有些没有桌面,想知道哪些没有桌面的话请自己网上查资料!下面就是绝大部分小于361M的Linux及其非Linux名单,参考时间为...

 Debian 9.9 (stretch) 文件系统制作

Debian 9.9 (stretch) 文件系统制作

0. 准备工作:sudo apt install qemu-user-static -y sudo apt install debootstrap -y mkdir rootfs1. debootstrapdebootstrap --foreign --verbose --arch=armhf  stretch rootfs http...

debootstrap报"Release signed by unknown key"错误的解决方法

debootstrap报"Release signed by unknown key"错误的解决方法

1、下载最新的ASC文件:wget https://ftp-master.debian.org/keys/release-11.asc -qO- | gpg --import --no-default-keyring --keyring ./debian-release-11.gpg注意这里的11对应debian的版本号。我这里是debian11 (bullseye)2、debootstrap指定asc文件sudo&...

老是提示:newer kernel available 解决方法

老是提示:newer kernel available 解决方法

这个是由于没有正确的安装内核造成的。可以直接关掉提示 sudo apt purge needrestart...

Configure & Build

Configure & Build

Configure and build Linux kernel for Surface RTEditing kernel build configurationFirst run the command make ARCH=arm tegra_defconfigThis will create a standard kernel config for tegra SoC's.Open the file .config in the kernel source directory wit...

f1c100s编译启动所需的uboot,kernel,rootfs

f1c100s编译启动所需的uboot,kernel,rootfs

 https://github.com/Icenowy/linux.git 有f1c100s-480272lcd-test和f1c100s分支, 然后自己手动修复一个 USB 问题,驱动就比较全了https://github.com/Lichee-Pi/linux.git 有nano-4.14-exp和nano-5.2-flash分支,用哪个合适个人画了块没有连接任何其他模块的F1C100S开发板,没有链接任何外设,本文是编译所有启动所需的三大件。(只要编...