Yocto-未能建立hddimg。错误:do_bootimg [英] Yocto - failed to buid hddimg. Error: do_bootimg
本文介绍了Yocto-未能建立hddimg。错误:do_bootimg的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在开发Yocto,dunfall,正在尝试为通用x86-64计算机构建.hddimg映像。Iinherit image-live
,将hhdimg
添加到IMAGE_FSTYPES
,iso
、wic
和...但是当我添加hddimg
时,我收到以下错误:
ERROR: test-image-1.0-r0 do_bootimg: /path/build/tmp/work/genericx86_64-poky-linux/test-image/1.0-r0/test-image-1.0/hddimg/rootfs.img rootfs size is greather than or equal to 4GB,
ERROR: test-image-1.0-r0 do_bootimg: and this doesn't work on a FAT filesystem. You can either:
ERROR: test-image-1.0-r0 do_bootimg: 1) Reduce the size of rootfs.img, or,
ERROR: test-image-1.0-r0 do_bootimg: 2) Use wic, vmdk or vdi instead of hddimg
ERROR: test-image-1.0-r0 do_bootimg: 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:do_bootimg(d)
0003:
File: '/path/layers/poky/meta/classes/image-live.bbclass', lineno: 257, function: do_bootimg
0253: if d.getVar("PCBIOS") == "1":
0254: bb.build.exec_func('build_syslinux_cfg', d)
0255: if d.getVar("EFI") == "1":
0256: bb.build.exec_func('build_efi_cfg', d)
*** 0257: bb.build.exec_func('build_hddimg', d)
0258: bb.build.exec_func('build_iso', d)
0259: bb.build.exec_func('create_symlinks', d)
0260:}
0261:do_bootimg[subimages] = "hddimg iso"
File: '/path/layers/poky/bitbake/lib/bb/build.py', lineno: 251, function: exec_func
0247: with bb.utils.fileslocked(lockfiles):
0248: if ispython:
0249: exec_func_python(func, d, runfile, cwd=adir)
0250: else:
*** 0251: exec_func_shell(func, d, runfile, cwd=adir)
0252:
0253: try:
0254: curcwd = os.getcwd()
0255: except:
File: '/path/layers/poky/bitbake/lib/bb/build.py', lineno: 452, function: exec_func_shell
0448: with open(fifopath, 'r+b', buffering=0) as fifo:
0449: try:
0450: bb.debug(2, "Executing shell function %s" % func)
0451: with open(os.devnull, 'r+') as stdin, logfile:
*** 0452: bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)])
0453: finally:
0454: os.unlink(fifopath)
0455:
0456: bb.debug(2, "Shell function %s finished" % func)
File: '/path/layers/poky/bitbake/lib/bb/process.py', lineno: 182, function: run
0178: if not stderr is None:
0179: stderr = stderr.decode("utf-8")
0180:
0181: if pipe.returncode != 0:
*** 0182: raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
0183: return stdout, stderr
Exception: bb.process.ExecutionError: Execution of '/path/build/tmp/work/genericx86_64-poky-linux/test-image/1.0-r0/temp/run.build_hddimg.18514' failed with exit code 1:
WARNING: exit code 1 from a shell command.
ERROR: Logfile of failure stored in: /path/build/tmp/work/genericx86_64-poky-linux/test-image/1.0-r0/temp/log.do_bootimg.18514
ERROR: Task (/path/layers/meta-ammsc2/recipes-core/images/test-image.bb:do_bootimg) failed with exit code '1'```
推荐答案
test-image
的根文件系统大于4 GB,这是FAT
分区的最大文件系统大小(.hddimg
映像类型使用的默认大小)。
该错误已包含两个解决方案:
- 通过删除包来减小映像大小
- 使用
wic
格式(vmdk
和vdi
用于虚拟机引擎)
wic
格式,只需将wic
添加到IMAGE_FSTYPES
,Yocto将构建一个.wic
镜像并将其放置在deploy/images
目录中。您可以使用dd
或bmaptool
将其刷新到您的磁盘,然后启动它。
这些镜像是从WKS_FILE
指定的模板构建的,对于genericx86-64
计算机,该模板默认为genericx86.wks.in
。此默认模板创建分区表并安装EFI引导加载程序(GRUB)。
如果要手动生成wic
图像或修改模板,请查看Creating Partitioned Images Using Wic的文档。
这篇关于Yocto-未能建立hddimg。错误:do_bootimg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文