在使用Linux外部源代码编译PetaLinux工程时,遇到错误“.kernel-meta/bsp_definition: Directory nonexistent”。执行“petalinux-build -x mrproper -f”清理PetaLinux工程,并且在Linux外部源代码目录执行“make mrproper”清理Linux外部源代码,再次编译PetaLinux工程,也遇到同样错误。
之前为了备份,清理了Linux外部源代码,删除了目录.kernel-meta。
可是第一次使用Linux外部源代码编译PetaLinux工程时,没有目录.kernel-meta,也能编译成功,说明它不是必需的。
在Linux外部源代码下搜索.kernel-meta,发现隐藏文件.metadir里含有.kernel-meta。因此删除隐藏文件.metadir。再次编译PetaLinux工程,成功。再检查Linux外部源代码目录,又有了隐藏文件.metadir和隐藏文件夹.kernel-meta。
错误信息如下:
DEBUG: Executing python function extend_recipe_sysroot NOTE: Direct dependencies are ['/opt/Xilinx/peta/2019.1/components/yocto/source/arm/layers/core/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot'] NOTE: Installed into sysroot: ['kern-tools-native', 'quilt-native'] NOTE: Skipping as already exists in sysroot: [] DEBUG: sed -e 's:^[^/]*/:/home/proj/channel/0914/peta-axidma-loop-0914/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native/:g' /home/proj/channel/0914/peta-axidma-loop-0914/build/tmp/sysroots-components/x86_64/quilt-native/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/home/proj/channel/0914/peta-axidma-loop-0914/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/home/proj/channel/0914/peta-axidma-loop-0914/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native:g' -e 's:FIXME_COMPONENTS_DIR:/home/proj/channel/0914/peta-axidma-loop-0914/build/tmp/sysroots-components:g' -e 's:FIXME_HOSTTOOLS_DIR:/home/proj/channel/0914/peta-axidma-loop-0914/build/tmp/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/home/proj/channel/0914/peta-axidma-loop-0914/build/tmp/pkgdata/plnx-zynq7:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/proj/channel/0914/peta-axidma-loop-0914/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/home/proj/channel/0914/peta-axidma-loop-0914/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/temp/fifo.22340:g' DEBUG: Python function extend_recipe_sysroot finished DEBUG: Executing shell function do_kernel_metadata /home/proj/channel/0914/peta-axidma-loop-0914/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/temp/run.do_kernel_metadata.22340: 219: /home/proj/channel/0914/peta-axidma-loop-0914/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/temp/run.do_kernel_metadata.22340: cannot create /home/proj/channel/0914/peta-axidma-loop-0914/source/linux-kernel/.kernel-meta/bsp_definition: Directory nonexistent /home/proj/channel/0914/peta-axidma-loop-0914/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native/usr/bin/scc: line 395: /home/proj/channel/0914/peta-axidma-loop-0914/source/linux-kernel/.kernel-meta/meta-series: No such file or directory [ERROR]: processing of file /tmp/tmp.MiPEhHQ1nP failed /home/proj/channel/0914/peta-axidma-loop-0914/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native/usr/bin/scc: line 245: /home/proj/channel/0914/peta-axidma-loop-0914/source/linux-kernel/.kernel-meta/meta-series: No such file or directory Context around the error is: See pre-processed file /tmp/tmp.MiPEhHQ1nP for more details ERROR: Could not generate configuration queue for plnx-zynq7. WARNING: exit code 1 from a shell command. ERROR: Function failed: do_kernel_metadata (log file is located at /home/proj/channel/0914/peta-axidma-loop-0914/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19
隐藏文件.metadir和隐藏文件夹.kernel-meta的内容如下:
hankf@hankf-7480:~/proj/channel/0914/peta-axidma-loop-0914/source/linux-kernel$ cat .metadir .kernel-meta hankf@hankf-7480:~/proj/channel/0914/peta-axidma-loop-0914/source/linux-kernel$ cd .kernel-meta/ hankf@hankf-7480:~/proj/channel/0914/peta-axidma-loop-0914/source/linux-kernel/.kernel-meta$ tree . ├── bsp_definition ├── cfg │ └── scratch ├── config.queue ├── configs │ ├── cfg │ │ └── openamp.cfg │ ├── defconfig │ ├── plnx_kernel.cfg │ ├── user_2020-09-15-10-53-00.cfg │ ├── user_2020-09-17-19-07-00.cfg │ ├── user_2020-09-18-11-32-00.cfg │ └── user_2020-09-18-14-13-00.cfg ├── meta-series
测试版本 2019.1