Jump to content
  • 0

Petalinux 2022.1 build error with Zybo Z7-20 on Ubuntu 20.04.6 missing scc


Eric Fox

Question

I am attempting to build Petalinux from:

https://digilent.com/reference/lib/exe/fetch.php?tok=d75c2d&media=https%3A%2F%2Fgithub.com%2FDigilent%2FZybo-Z7%2Freleases%2Ftag%2F20%2FPetalinux%2F2022.1-1%2FZybo-Z7-20-Petalinux-2022-1.bsp

Following instructions at:

https://digilent.com/reference/programmable-logic/zybo-z7/demos/petalinux

and

https://docs.xilinx.com/r/2022.1-English/ug1144-petalinux-tools-reference-guide

I am building under Ubuntu 20.04.6 LTS (Focal Fossa), with Linux commands:

source /eng/tools/Xilinx/Vitis/2022.1/settings64.sh
source /eng/tools/Xilinx/Vivado/2022.1/settings64.sh
source /eng/tools/Xilinx/PetaLinux/2022.1/tool/settings.sh
mkdir pet_proj
cd pet_proj
mkdir /eng/tmp/tmp_pet_proj
chmod 777 /eng/tmp/tmp_pet_proj
petalinux-create -t project -s ../Zybo-Z7-20-Petalinux-2022-1.bsp --tmpdir /eng/tmp/tmp_pet_proj

cd os
petalinux-build
 

I will give the raw error output in a minute, but I've determined that the build tries to run a Linux command 'scc', which I do not have installed, which gives it an error.

For example:

pwd

echo $?

0

scc

Command 'scc' not found, but can be installed with:

sudo snap install scc       # version v3.1.0, or
sudo apt  install scheme2c  # version 2012.10.14-1ubuntu1

See 'snap info scc' for additional versions.

echo $?
127
 

The error occurs in a script generated from:

<my_proj>/os/components/yocto/layers/core/meta/classes/kernel-yocto.bbclass (line 276)

    if [ "$mode" = "config" ]; then
        # run1: pull all the configuration fragments, no matter where they come from
        elements="`echo -n ${bsp_definition} $sccs_defconfig ${sccs} ${patches} $KERNEL_FEATURES_FINAL`"
        if [ -n "${elements}" ]; then
            echo "${bsp_definition}" > ${S}/${meta_dir}/bsp_definition
            scc --force -o ${S}/${meta_dir}:cfg,merge,meta ${includes} $sccs_defconfig $bsp_definition $sccs $patches $KERNEL_FEATURES_FINAL
            if [ $? -ne 0 ]; then
                bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
            fi
        fi
    fi
 

The script generated from that is:

/eng/tmp/tmp_pet_proj/work/zynq_generic-xilinx-linux-gnueabi/linux-xlnx/5.15.19+gitAUTOINC+machine-r0/temp/run.do_kernel_configme.61144:

run.do_kernel_configme.61144, line 386 occurs because linux command 'scc' does not exist:

    if [ "$mode" = "config" ]; then
        # run1: pull all the configuration fragments, no matter where they come from
        elements="`echo -n ${bsp_definition} $sccs_defconfig ${sccs} ${patches} $KERNEL_FEATURES_FINAL`"
        if [ -n "${elements}" ]; then
            echo "${bsp_definition}" > /eng/tmp/tmp_pet_proj/work-shared/zynq-generic/kernel-source/${meta_dir}/bsp_definition
            scc --force -o /eng/tmp/tmp_pet_proj/work-shared/zynq-generic/kernel-source/${meta_dir}:cfg,merge,meta ${includes} $sccs_defconfig $bsp_definition $sccs $patches $KERNEL_FEATURES_FINAL
            if [ $? -ne 0 ]; then
                bbfatal_log "Could not generate configuration queue for zynq-generic."
            fi
        fi
    fi
 

The dump of the error (abridged) is:

In generated log file: log.do_kernel_configme.61144:

DEBUG: Executing python function extend_recipe_sysroot

[snipped many lines}
 
    /home/efox/eng/zybo/Zybo-Z7-20/pet_proj/os/components/yocto/layers/meta-xilinx/meta-xilinx-core/recipes-kernel/linux/files/
DEBUG: Executing shell function do_kernel_configme
NOTE: do_kernel_metadata: for summary/debug, set KCONF_AUDIT_LEVEL > 0
[ERROR]: processing of file /tmp/tmp.pmzRVmsMPi failed
/eng/tmp/tmp_pet_proj/hosttools/dirname: missing operand
Try '/eng/tmp/tmp_pet_proj/hosttools/dirname --help' for more information.
ERROR: Could not generate configuration queue for zynq-generic.
WARNING: /eng/tmp/tmp_pet_proj/work/zynq_generic-xilinx-linux-gnueabi/linux-xlnx/5.15.19+gitAUTOINC+machine-r0/temp/run.do_kernel_configme.61144:212 exit 1 from 'exit 1'
WARNING: Backtrace (BB generated script): 
    #1: bbfatal_log, /eng/tmp/tmp_pet_proj/work/zynq_generic-xilinx-linux-gnueabi/linux-xlnx/5.15.19+gitAUTOINC+machine-r0/temp/run.do_kernel_configme.61144, line 212
    #2: do_kernel_metadata, /eng/tmp/tmp_pet_proj/work/zynq_generic-xilinx-linux-gnueabi/linux-xlnx/5.15.19+gitAUTOINC+machine-r0/temp/run.do_kernel_configme.61144, line 386
    #3: do_kernel_configme, /eng/tmp/tmp_pet_proj/work/zynq_generic-xilinx-linux-gnueabi/linux-xlnx/5.15.19+gitAUTOINC+machine-r0/temp/run.do_kernel_configme.61144, line 153
    #4: main, /eng/tmp/tmp_pet_proj/work/zynq_generic-xilinx-linux-gnueabi/linux-xlnx/5.15.19+gitAUTOINC+machine-r0/temp/run.do_kernel_configme.61144, line 486
 

There appears to multiple Linux applications named 'scc', but none of them seem correct. Could you point me to how to install the correct one? It appears to be some form of Source Control system that take parameters like --force, -o, --configs, --cmds

I am perplexed by the fact I have not seen anyone else with this issue, so wonder what prerequisite step(s) I failed to follow.

My searches of the yocto world have not helped me on this.

Thank you for any suggestions.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

According to https://docs.xilinx.com/r/2022.1-English/ug1144-petalinux-tools-reference-guide/Installation-Requirements

In release notes: https://support.xilinx.com/s/article/000033799?language=en_US

In 2022.1_PetaLinux_Package_List.xlsx file the following command is specified to install the required dependencies for Ubuntu Desktop/Server 64-bit:

sudo apt-get install iproute2 gawk python3 python build-essential gcc git make net-tools libncurses5-dev tftpd zlib1g-dev libssl-dev flex bison libselinux1 gnupg wget git-core diffstat chrpath socat xterm autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib automake zlib1g:i386 screen pax gzip cpio python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3

A list of packages can be found in this file for your specific version of Ubuntu if one of packages in above command is not found in the repository.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...