提高PetaLinux的编译速度,暨整合Open Source U-Boot/Linux编译 -- PetaLinux 2021/2022版本

总结

通过使用本地文件、Open Source U-Boot/Linux编译,既能适应部分开发人员的工作习惯,也能提高U-Boot/Linux的编译速度。

嵌入式系统Linux开发主要包括U-Boot、Linux内核、设备树(device tree)、文件系统(rootfs)。可以使用PetaLinux的编译设备树和文件系统,使用Open Source流程编译U-Boot/Linux,达到最佳效果。

作者

Hank FU 付汉杰 hankf@amd.com

概述

PetaLinux是Xilinx基于Yocto推出的Linux开发工具,可以一键编译出一个完整的嵌入式Linux发行版,包括上百万源代码文件,数千个应用程序。但是完整的一次PetaLinux/Yocto编译,可能需要从网络下载上GB的文件,可能需要几十分钟。即使只更改一行代码,也需要数分钟时间。

如果在调试单板时,仅仅改动一行代码,也需要执行这些操作,显得冗余,也影响开发效率。

为了适应开发人员的工作习惯,也为了提高速度,可以使用本地文件编译,还可以可以整合OpenSource U-Boot/Linux编译。

3年前,我写了整合Xilinx PetaLinux工程编译和Open Source U-Boot/Linux编译。相比3年前,PetaLinux已经做了很多更新。因此基于PetaLinux 2021/2022版本更新,以提供更准确的办法。另外,本文中提供了完整的脚本,从PetaLinux工程自动获取U-Boot/Linux源代码,以及从PetaLinux工程目录以Open Source流程编译U-Boot/Linux并更新PetaLinux工程的BOOT.BIN、image、image.ub。

PetaLinux的安装

对于PetaLinux的安装,请参考Xilinx文档UG1144 PetaLinux Tools Reference Guide,和 一键离线安装PetaLinux依赖包

提高PetaLinux的编译速度

使用本地SState cache

在Xilinx下载网站嵌入式工具下载区 下载sstate cache。目前SState cache已经分为Arm64(AArch64), Arm, mbfull, mblite四个文件。2021.1版的AArch64 sstate cache的大小是11.84 GB,Arm sstate cache的大小是5.09 GB。下载前,需要注册Xilinx网站的帐号。登录后,选择aarch64 sstate-cache等,从类似于sstate_aarch64_2022.2_10071807.tar.gz 的地址下载SState cache文件。

下载后解压,以AArch64为例,可以看到类似下面的目录结构。

hankf@XSZGS4:aarch64$ ls 
00  06  0c  12  18  1e  24  2a  30  36  3c  42  48  4e  54  5a  60  66  6c  72  78  7e  84  8a  90  96  9c  a2  a8  ae  b4  ba  c0  c6  cc  d2  d8  de  e4  ea  f0  f6  fc
01  07  0d  13  19  1f  25  2b  31  37  3d  43  49  4f  55  5b  61  67  6d  73  79  7f  85  8b  91  97  9d  a3  a9  af  b5  bb  c1  c7  cd  d3  d9  df  e5  eb  f1  f7  fd
02  08  0e  14  1a  20  26  2c  32  38  3e  44  4a  50  56  5c  62  68  6e  74  7a  80  86  8c  92  98  9e  a4  aa  b0  b6  bc  c2  c8  ce  d4  da  e0  e6  ec  f2  f8  fe
03  09  0f  15  1b  21  27  2d  33  39  3f  45  4b  51  57  5d  63  69  6f  75  7b  81  87  8d  93  99  9f  a5  ab  b1  b7  bd  c3  c9  cf  d5  db  e1  e7  ed  f3  f9  ff
04  0a  10  16  1c  22  28  2e  34  3a  40  46  4c  52  58  5e  64  6a  70  76  7c  82  88  8e  94  9a  a0  a6  ac  b2  b8  be  c4  ca  d0  d6  dc  e2  e8  ee  f4  fa  universal
05  0b  11  17  1d  23  29  2f  35  3b  41  47  4d  53  59  5f  65  6b  71  77  7d  83  89  8f  95  9b  a1  a7  ad  b3  b9  bf  c5  cb  d1  d7  dd  e3  e9  ef  f5  fb

在PetaLinux工程目录下执行命令petalinux-config,在菜单Yocto Settings->Local sstate feeds settings->local sstate feeds url设置本地SState cache的目录。

local sstate feeds

本地SState cache设置界面

对于MPSoC,使用aarch64,比如/opt/Xilinx/peta/2021.1/sstate/aarch64。对于Zynq-7000,使用arm,比如/opt/Xilinx/peta/2021.1/sstate/arm。设置后,文件project-spec/configs/config会包含指定的目录,比如下行:

CONFIG_YOCTO_LOCAL_SSTATE_FEEDS_URL="/opt/Xilinx/peta/2021.1/sstate/aarch64"

对于sstate的使用,可以参考Xilinx下载网站嵌入式工具下载区的README for state-cache

使用本地Downloads文件包

在Xilinx下载网站嵌入式工具下载区 下载 Downloads文件包. 2021.1的Downloads文件包有39.75GB。

Downloads文件包里,还有很多常用软件的压缩包。下载后解压,可以看到类似下面的目录结构。

hankf@XSZGS4:downloads$ ls
acl-2.2.53.tar.gz                    git2_github.com.tpm2-software.tpm2-tss-engine.git.tar.gz           libxml2-2.9.10.tar.gz
acpica-unix-20200717.tar.gz          git2_github.com.troglobit.sysklogd.git.tar.gz                      libXmu-1.1.3.tar.bz2
adwaita-icon-theme-3.36.1.tar.xz     git2_github.com.ucb-bar.berkeley-softfloat-3.git.tar.gz            libXrandr-1.5.2.tar.bz2
alsa-lib-1.2.3.2.tar.bz2             git2_github.com.uclouvain.openjpeg.git.tar.gz                      libXrender-0.9.10.tar.bz2
alsa-plugins-1.2.2.tar.bz2           git2_github.com.vim.vim.git.tar.gz                                 libXres-1.2.0.tar.bz2
alsa-tools-1.2.2.tar.bz2                                              
......

