raspberry-pi - 使用 yocto 的树莓派 u-boot 中的额外命令
问题描述
我想使用 yocto 在树莓派 u-boot 中添加自定义命令我可以按照此处提供的答案在使用 make 中添加自定义实施自定义 u-boot 命令
现在我想在树莓派中使用 yocto 添加它。但首先我想在 u-boot 中添加 timer 命令,该命令存在misc.c
于 u-boot 源中,我们只需CONFIG_CMD_TIMER=y
在 defconfig 文件中添加
到目前为止,我尝试了以下设置
- 克隆的小精灵
- 克隆的元树莓派
- 在 local.conf 中启用 u-boot 和 uart
- 创建了一个自定义层(添加的自定义层
bblayers.conf
)来添加命令配置
自定义层中配方的详细信息
- 创建以下目录结构
meta-custom-layer/recipes-bsp/u-boot/
- 创建了一个
.bbappend
包含以下内容的文件
$ cat meta-custom-layer/recipes-bsp/u-boot/u-boot_%.bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}:"
SRC_URI += " file://rpi_3_defconfig.patch;patchdir=${S}/configs "
- 的内容
meta-custom-layer/recipes-bsp/u-boot/
$ ls -l meta-custom-layer/recipes-bsp/u-boot/
drwxr-xr-x 2 bhargav bhargav 4096 May 16 22:04 files
-rw-r--r-- 1 bhargav bhargav 107 May 16 22:04 u-boot_%.bbappend
$ cat meta-custom-layer/recipes-bsp/u-boot/files/rpi_3_defconfig.patch
CONFIG_CMD_TIMER=y
- 在构建 u-boot 时出现以下错误
$ bitbake u-boot
Loading cache: 100% |########################################################################################################################################################################| Time: 0:00:00
Loaded 2875 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "raspberrypi3-64"
DISTRO = "poky"
DISTRO_VERSION = "3.1"
TUNE_FEATURES = "aarch64 cortexa53 crc"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "master:2e11d97b6c95e89aa1f9d3603a966c94c442469e"
meta-raspberrypi = "master:45ee64377bcc511380edf59191abc90c1ddb210e"
meta-shell = "master:81fd3448f603a56409389247443439cad4fdaa67"
meta-oe = "master:679bb4912613f3860e8527557602251e5e5f2c41"
meta-python2 = "master:2684086f91e7074324081196c8a5f9945d39650e"
Initialising tasks: 100% |###################################################################################################################################################################| Time: 0:00:00
Sstate summary: Wanted 16 Found 8 Missed 8 Current 135 (50% match, 94% complete)
NOTE: Executing Tasks
WARNING: u-boot-1_2020.04-r0 do_fetch: Failed to fetch URL file://rpi_3_defconfig.patch;patchdir=/home/bhargav/RPI3/Build/poky/build/tmp/work/raspberrypi3_64-poky-linux/u-boot/1_2020.04-r0/git/configs, attempting MIRRORS if available
ERROR: u-boot-1_2020.04-r0 do_fetch: Fetcher failure: Unable to find file file://rpi_3_defconfig.patch;patchdir=/home/bhargav/RPI3/Build/poky/build/tmp/work/raspberrypi3_64-poky-linux/u-boot/1_2020.04-r0/git/configs anywhere. The paths that were searched were:
/home/bhargav/RPI3/Build/meta-shell/recipes-bsp/u-boot/poky
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot-2020.04/poky
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot/poky
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/files/poky
/home/bhargav/RPI3/Build/meta-shell/recipes-bsp/u-boot/raspberrypi3-64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot-2020.04/raspberrypi3-64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot/raspberrypi3-64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/files/raspberrypi3-64
/home/bhargav/RPI3/Build/meta-shell/recipes-bsp/u-boot/raspberrypi3
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot-2020.04/raspberrypi3
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot/raspberrypi3
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/files/raspberrypi3
/home/bhargav/RPI3/Build/meta-shell/recipes-bsp/u-boot/aarch64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot-2020.04/aarch64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot/aarch64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/files/aarch64
/home/bhargav/RPI3/Build/meta-shell/recipes-bsp/u-boot/rpi
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot-2020.04/rpi
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot/rpi
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/files/rpi
/home/bhargav/RPI3/Build/meta-shell/recipes-bsp/u-boot/aarch64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot-2020.04/aarch64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot/aarch64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/files/aarch64
/home/bhargav/RPI3/Build/meta-shell/recipes-bsp/u-boot/
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot-2020.04/
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot/
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/files/
/home/bhargav/RPI3/Build/poky/build/downloads
ERROR: u-boot-1_2020.04-r0 do_fetch: Fetcher failure for URL: 'file://rpi_3_defconfig.patch;patchdir=/home/bhargav/RPI3/Build/poky/build/tmp/work/raspberrypi3_64-poky-linux/u-boot/1_2020.04-r0/git/configs'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/bhargav/RPI3/Build/poky/build/tmp/work/raspberrypi3_64-poky-linux/u-boot/1_2020.04-r0/temp/log.do_fetch.13694
ERROR: Task (/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot_2020.04.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 592 tasks of which 591 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot_2020.04.bb:do_fetch
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
那么我在这里缺少什么?我正在使用树莓派 3B+ 。
解决方案
FILESEXTRAPATHS_append := "${THISDIR}/files"
推荐阅读
- xml - 使用 XSLT 对 xml 元素内的内容进行编码
- struts2 - 我正在将我的 Java 项目从 Struts 2.3.15 升级到 2.3.34。我应该做哪些改变?
- mongodb - AWS DynamoDB 是否类似于 MongoDB
- javascript - javascript重定向后显示的查询字符串
- cron - 如何在 linux 中自动化 rsync?
- laravel - laravel 包开发并链接到 css/js 文件
- php - 在页面 PHP 中显示数据
- python - Pygame 文本换行符
- c# - ASP.NET Core Identity 2.0 - 将 401 状态代码返回给 ajax 函数
- reactjs - 测试用例在 CI 中失败