bitbake/wic 制作 squashfs 文件系统时出错

bitbake/wic error when making squashfs file systems

当我在 wic kickstart 文件(.wks 文件)中指定 squashfs 文件系统类型时:

part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=ext4 --label bootfs   --uuid 69AE36A5-1C24-412C-89F4-5E8D9123376C --fixed-size 32M
part       --source bootimg-partition --ondisk mmcblk0 --fstype=ext4 --label bootfs_2 --uuid AD4023AC-6F63-4598-A32B-7B7864BA6796 --fixed-size 32M
part / --source rootfs --ondisk mmcblk0 --fstype=squashfs --uuid 3C51A271-215E-49B7-824F-4CF56F8BEE0D --fixed-size 176M
part   --source rootfs --ondisk mmcblk0 --fstype=squashfs --uuid 8B9C88D2-3CC6-4B2E-A8A0-20AEF87D06DA --fixed-size 176M
part --ondisk mmcblk0 --fstype=ext4 --label fdb --uuid 6D7EEEDA-CD5E-4A8F-94DC-8670DDF887FA --fixed-size 8M

bootloader --ptable gpt

bitbake 结束时出现以下错误:

DEBUG: Python function extend_recipe_sysroot finished
DEBUG: Executing shell function do_image_wic
INFO: Creating image(s)...

ERROR: A native program mksquashfs required to build the image was not found (see details above).

Please make sure wic-tools have squashfs-tools-native in its DEPENDS, build it with 'bitbake wic-tools' and try again.

如何指定依赖关系?

可以使用 WKS_FILE_DEPENDS 变量将依赖项放入机器配置文件中。例如:

[...]
WKS_FILE = "my_wic_conf.wks"
WKS_FILE_DEPENDS += "squashfs-tools-native"