在petalinux-config的配置菜单" -> Yocto Settings -> Add pre-mirror url "里,输入上述文件所在的目录“file://path/downloads”。

重用下载文件

PetaLinux在编译过程中下载所需要的文件。编译结束后,目录“build/downloads”下可能含有额外下载的文件。如果来源是上述的本地downloads,那么只是文件链接。如果是从网络下载,那么就是真实的文件。可以使用命令“ls -l | grep -v ">" | grep -v done”排除链接和后缀为done的标志文件,从而只显示从网络下载的文件。

建议把真实的文件件拷贝到上述的本地downloads目录。以后编译PetaLinux工程,可以重用本地的这些文件。后续的编译,就不会从网络下载,速度会更快。

$ ls build/downloads/*.xz
build/downloads/atk-2.28.1.tar.xz                    build/downloads/grep-3.1.tar.xz                build/downloads/netbase_5.4.tar.xz
build/downloads/at-spi2-atk-2.26.2.tar.xz            build/downloads/gst-rtsp-server-1.14.4.tar.xz  build/downloads/ofono-1.24.tar.xz
build/downloads/at-spi2-core-2.28.0.tar.xz           build/downloads/gtk+-2.24.32.tar.xz            build/downloads/pango-1.42.4.tar.xz
... ...

$ ls build/downloads/*.bz2
build/downloads/alsa-lib-1.1.6.tar.bz2         build/downloads/libassuan-2.5.1.tar.bz2       build/downloads/pcre-8.42.tar.bz2
build/downloads/alsa-plugins-1.1.6.tar.bz2     build/downloads/libgpg-error-1.32.tar.bz2     build/downloads/pixman-0.34.0.tar.bz2
build/downloads/alsa-tools-1.1.6.tar.bz2       build/downloads/libICE-1.0.9.tar.bz2          build/downloads/sysvinit-2.88dsf.tar.bz2
... ...

离线编译

如果确信所有软件包都已经在本地,可以去掉网络连接,执行离线编译,会提高编译速度。
在菜单Yocto Settings里,去掉“Enable Network sstate feeds”,选择“Enable BB NO NETWORK”。

PetaLinux流程编译

PetaLinux编译Linux和U-Boot

PetaLinux在编译工程中,会自动编译Linux和U-Boot。

使用命令“petalinux-build -c kernel”, 只编译Linux; 使用命令“petalinux-build -c u-boot”, 只编译U-Boot。

Linux和U-Boot的配置文件

在build目录下的子目录“kernel-build-artifacts”也保存了Linux的配置文件“.config”。对于PetaLinux 2021.1的ZCU106 BSP工程,Linux的配置文件“.config”在“build/tmp/work-shared/zynqmp-generic/kernel-build-artifacts/”。

如果使用了image.ub格式,build目录下也有创建image.ub文件的its文件。对于PetaLinux 2021.1的ZCU106 BSP工程,its文件是“build/tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/5.10+gitAUTOINC+c830a552a6-r0/linux-zynqmp_generic-standard-build/fit-image-petalinux-initramfs-image.its”。

在build目录下的子目录build下,保存了UBoot的配置文件.config。对于PetaLinux 2021.1的ZCU106 BSP工程,UBoot的配置文件.config在“build/tmp/work/zynqmp_generic-xilinx-linux/u-boot-xlnx/v2021.01-xilinx-v2021.1+gitAUTOINC+41fc08b3fe-r0/build/”。

devtool取得Linux和UBoot源代码

PetaLinux也提供Yocto的devtool工具,通过devtool能直接取得Linux和UBoot源代码。在2021及之后的版本里,PetaLinux直接提供命令petalinux-devtool,实现Yocto的devtool的功能。在2021之前的版本里,导入目录“components/yocto/layers/core/oe-init-build-env”的环境,能使用Yocto的devtool工具.

通过执行命令“petalinux-devtool modify linux-xlnx”或者“devtool modify linux-xlnx”,Linux源代码会被保存至"components/yocto/workspace/sources/linux-xlnx"目录下。

通过执行命令“petalinux-devtool modify u-boot-xlnx”或者“devtool modify u-boot-xlnx”,Linux源代码会被保存至"components/yocto/workspace/sources/u-boot-xlnx"目录下。

工程师修改上述的Linux和UBoot源代码后,直接编译PetaLinux工程,修改就会生效。

调试完成后,再执行命令“petalinux-devtool finish linux-xlnx project-spec/meta-user”,能为Linux创建patch。PetaLinux之后也不再使用上述代码。所以使用petalinux-devtool的方式获取代码,能更容易的创建patch,把修改合并回PetaLinux工程。

Open Source流程编译Linux和UBoot

结合devtool取得的Linux和UBoot源代码,和build目录下的配置文件.config,可以整合Linux和UBoot的PetaLinux编译流程与Open Source 编译流程。

注意,在以Open Source流程编译Linux和UBoot之前,请先成功编译PetaLinux工程。

获取源代码和配置文件

下述脚本通过devtool取得的Linux和UBoot源代码, 并复制build目录下的Linux和UBoot配置文件.config到各自的源代码目录中。

#!/bin/bash
# Author: Hank FU, hankf@amd.com; hankf@xilinx.com; 
# peta-osl-fetch-source.sh
# Execute peta-osl-fetch-source.sh in PetaLinux project directory. 

if [ ! -d ./project-spec/meta-user/recipes-bsp/ ]; then 
    echo "Not PetaLinux project directory."
    echo "No directory: ./project-spec/meta-user/recipes-bsp "
    echo "Exit."
    exit 1
fi 

echo "Check image of PetaLinux project."
ls -l ./images/linux/u-boot.elf 
ls -l ./images/linux/Image
if [ ! -f ./images/linux/u-boot.elf ] || [ ! -f ./images/linux/Image ]; then 
    echo "PetaLinux project is not built successfully."
    echo "Please build it first."
    exit 1
fi 

peta_dir=`pwd`

# check petalinux tool
echo "check petalinux tool:"  
which petalinux-build    
which petalinux-devtool  

petalinux_devtool=`which petalinux-devtool` 
echo "petalinux devtool:  $petalinux_devtool"  

# PetaLinux 2020.1: no petalinux-devtool
# source /opt/pkg/petalinux/settings.sh
# source <plnx-proj-root>/components/yocto/layers/core/oe-init-build-env
if [ "$petalinux_devtool" = "" ]; then
    echo "Source yocto environment"         

    source components/yocto/layers/core/oe-init-build-env    
    # It enter directory "build"  
    echo -e "\nShow current directory: "   
    pwd                                    
    if [ -d ../components/yocto/ ]; then 
        cd .. 
    fi 

    if [ ! -d ./components/yocto/ ]; then 
        echo -e "\nError current directory: "  
        pwd 
        exit
    fi 

    petalinux_devtool=`which devtool`
    echo "petalinux devtool:  $petalinux_devtool"  
    devtool create-workspace ./components/yocto/workspace/sources  
fi

if [ "$petalinux_devtool" = "" ]; then
    echo "Error: petalinux devtool is invalid"  
    exit
fi

echo -e "\nShow current directory: "   
pwd                                    

sources_dir=$peta_dir/components/yocto/workspace/sources
echo -e "\nTry to modify components into directory: $sources_dir\n"  

# ug1144 Table 42: petalinux-build -c Components
# 
# Get the source code from git url specifi ed  in meta-layers:
#     petalinux-devtool modify <recipe-name>
# 
# Creates a patch for the committed  changes in recipe sources directory.
#     petalinux-devtool finish <recipe-name> <destination layer path>

echo -e "\nTry to modify linux-xlnx"    
$petalinux_devtool modify linux-xlnx     

linux_kernel_config_file=`find -name ".config"     | grep -i kernel-build-artifacts`
if [ "$linux_kernel_config_file" = "" ]; then
    echo "Failed to findLinux-kernel .config file.";   
    exit 1
fi

echo -e "\nLinux-kernel .config file: $linux_kernel_config_file"      
if [ -d $sources_dir/linux-xlnx/ ]; then
    cp $linux_kernel_config_file  $sources_dir/linux-xlnx/config_file_used_by_petalinux   
    # only one arch config files is valid.
    cp $linux_kernel_config_file  $sources_dir/linux-xlnx/arch/arm64/configs/xilinx_peta_defconfig   
    cp $linux_kernel_config_file  $sources_dir/linux-xlnx/arch/arm/configs/xilinx_peta_defconfig    
    cp $linux_kernel_config_file  $sources_dir/linux-xlnx/   
else
    echo -e "\nNo Linux-kernel source code directory"          
fi

linux_kernel_its_file=`find -name "fit-image-petalinux*.its" | grep -i build `
if [ "$linux_kernel_its_file" = "" ]; then
    echo "Failed to find Linux-kernel image.ub its file.";   
    exit 1
fi

echo -e "\nLinux-kernel image.ub its file: $linux_kernel_its_file"      
if [ -d $sources_dir/linux-xlnx/ ]; then
    cp $linux_kernel_its_file  $sources_dir/linux-xlnx/   
else
    echo -e "\nNo Linux-kernel source code directory"          
fi

echo -e "\nTry to modify u-boot-xlnx"    
$petalinux_devtool modify u-boot-xlnx     

u_boot_config_file=`find -name ".config" | grep -i u-boot-xlnx | grep -i build `
if [ "$u_boot_config_file" = "" ]; then
    echo "Failed to find U-Boot .config file.";   
    exit 1
fi

echo -e "\nU-boot .config file: $u_boot_config_file"          
if [ -d $sources_dir/u-boot-xlnx/ ]; then
    cp $u_boot_config_file  $sources_dir/u-boot-xlnx/config_file_used_by_petalinux   
    cp $u_boot_config_file  $sources_dir/u-boot-xlnx/configs/xilinx_peta_defconfig   
    cp $u_boot_config_file  $sources_dir/u-boot-xlnx/ 
else
    echo -e "\nNo U-boot source code directory"          
fi

if [ -f components/yocto/layers/meta-som/recipes-bsp/u-boot/files/vars ]; then 
    echo "Has U-Boot vars file:."
    cp components/yocto/layers/meta-som/recipes-bsp/u-boot/files/vars $sources_dir/u-boot-xlnx/
else
    uboot_vars_file=`find -type f -name "vars"`
    if [ ! "$uboot_vars_file" = "" ]; then
        echo -e "\n Find  U-Boot vars file: $uboot_vars_file"   
        cp $uboot_vars_file $sources_dir/u-boot-xlnx/
    fi 
fi 

echo -e "\nShow current directory: "   
pwd                                    

if [ -d $sources_dir/ ]; then 
    echo -e "\nShow components that can be modified in $sources_dir/"   
    ls -l $sources_dir/          
else
    echo -e "\nNo components that can be modified in $sources_dir/"   
fi 

# petalinux-devtool finish <recipe-name> <destination layer path>
# 
# petalinux-devtool reset <recipe-name> to remove the source directory for the recipe from workspace.

Open Source流程编译UBoot

在上面脚本取得的UBoot目录中,编译UBoot,得到u-boot.elf文件,再借用PetaLinux工程生成的其它文件,生成BOOT.bin,可以启动并引导Linux。

在PetalLinux工程目录中执行下列脚本,能以Open Source流程编译UBoot,并自动生成BOOT.bin。

#!/bin/bash
# Author: Hank FU, hankf@amd.com
# peta-osl-make-uboot.sh
# Execute peta-osl-make-uboot.sh in PetaLinux project directory. 
# Usage: peta-osl-make-uboot.sh U-Boot_source_dir [ Default: components/yocto/workspace/sources/u-boot-xlnx]

if [ ! -d ./project-spec/meta-user/recipes-bsp/ ]; then 
    echo "Not PetaLinux project directory."
    echo "No directory: ./project-spec/meta-user/recipes-bsp "
    echo "Exit."
    exit 1
fi 

peta_dir=`pwd`
echo "Current directory: $peta_dir"

petalinux_tool=`which petalinux-build` 
if [ "$petalinux_tool" = "" ]; then
    echo "Error: petalinux-build is invalid"
    exit 1
fi

# Check PetaLinux building environment variable settings.
if [ "$ARCH" != "arm" ]; then
    if [ "$ARCH" != "arm64" ]; then
        echo "ARCH is not set correctly.";
        exit 1
    fi
fi

if [ "$CROSS_COMPILE" = "" ]; then
    echo "CROSS_COMPILE is not set.";
    exit 1
fi
echo "PetaLinux building environment variable is set.";
echo "ARCH: $ARCH"
echo -e "CROSS_COMPILE: $CROSS_COMPILE\n"

CURRENT_CROSS_CC=`echo $CC | grep aarch64-xilinx-linux`
if [ ! "$CURRENT_CROSS_CC" = "" ]; then
    echo -e "CROSS_CC: $CC\n"
    echo -e "Wrong GCC setting for building U-Boot by Open Source Flow.\n"
    echo -e "Use new terminal after executing 'petalinux-build'.\n"
    exit 1
fi

uboot_dir=$1
if [ "$uboot_dir" = "" ]; then

    if [ -d ./components/yocto/workspace/sources/u-boot-xlnx/arch/arm/ ]; then
        uboot_dir=./components/yocto/workspace/sources/u-boot-xlnx
    else
        uboot_dir=
    fi
fi

if [ ! -d  $uboot_dir ]; then 
    echo "No U-Boot source directory: $uboot_dir"
    echo "Usage: $0 uboot_source_dir [ Default: components/yocto/workspace/sources/u-boot-xlnx]"
    exit 1
fi 

cd $uboot_dir
echo "U-Boot source directory: "
pwd

if [ ! -f  .config ]; then 
    echo "Has no config file: .config."
    echo "U-Boot source code not configured."
    exit 1
fi 

rm -f u-boot.elf
make -j  u-boot.elf
ls -l -h u-boot.elf

if [ ! -f  u-boot.elf ]; then 
    echo "Failed to build U-Boot in directory: $peta_dir/$uboot_dir"
    exit 1
fi 

cd  $peta_dir
rm -f images/linux/BOOT.BIN
cp  $uboot_dir/u-boot.elf ./images/linux/
petalinux-package --boot --u-boot $uboot_dir/u-boot.elf --force
ls -l -h images/linux/BOOT.BIN

Open Source流程编译Linux

在上面脚本取得的Linux目录中,编译Linux,得到Image文件,直接可以和system.dtb、rootfs.cpio.gz.u-boot一起启动。

还可以根据上述的its文件,创建image.ub。但是PetaLinux的its文件引用dtb文件、rootfs文件时,使用了内部的绝对路径,建议改成PetaLinux工程的images/linux目录。注意下面的its文件,system-top.dtb被改为了system.dtb,petalinux-initramfs-image-zynqmp-generic.cpio.gz改为了rootfs.cpio.gz,而且路径也改到了PetaLinux的images/linux目录。总之,要保证its文件中的设备树文件路径正确,文件系统的cpio.gz文件路径正确。

/dts-v1/;

/ {
        description = "U-Boot fitImage for PetaLinux/5.10+gitAUTOINC+c830a552a6/zynqmp-generic";
        #address-cells = <1>;

        images {
                kernel-1 {
                        description = "Linux kernel";
                        data = /incbin/("linux.bin");
                        type = "kernel";
                        arch = "arm64";
                        os = "linux";
                        compression = "gzip";
                        load = <0x80000>;
                        entry = <0x80000>;
                        hash-1 {
                                algo = "sha256";
                        };
                };
                fdt-system-top.dtb {
                        description = "Flattened Device Tree blob";
                        
                        /* data = /incbin/("/proj/hankf/v211/zcu106-bsp-peta/build/tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/5.10+gitAUTOINC+c830a552a6-r0/recipe-sysroot/boot/devicetree/system-top.dtb"); */
                        
                        data = /incbin/("/proj/hankf/v211/zcu106-bsp-peta/images/linux/system.dtb");
                        
                        type = "flat_dt";
                        arch = "arm64";
                        compression = "none";
                        
                        hash-1 {
                                algo = "sha256";
                        };
                };
                ramdisk-1 {
                        description = "petalinux-initramfs-image";
                        
                        /* data = /incbin/("/proj/hankf/v211/zcu106-bsp-peta/build/tmp/deploy/images/zynqmp-generic/petalinux-initramfs-image-zynqmp-generic.cpio.gz"); */
                        
                        data = /incbin/("/proj/hankf/v211/zcu106-bsp-peta/images/linux/rootfs.cpio.gz");
                        type = "ramdisk";
                        arch = "arm64";
                        os = "linux";
                        compression = "none";
                        
                        
                        hash-1 {
                                algo = "sha256";
                        };
                };
    };

        configurations {
                default = "conf-system-top.dtb";
                conf-system-top.dtb {
            description = "1 Linux kernel, FDT blob, ramdisk";
            kernel = "kernel-1";
            fdt = "fdt-system-top.dtb";
            ramdisk = "ramdisk-1";
            
                        hash-1 {
                                algo = "sha256";
                        };
                };
    };
};

