如何在Yocto中安装文件 /启动?
我需要将文件添加到由YOCTO构建产生的 /启动目录中。我已经创建了一个试图做到这一点的食谱:
SRCREV = "48cabcbc64484ca6c201746e526a11b4b43eb359"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-uEnv.patch file://0002-disable-boot-interrupt.patch file://uEnv.txt"
FILES_${PN} += "/boot/uEnv.txt"
do_install_append() {
install -m 0744 ${WORKDIR}/uEnv.txt ${D}/${base_prefex}/boot
}
此食谱也对U-Boot进行了一些修补,但是目前,我只是对试图将UENV.TXT的零件感兴趣。我知道正在处理此食谱。例如,如果我重命名uenv.txt文件,则会引发错误。所以我知道它正在尝试安装它。但是,当我检查Yocto创建的rootf时,文件丢失了。
有人知道我在做什么错吗?也许问题在于$ {d}/$ {base_prefex}/boot
,而我只是没有把它放在正确的位置?不过,我尝试将其放在其他地方,例如$ {D} $ {sysconfdir}/
而没有成功。
I need to add a file to the /boot directory produced by a yocto build. I've created a recipe that is trying to do this:
SRCREV = "48cabcbc64484ca6c201746e526a11b4b43eb359"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-uEnv.patch file://0002-disable-boot-interrupt.patch file://uEnv.txt"
FILES_${PN} += "/boot/uEnv.txt"
do_install_append() {
install -m 0744 ${WORKDIR}/uEnv.txt ${D}/${base_prefex}/boot
}
This recipe does some patching of u-boot too, but for now I'm just interested in the parts that are trying to add uEnv.txt to the boot directory. I know this recipe is being processed. If I rename the uEnv.txt file, for example, it throws an error. So I know it's trying to install it. But when I examine the rootfs created by yocto, the file is missing.
Does anyone know what I'm doing wrong? Maybe the problem is with ${D}/${base_prefex}/boot
and I'm just not putting it in the right place? I've tried putting it in other places, though, like ${D}${sysconfdir}/
without success.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下是您可以尝试的一些想法:
u-boot
已经有一个可以与Env文件一起使用的变量(CheckPoky/Meta/Meta/Compeces-BSP/U-Boot/u-Boot/u-Boot.inc.inc.inc.inc
)它检查是否存在
uboot_env
变量,并且将其复制到/boot
:我假设您的食谱是一个
bbappend
uboot
因为它具有补丁。因此,您可以尝试以下操作:
如果您的UBOOT试图从rootfs/boot中获取
uenv.txt
文件,则还可以考虑更多注意事项,但是如果它试图从boot
分区(如果有),则应将其添加到该分区中(在计算机conf或本地conf中):Here are some idea that you can try:
u-boot
already have a variable to work with Env files (Checkpoky/meta/recipes-bsp/u-boot/u-boot.inc
)It checks for
UBOOT_ENV
variable if it is present and it copies it to/boot
:I assume that your recipe is a
bbappend
foruboot
because it has a patch.So you can try the following:
More more note to be considered, if your Uboot is trying to fetch the
uEnv.txt
file from rootfs/boot then it is okay, but if it trying to get it from theboot
partition (if you have one) then you should add it to that partition with (In your machine conf or local conf):