tegra-minimal-initramfs.bb 是否有任何补丁可以防止此错误?

如何解决tegra-minimal-initramfs.bb 是否有任何补丁可以防止此错误?

我试图按照此链接的说明为 Jetson TX2 构建 core-image-minimal https://developer.ridgerun.com/wiki/index.php?title=Yocto_Support_for_NVIDIA_Jetson_Platforms-Old。 我的构建配置是

Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "jetson-tx2"
DISTRO               = "poky"
DISTRO_VERSION       = "3.1.5"
TUNE_FEATURES        = "aarch64 armv8a crc"
TARGET_FPU           = ""
meta-tegra           = "dunfell-l4t-r32.4.3:3b4df1ac05e9f96e0363630c036f5445800af435"
meta                 
meta-poky            
meta-yocto-bsp       = "dunfell:6e89d668246fb37b2217aae7ae57390e793696d8"

但是我遇到了与 tegra-minimal-initramfs 配方相关的错误。

WARNING: tegra-minimal-initramfs-1.0-r0 do_image_complete: KeyError in .
ERROR: tegra-minimal-initramfs-1.0-r0 do_image_complete: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated',lineno: 2,function: <module>
     0001:
 *** 0002:sstate_report_unihash(d)
     0003:
File: '/home/pc_1175/yocto-tegra/poky-dunfell/meta/classes/sstate.bbclass',lineno: 844,function: sstate_report_unihash
     0840:    report_unihash = getattr(bb.parse.siggen,'report_unihash',None)
     0841:
     0842:    if report_unihash:
     0843:        ss = sstate_state_fromvars(d)
 *** 0844:        report_unihash(os.getcwd(),ss['task'],d)
     0845:}
     0846:
     0847:#
     0848:# Shell function to decompress and prepare a package for installation
File: '/home/pc_1175/yocto-tegra/poky-dunfell/bitbake/lib/bb/siggen.py',lineno: 555,function: report_unihash
     0551:
     0552:            if "." in self.method:
     0553:                (module,method) = self.method.rsplit('.',1)
     0554:                locs['method'] = getattr(importlib.import_module(module),method)
 *** 0555:                outhash = bb.utils.better_eval('method(path,sigfile,task,d)',locs)
     0556:            else:
     0557:                outhash = bb.utils.better_eval(self.method + '(path,locs)
     0558:
     0559:            try:
File: '/home/pc_1175/yocto-tegra/poky-dunfell/bitbake/lib/bb/utils.py',lineno: 420,function: better_eval
     0416:    if extraglobals:
     0417:        ctx = copy.copy(ctx)
     0418:        for g in extraglobals:
     0419:            ctx[g] = extraglobals[g]
 *** 0420:    return eval(source,ctx,locals)
     0421:
     0422:@contextmanager
     0423:def fileslocked(files):
     0424:    """Context manager for locking and unlocking file locks."""
File: '<string>',lineno: 1,function: <module>
  File "<string>",line 1,in <module>

File: '/home/pc_1175/yocto-tegra/poky-dunfell/meta/lib/oe/sstatesig.py',lineno: 593,function: OEOuthashBasic
     0589:
     0590:                update_hash("\n")
     0591:
     0592:            # Process this directory and all its child files
 *** 0593:            process(root)
     0594:            for f in files:
     0595:                if f == 'fixmepath':
     0596:                    continue
     0597:                process(os.path.join(root,f))
File: '/home/pc_1175/yocto-tegra/poky-dunfell/meta/lib/oe/sstatesig.py',lineno: 553,function: process
     0549:                    add_perm(stat.S_IXOTH,'x')
     0550:
     0551:                if include_owners:
     0552:                    try:
 *** 0553:                        update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name)
     0554:                        update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name)
     0555:                    except KeyError:
     0556:                        bb.warn("KeyError in %s" % path)
     0557:                        raise
Exception: KeyError: 'getpwuid(): uid not found: 1000'

ERROR: Logfile of failure stored in: /home/pc_1175/yocto-tegra/build/tmp/work/jetson_tx2-poky-linux/tegra-minimal-initramfs/1.0-r0/temp/log.do_image_complete.23961
ERROR: Task (/home/pc_1175/yocto-tegra/meta-tegra/recipes-core/images/tegra-minimal-initramfs.bb:do_image_complete) failed with exit code '1'

问题是我之前使用相同的包构建了相同的映像,但没有出现此错误。 当我将 TEGRA_INITRAMFS_INITRD = "0" 添加到 local.conf 文件时,我没有收到此错误,但我想知道它是否会影响我的系统。

解决方法

TLDR; 只需使用 bitbake -c cleansstate tegra-minimal-initramfsbitbake -c cleansstate core-image-minimal 清理图像配方工作目录,以防万一。比构建应该有效,但它可能无法重现。也就是说,也许您每次都必须在构建映像(cleansstatetegra-minimal-initramfs)之前调用这两个 core-image-minimal 命令。

将我的项目(未与 Tegra 连接)迁移到 Yocto 3.2 时,我遇到了同样的问题。问题出在 pseudo 上 - 它是一个 fakeroot 工具,在 Yocto 中用于生成具有正确文件权限的 rootfs(您以普通用户身份运行 bitbake,而不是 root,但获得所有 rootfs属于 root 的文件)。这是 bug 我随补丁一起发布的内容。

但正如我所见,您使用的是 Yocto 3.1.5,所以您的问题有所不同。核心原因是在某些包构建期间(被TEGRA_INITRAMFS_INITRD = "0"排除的那个)pseudo记得,某些文件应该属于用户1000,但是在构建 tegra-minimal-initramfs(initramfs 的生成)期间,在 initramfs 本身中找不到用户 1000...因为只有 root 和一些基本的 Linux 用户。

对于您的问题,如果您离开 TEGRA_INITRAMFS_INITRD = "0",可能会发生任何事情。可能Here 是应用此变量的地方。它在 U-Boot 构建期间使用,看起来它完全关闭了 initramfs 的使用。因此,使用 TEGRA_INITRAMFS_INITRD = "0",您的最终图像将不包含 initramfs 文件。如果设备有一些后备机制可以在没有 initramfs 的情况下启动,看起来你没问题。如果没有 - 尝试 cleansstate

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-