在PetalLinux工程目录中执行下列脚本,能以Open Source流程编译Linux,并将Image、Image.ub文件复制到PetalLinux工程目录中的目录“images/linux/”。

#!/bin/bash
# Author: Hank FU, hankf@amd.com
# peta-osl-make-linux.sh
# Execute peta-osl-make-linux.sh in PetaLinux project directory. 
# Usage: peta-osl-make-linux.sh linux_source_dir [ Default: components/yocto/workspace/sources/linux-xlnx]

if [ ! -d ./project-spec/meta-user/recipes-bsp/ ]; then 
    echo "Not PetaLinux project directory."
    echo "No directory: ./project-spec/meta-user/recipes-bsp "
    echo "Exit."
    exit 1
fi 

peta_dir=`pwd`
echo "Current directory: $peta_dir"

petalinux_tool=`which petalinux-build` 
if [ "$petalinux_tool" = "" ]; then
    echo "Error: petalinux-build is invalid"
    exit 1
fi

# Check PetaLinux building environment variable settings.
if [ "$ARCH" != "arm" ]; then
    if [ "$ARCH" != "arm64" ]; then
        echo "ARCH is not set correctly.";
        exit 1
    fi
fi

if [ "$CROSS_COMPILE" = "" ]; then
    echo "CROSS_COMPILE is not set.";
    exit 1
