AMD PetaLinux 2022.1中部分语法改变,不支持IMAGE_CLASSES_remove、IMAGE_FSTYPES_DEBUGFS_remove、PREMIRRORS_prepend

付汉杰 hankf@amd.com

最新的AMD PetaLinux 2022.1,不支持IMAGE_CLASSES_remove、IMAGE_FSTYPES_DEBUGFS_remove、PREMIRRORS_prepend。如果有上述关键词,会报告类似下面的错误。

hankf@XSZGS4:vck190-221-bsp-peta$ petalinux-build 
[INFO] Sourcing buildtools
[INFO] Building project
[INFO] Sourcing build environment
[INFO] Generating workspace directory
ERROR: Failed to create workspace directory
ERROR: Failed to build project. Check the /home/hankf/proj/vck190/v221/vck190-221-bsp-peta/build/build.log file for more details...

检查build/build.log,得到更详细的错误信息:

You can now run 'bitbake <target>'
Common targets are:
    core-image-minimal
    core-image-full-cmdline
    core-image-sato
    core-image-weston
    meta-toolchain
    meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86-64'.

Other commonly useful commands are:
 - 'devtool' and 'recipetool' handle common recipe tasks
 - 'bitbake-layers' handles common layer tasks
 - 'oe-pkgdata-util' handles common target package tasks

[INFO] Generating workspace directory
NOTE: Starting bitbake server...
ERROR: Variable IMAGE_CLASSES_remove contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake.
ERROR: Variable IMAGE_CLASSES_remove contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake.
ERROR: Failed to build project. Check the /home/hankf/proj/vck190/v221/vck190-221-bsp-peta/build/build.log file for more details...

对于IMAGE_CLASSES_remove,可以使用IMAGE_FSTYPES:remove替代。
对于IMAGE_FSTYPES_DEBUGFS_remove,可以使用IMAGE_FSTYPES_DEBUGFS:remove替代。

下面是2022.1之前的设置,去掉一些不用的文件系统映像。

IMAGE_FSTYPES_remove = " .bin tar.gz tar.bz2 ext4 ext4.gx ext4.gz ext3 ext3.bz2 jffs2 cpio.bz2 cpio.xz cpio.lzma cpio.lz4"
IMAGE_FSTYPES_DEBUGFS_remove = " .bin tar.gz tar.bz2 ext4 ext4.gx ext4.gz ext3 ext3.bz2 jffs2 cpio.bz2 cpio.xz cpio.lzma cpio.lz4"

上述设置,在PetaLinux 2022.1中,可以更改为如下:

IMAGE_FSTYPES:remove = " .bin tar.gz tar.bz2 ext4 ext4.gx ext4.gz ext3 ext3.bz2 jffs2 cpio.bz2 cpio.xz cpio.lzma cpio.lz4"
IMAGE_FSTYPES_DEBUGFS:remove = " .bin tar.gz tar.bz2 ext4 ext4.gx ext4.gz ext3 ext3.bz2 jffs2 cpio.bz2 cpio.xz cpio.lzma cpio.lz4"

对于AR71198中推荐的额外下载链接设置PREMIRRORS_prepend,也不能再使用。

PREMIRRORS_prepend = " \
 git://.*/.* file:///opt/Xilinx/peta/downloads/   \
 ftp://.*/.* file:///opt/Xilinx/peta/downloads/    \
 http://.*/.* file:///opt/Xilinx/peta/downloads/   \
 https://.*/.*  file:///opt/Xilinx/peta/downloads/ \
 git://.*/.* file:///opt/Xilinx/peta/2022.1/downloads/   \
 ftp://.*/.* file:///opt/Xilinx/peta/2022.1/downloads/    \
 http://.*/.* file:///opt/Xilinx/peta/2022.1/downloads/   \
 https://.*/.*  file:///opt/Xilinx/peta/2022.1/downloads/ \
 "

还是可以继续使用DL_DIR。

DL_DIR ?= "/opt/Xilinx/peta/2022.1/downloads"
posted @ 2022-08-22 16:23  HankFu  阅读(461)  评论(0编辑  收藏  举报