fi
echo "PetaLinux building environment variable is set.";
echo "ARCH: $ARCH"
echo -e "CROSS_COMPILE: $CROSS_COMPILE\n"

linux_dir=$1
if [ "$linux_dir" = "" ]; then

    if [ -d ./components/yocto/workspace/sources/linux-xlnx/arch/arm/ ]; then
        linux_dir=./components/yocto/workspace/sources/linux-xlnx
    else
        linux_dir=
    fi
fi

if [ ! -d  $linux_dir ]; then 
    echo "No Linux kernel directory: $linux_dir"
    echo "Usage: $0 linux_source_dir [ Default: components/yocto/workspace/sources/linux-xlnx]"
    exit 1
fi 

cd $linux_dir
echo "Linux kernel directory: "
pwd
echo ""

if [ ! -f  .config ]; then 
    echo "Has no config file: .config."
    echo "Linux kernel source code not configured."
    exit 1
fi 

make -j 
ls -l -h ./arch/arm64/boot/Image
ls -l -h vmlinux
if [ ! -f ./arch/arm64/boot/Image ]; then 
    echo "Failed to build Linux in directory: $peta_dir/$linux_dir"
    exit 1
fi 

# Build image.ub
if [ -f vmlinux ]; then
    
    echo "Linux vmlinux in directory: $peta_dir/$linux_dir:: "
    ls -l vmlinux

    linux_kernel_its_file=` find -name "fit-image-petalinux*.its" `
    if [ ! "$linux_kernel_its_file" = "" ]; then

        echo "Create image.ub by using its file: $linux_kernel_its_file."
        rm -f linux_objcopy.bin
        rm -f linux.bin
        rm -f image.ub
        aarch64-linux-gnu-objcopy -O binary -R .note -R .comment -S vmlinux linux_objcopy.bin
        gzip -9 linux_objcopy.bin
        mv -f linux_objcopy.bin.gz linux.bin
        mkimage -f $linux_kernel_its_file image.ub 
    else        
        echo "No image.ub its file in directory: $peta_dir/$linux_dir"    
    fi
else        
    echo "Failed to build Linux vmlinux in directory: $peta_dir/$linux_dir"    
fi

# Copy Image and image.ub to PetaLinux project's directory: images/linux/
cd  $peta_dir
rm -f images/linux/Image
rm -f images/linux/image.ub
cp  $linux_dir/arch/arm64/boot/Image ./images/linux/
cp  $linux_dir/image.ub ./images/linux/
ls -l -h images/linux/Image
ls -l -h images/linux/image.ub

PetaLinux流程和Open Source流程的切换

从Open Source流程切换到PetaLinux流程,请在Linux和UBoot源代码目录下执行"make mrproper"清理代码.

为了简便,也可以创建下列脚本,一次性完成清理工作。

清理Linux源代码的脚本。

#!/bin/bash
# Author: Hank FU, hankf@amd.com
# peta-osl-clean-linux.sh
# Execute peta-osl-clean-linux.sh in PetaLinux project directory. 
# Usage: peta-osl-clean-linux.sh linux_source_dir [ Default: components/yocto/workspace/sources/linux-xlnx]

if [ ! -d ./project-spec/meta-user/recipes-bsp/ ]; then 
    echo "Not PetaLinux project directory."
    echo "No directory: ./project-spec/meta-user/recipes-bsp "
    echo "Exit."
    exit 1
fi 

peta_dir=`pwd`
echo "Current directory: $peta_dir"

linux_dir=$1
if [ "$linux_dir" = "" ]; then

    if [ -d ./components/yocto/workspace/sources/linux-xlnx/arch/arm/ ]; then
            linux_dir=./components/yocto/workspace/sources/linux-xlnx
    else
            linux_dir=
    fi
fi

if [ ! -d  $linux_dir ]; then 
    echo "No Linux kernel directory: $linux_dir"
    echo "Usage: $0 linux_source_dir [ Default: components/yocto/workspace/sources/linux-xlnx]"
    exit 1
fi 

cd $linux_dir
echo "Linux kernel directory: "
pwd
echo ""

if [ -f  .config ]; then 
    make prepare
fi 

make mrproper
#make clean

rm -rf oe-*

清理UBoot源代码的脚本。

#!/bin/bash
# Author: Hank FU, hankf@amd.com
# peta-osl-clean-uboot.sh
# Execute peta-osl-clean-uboot.sh in Petaulinux project directory. 
# Usage: peta-osl-clean-uboot.sh uboot_source_dir [ Default: components/yocto/workspace/sources/u-boot-xlnx]

if [ ! -d ./project-spec/meta-user/recipes-bsp/ ]; then 
    echo "Not Petaulinux project directory."
    echo "No directory: ./project-spec/meta-user/recipes-bsp "
    echo "Exit."
    exit 1
fi 

peta_dir=`pwd`
echo "Current directory: $peta_dir"

uboot_dir=$1
if [ "$uboot_dir" = "" ]; then

    if [ -d ./components/yocto/workspace/sources/u-boot-xlnx/arch/arm/ ]; then
            uboot_dir=./components/yocto/workspace/sources/u-boot-xlnx
    else
            uboot_dir=
    fi
fi

if [ ! -d  $uboot_dir ]; then 
    echo "No U-Boot directory: $uboot_dir"
    echo "Usage: $0 uboot_source_dir [ Default: components/yocto/workspace/sources/u-boot-xlnx]"
    exit 1
fi 

cd $uboot_dir
echo "U-Boot directory: "
pwd
echo ""

if [ -f  .config ]; then 
    make prepare
fi 

make mrproper
#make clean

rm -rf oe-*

一次性清理Linux和UBoot源代码的脚本。

#!/bin/bash
# Author: Hank FU, hankf@amd.com
# peta-osl-clean.sh
# Execute peta-osl-clean.sh in PetaLinux project directory. 
# Usage: peta-osl-clean.sh

peta-osl-clean-linux.sh

peta-osl-clean-U-Boot.sh

从PetaLinux流程切换到Open Source流程,请在编译目录中,复制.config文件到Linux和UBoot源代码目录,并删除oe开头的文件夹。我们也可以执行命令“make xilinx_peta_defconfig”,得到.config文件。

已知问题

错误"Failed to find U-Boot .config file."

使用上述脚本osl-fetch-source.sh,获取Linux和UBoot源代码时,找不到UBoot的配置文件.config,得到错误"Failed to find U-Boot .config file."。

请在project-spec/meta-user/conf/petalinuxbsp.conf里,添加如下内容,保留Linux和UBoot源代码和配置文件.config. 修改后,删除build目录下的所有文件,再编译,就能找到UBoot的配置文件.config。

RM_WORK_EXCLUDE += "linux-xlnx"
RM_WORK_EXCLUDE += "u-boot-xlnx"

Linux 错误 “ERROR: Could not generate a .config”

如果没有清理Linux代码,会遇到问题“ERROR: Could not generate a .config for zynqmp-generic-standard”。

DEBUG: Executing shell function do_kernel_configme
ERROR: Could not generate a .config for zynqmp-generic-standard
ERROR: Details can be found at: /proj/hankf/v211/zcu106-bsp-peta/components/yocto/workspace/sources/linux-xlnx/.kernel-meta/cfg/merge_config_build.log
WARNING: /proj/hankf/v211/zcu106-bsp-peta/build/tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/5.10+git999-r0/temp/run.do_kernel_configme.1418:205 exit 1 from 'exit 1'
WARNING: Backtrace (BB generated script): 
	#1: bbfatal_log, /proj/hankf/v211/zcu106-bsp-peta/build/tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/5.10+git999-r0/temp/run.do_kernel_configme.1418, line 205
	#2: do_kernel_configme, /proj/hankf/v211/zcu106-bsp-peta/build/tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/5.10+git999-r0/temp/run.do_kernel_configme.1418, line 188
	#3: main, /proj/hankf/v211/zcu106-bsp-peta/build/tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/5.10+git999-r0/temp/run.do_kernel_configme.1418, line 462
ERROR: Execution of '/proj/hankf/v211/zcu106-bsp-peta/build/tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/5.10+git999-r0/temp/run.do_kernel_configme.1418' failed with exit code 1:

错误"The source tree is not clean"

在使用OpenSource Linux编译流程后,再回到Petalinux的编译,执行petalinux-build会得到下列错误。需要在Linux的源代码目录,执行命令“make mrproper”,清理Linux的源代码目录。

NOTE: Executing Tasks
NOTE: linux-xlnx: compiling from external source tree /proj/hankf/v211/zcu106-bsp-peta/components/yocto/workspace/sources/linux-xlnx
ERROR: linux-xlnx-5.10+git999-r0 do_compile: oe_runmake failed
ERROR: linux-xlnx-5.10+git999-r0 do_compile: Execution of '/proj/hankf/v211/zcu106-bsp-peta/build/tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/5.10+git999-r0/temp/run.do_compile.49655' failed with exit code 1:
***
*** The source tree is not clean, please run 'make mrproper'
*** in /proj/hankf/v211/zcu106-bsp-peta/components/yocto/workspace/sources/linux-xlnx
***
make[1]: *** [/proj/hankf/v211/zcu106-bsp-peta/components/yocto/workspace/sources/linux-xlnx/Makefile:547: outputmakefile] Error 1
make: *** [/proj/hankf/v211/zcu106-bsp-peta/components/yocto/workspace/sources/linux-xlnx/Makefile:185: __sub-make] Error 2
WARNING: /proj/hankf/v211/zcu106-bsp-peta/build/tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/5.10+git999-r0/temp/run.do_compile.49655:306 exit 1 from 'exit 1'
WARNING: Backtrace (BB generated script): 
	#1: bbfatal_log, /proj/hankf/v211/zcu106-bsp-peta/build/tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/5.10+git999-r0/temp/run.do_compile.49655, line 306
	#2: die, /proj/hankf/v211/zcu106-bsp-peta/build/tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/5.10+git999-r0/temp/run.do_compile.49655, line 286
	#3: oe_runmake, /proj/hankf/v211/zcu106-bsp-peta/build/tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/5.10+git999-r0/temp/run.do_compile.49655, line 161
	#4: kernel_do_compile, /proj/hankf/v211/zcu106-bsp-peta/build/tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/5.10+git999-r0/temp/run.do_compile.49655, line 197
	#5: do_compile, /proj/hankf/v211/zcu106-bsp-peta/build/tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/5.10+git999-r0/temp/run.do_compile.49655, line 152
	#6: main, /proj/hankf/v211/zcu106-bsp-peta/build/tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/5.10+git999-r0/temp/run.do_compile.49655, line 310

Backtrace (metadata-relative locations):
	#1: bbfatal_log, /proj/hankf/v211/zcu106-bsp-peta/components/yocto/layers/core/meta/classes/logging.bbclass, line 72
	#2: die, /proj/hankf/v211/zcu106-bsp-peta/components/yocto/layers/core/meta/classes/base.bbclass, line 56
	#3: oe_runmake, /proj/hankf/v211/zcu106-bsp-peta/components/yocto/layers/core/meta/classes/base.bbclass, line 65
	#4: kernel_do_compile, /proj/hankf/v211/zcu106-bsp-peta/components/yocto/layers/meta-petalinux/oe-core/meta/classes/kernel.bbclass, line 349
	#5: do_compile, autogenerated, line 2

U-Boot 错误 "Error: kernelrelease not valid"

如果没有清理UBoot代码,会遇到问题“kernelrelease not valid”。

make[1]: Entering directory '/proj/hankf/v211/zcu106-bsp-peta/build/tmp/work/zynqmp_generic-xilinx-linux/u-boot-xlnx/v2021.01-xilinx-v2021.1+git999-r0/u-boot-xlnx-v2021.01-xilinx-v2021.1+git999'
set -e; mkdir -p include/config/; 	echo "2021.01$(/bin/sh /proj/hankf/v211/zcu106-bsp-peta/components/yocto/workspace/sources/u-boot-xlnx/scripts/setlocalversion /proj/hankf/v211/zcu106-bsp-peta/components/yocto/workspace/sources/u-boot-xlnx)" < /proj/hankf/v211/zcu106-bsp-peta/components/yocto/workspace/sources/u-boot-xlnx/include/config/auto.conf > include/config/uboot.release.tmp; if [ -r include/config/uboot.release ] && cmp -s include/config/uboot.release include/config/uboot.release.tmp; then rm -f include/config/uboot.release.tmp; else : '  UPD     include/config/uboot.release'; mv -f include/config/uboot.release.tmp include/config/uboot.release; fi
===================== WARNING ======================
ln -fsn /proj/hankf/v211/zcu106-bsp-peta/components/yocto/workspace/sources/u-boot-xlnx source
This board uses CONFIG_SPL_FIT_GENERATOR. Please migrate
set -e; mkdir -p include/generated/; 	(if test -n "${SOURCE_DATE_EPOCH}"; then SOURCE_DATE="@${SOURCE_DATE_EPOCH}"; DATE=""; for date in gdate date.gnu date; do ${date} -u -d "${SOURCE_DATE}" >/dev/null 2>&1 && DATE="${date}"; done; if test -n "${DATE}"; then LC_ALL=C ${DATE} -u -d "${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; LC_ALL=C ${DATE} -u -d "${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; LC_ALL=C ${DATE} -u -d "${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; LC_ALL=C ${DATE} -u -d "${SOURCE_DATE}" +'#define U_BOOT_DMI_DATE "%m/%d/%Y"'; LC_ALL=C ${DATE} -u -d "${SOURCE_DATE}" +'#define U_BOOT_BUILD_DATE 0x%Y%m%d'; LC_ALL=C ${DATE} -u -d "${SOURCE_DATE}" +'#define U_BOOT_EPOCH %s'; else return 42; fi; else LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; LC_ALL=C date +'#define U_BOOT_TIME "%T"'; LC_ALL=C date +'#define U_BOOT_TZ "%z"'; LC_ALL=C date +'#define U_BOOT_DMI_DATE "%m/%d/%Y"'; LC_ALL=C date +'#define U_BOOT_BUILD_DATE 0x%Y%m%d'; LC_ALL=C date +'#define U_BOOT_EPOCH %s'; fi) < /proj/hankf/v211/zcu106-bsp-peta/components/yocto/workspace/sources/u-boot-xlnx/Makefile > include/generated/timestamp_autogenerated.h.tmp; if [ -r include/generated/timestamp_autogenerated.h ] && cmp -s include/generated/timestamp_autogenerated.h include/generated/timestamp_autogenerated.h.tmp; then rm -f include/generated/timestamp_autogenerated.h.tmp; else : '  UPD     include/generated/timestamp_autogenerated.h'; mv -f include/generated/timestamp_autogenerated.h.tmp include/generated/timestamp_autogenerated.h; fi
to binman instead, to avoid the proliferation of
Error: kernelrelease not valid - run 'make prepare' to update it
/bin/sh /proj/hankf/v211/zcu106-bsp-peta/components/yocto/workspace/sources/u-boot-xlnx/scripts/mkmakefile \
    /proj/hankf/v211/zcu106-bsp-peta/components/yocto/workspace/sources/u-boot-xlnx . 2021 01
set -e; mkdir -p include/generated/; 	(if test -n "${DEVICE_TREE}"; then echo \#define DEVICE_TREE \"\"; else echo \#define DEVICE_TREE CONFIG_DEFAULT_DEVICE_TREE; fi) < /proj/hankf/v211/zcu106-bsp-peta/components/yocto/workspace/sources/u-boot-xlnx/Makefile > include/generated/dt.h.tmp; if [ -r include/generated/dt.h ] && cmp -s include/generated/dt.h include/generated/dt.h.tmp; then rm -f include/generated/dt.h.tmp; else : '  UPD     include/generated/dt.h'; mv -f include/generated/dt.h.tmp include/generated/dt.h; fi
arch-specific scripts with no tests.
  GEN     ./Makefile
=======================================

U-Boot 错误 “No rule to make target 'vars'”

以Open Source流程编译KV260 2022.2 BSP的U-Boot代码时,得到错误“No rule to make target 'vars'”。查找文件,发现文件vars在目录“ "./components/yocto/layers/meta-som/recipes-bsp/u-boot/files”下。复制文件vars到U-Boot的代码目录下,再次编译,能成功编译。

  CFG     spl/u-boot.cfg
  GEN     include/autoconf.mk
  GEN     spl/include/autoconf.mk
make: *** No rule to make target 'vars', needed by 'include/generated/defaultenv_autogenerated.h'.  Stop.
make: *** Waiting for unfinished jobs....
  UPD     include/generated/dt.h
  UPD     include/generated/timestamp_autogenerated.h
  UPD     include/config/uboot.release
ls: cannot access 'u-boot.elf': No such file or directory

U-Boot 错误 "aarch64-xilinx-linux-gcc: command not found" 和错误 "aarch64-xilinx-linux-ld.bfd.real: cannot find -lgcc"

以Open Source流程编译KV260 2022.2 BSP的U-Boot代码时,得到错误“aarch64-xilinx-linux-gcc: command not found”。以命令“petalinux-build”编译Petalinux工程后,或者导入“components/yocto/environment-setup-cortexa72-cortexa53-xilinx-linux”,环境变量“CROSS_COMPILE”会被设置成“aarch64-xilinx-linux-”。其它GCC工具也被设置成“aarch64-xilinx-linux-”系列。

错误信息如下:

/bin/sh: aarch64-xilinx-linux-gcc: command not found
make: aarch64-xilinx-linux-gcc: Command not found
/bin/sh: aarch64-xilinx-linux-gcc: command not found

系统环境设置如下:

declare -x AR="aarch64-xilinx-linux-ar"
declare -x AS="aarch64-xilinx-linux-as"
declare -x CC="aarch64-xilinx-linux-gcc  -mcpu=cortex-a72.cortex-a53 -march=armv8-a+crc -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/proj/hankf/hankf/vck190/v222/vck190-v222-bsp-peta/components/yocto/tmp/sysroots/versal-net-generic"

declare -x CONFIGURE_FLAGS="--target=aarch64-xilinx-linux --host=aarch64-xilinx-linux --build=x86_64-linux --with-libtool-sysroot=/proj/hankf/hankf/vck190/v222/vck190-v222-bsp-peta/components/yocto/tmp/sysroots/versal-net-generic"
declare -x CPP="aarch64-xilinx-linux-gcc -E  -mcpu=cortex-a72.cortex-a53 -march=armv8-a+crc -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/proj/hankf/hankf/vck190/v222/vck190-v222-bsp-peta/components/yocto/tmp/sysroots/versal-net-generic"
declare -x CXX="aarch64-xilinx-linux-g++  -mcpu=cortex-a72.cortex-a53 -march=armv8-a+crc -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/proj/hankf/hankf/vck190/v222/vck190-v222-bsp-peta/components/yocto/tmp/sysroots/versal-net-generic"
declare -x GDB="aarch64-xilinx-linux-gdb"
declare -x LD="aarch64-xilinx-linux-ld  --sysroot=/proj/hankf/hankf/vck190/v222/vck190-v222-bsp-peta/components/yocto/tmp/sysroots/versal-net-generic"
declare -x NM="aarch64-xilinx-linux-nm"
declare -x OBJCOPY="aarch64-xilinx-linux-objcopy"
declare -x OBJDUMP="aarch64-xilinx-linux-objdump"
declare -x RANLIB="aarch64-xilinx-linux-ranlib"
declare -x READELF="aarch64-xilinx-linux-readelf"
declare -x STRIP="aarch64-xilinx-linux-strip"
declare -x TARGET_PREFIX="aarch64-xilinx-linux-"

如果添加Vitis中的“aarch64-xilinx-linux-gcc”的目录到系统变量“PATH”, 或者添加Petalinux工程中的“aarch64-xilinx-linux-gcc”的目录到系统变量“PATH”,再次编译,能找到编译器,但是会得到错误“aarch64-xilinx-linux-ld.bfd.real: cannot find -lgcc”。

打开一个新的Linux终端(terminal),导入PetaLinux 和 Vitis的环境变量,再设置Open Source流程的环境变量。设置命令如下:

source /opt/Xilinx/petalinux/2022.2/settings.sh
source /opt/Xilinx/Vitis/2022.2/settings64.sh

echo -e "\nSet system variables of cross compile tool for ZynqMP." 
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
echo "ARCH: $ARCH"
echo "CROSS_COMPILE: $CROSS_COMPILE"

新终端的环境变量如下:

hankf@XSZGS4:kr260-v222-bsp-peta$ export | grep aarch64-linux-gnu-
declare -x CROSS_COMPILE="aarch64-linux-gnu-"
hankf@XSZGS4:kr260-v222-bsp-peta$ which aarch64-linux-gnu-gcc
/opt/Xilinx/Vitis/2022.2/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-gcc

现在可以成功编译U-Boot。

U-Boot 错误 “ FATAL ERROR: Couldn't open "fit-dtb.blob" ”

以Open Source流程编译KV260 2022.2 BSP的U-Boot代码的默认目标时,得到错误“FATAL ERROR: Couldn't open "fit-dtb.blob”。U-Boot代码的默认目标包含“u-boot.itb”。我们不需要“u-boot.itb”,只需要“u-boot.elf”。以命令“make -j u-boot.elf”编译“u-boot.elf”,能成功编译。

  AR      spl/common/spl/built-in.o
  RELOC   u-boot-nodtb.bin
  MKIMAGE u-boot.img
  LD      spl/u-boot-spl
  MKIMAGE u-boot.itb
FATAL ERROR: Couldn't open "fit-dtb.blob": No such file or directory
./tools/mkimage: Can't open u-boot.itb.tmp: No such file or directory
Makefile:1429: recipe for target 'u-boot.itb' failed
make: *** [u-boot.itb] Error 255
make: *** Waiting for unfinished jobs....
  MKIMAGE fit-dtb.blob
  OBJCOPY spl/u-boot-spl-nodtb.bin
  SYM     spl/u-boot-spl.sym
  COPY    spl/u-boot-spl.bin
  MKIMAGE spl/boot.bin

错误devtool_post_patch

在执行命令“petalinux-devtool reset”,停止使用外部源代码后,再通过命令“petalinux-devtool modify”获取源代码,可能得到下列错误.请删除Petalinux工程的build目录下的所有文件,再重新编译Petalinux工程,再通过命令“petalinux-devtool modify”获取源代码。

NOTE: Executing Tasks
ERROR: 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:devtool_post_patch(d)
     0003:
File: '/proj/hankf/v211/zcu106-bsp-peta/components/yocto/layers/core/meta/classes/devtool-source.bbclass', lineno: 226, function: devtool_post_patch
     0222:                bb.build.exec_func('do_patch', localdata)
     0223:                rm_patches()
     0224:                # Now we need to reconcile the new branch with the no-overrides one
     0225:                # (otherwise we'd likely be left with identical commits that have different hashes)
 *** 0226:                bb.process.run('git rebase devtool-no-overrides', cwd=srcsubdir)
     0227:        bb.process.run('git checkout %s' % devbranch, cwd=srcsubdir)
     0228:    bb.process.run('git tag -f devtool-patched', cwd=srcsubdir)
     0229:}
     0230:
File: '/proj/hankf/v211/zcu106-bsp-peta/components/yocto/layers/core/bitbake/lib/bb/process.py', lineno: 184, function: run
     0180:        if not stderr is None:
     0181:            stderr = stderr.decode("utf-8")
     0182:
     0183:    if pipe.returncode != 0:
 *** 0184:        raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
     0185:    return stdout, stderr
Exception: bb.process.ExecutionError: Execution of 'git rebase devtool-no-overrides' failed with exit code 128:
fatal: It seems that there is already a rebase-apply directory, and
I wonder if you are in the middle of another rebase.  If that is the
case, please try
	git rebase (--continue | --abort | --skip)
If that is not the case, please
	rm -fr ".git/rebase-apply"
and run me again.  I am stopping in case you still have something
valuable there.

参考文档

UG1144 PetaLinux Tools Documentation Reference Guide (v2022.1) April 26, 2022
Xilinx Open Source Linux: Build kernel

测试环境

  1. Ubuntu 18.04
  2. PetaLinux 2021.1/2022.1/2022.2
  3. PetaLinux 2021.1/2022.1 ZCU106 BSP
  4. PetaLinux 2021.1/2022.1/2022.2 KR260 BSP
  5. PetaLinux 2021.1/2022.1/2022.2 KV260 BSP
  6. ZCU106
  7. KR260
  8. KV260
posted @ 2022-11-16 16:43  HankFu  阅读(3833)  评论(0编辑  收藏  举报