Project

General

Profile

Error building kernel and rootfs on host having Ubuntu 23.04 with docker

Added by Thomas Catalino about 1 year ago

(posted on behalf of customer)

We were trying to develop environment for Kernel and Rootfs development using following link on host having Ubuntu 23.04 with docker, but ended up with some error

https://support.criticallink.com/redmine/projects/mitysom_am62x/wiki/Yoctomitysomam62

ERROR: linux-cl-ti-5.10.158+gitAUTOINC+c66d84b258-r0 do_kernel_version_sanity_check: Package Version (5.10.158+gitAUTOINC+c66d84b258) does not match of kernel being built (5.10.168). Please update the PV variable to match the kernel source or set KERNEL_VERSION_SANITY_SKIP="1" in your recipe.
ERROR: linux-cl-ti-5.10.158+gitAUTOINC+c66d84b258-r0 do_kernel_version_sanity_check: Execution of '/work/build/arago-tmp-external-arm-glibc/work/mitysom_am62x-linux/linux-cl-ti/5.10.158+gitAUTOINC+c66d84b258-r0/temp/run.do_kernel_version_sanity_check.1301' failed with exit code 1
ERROR: Logfile of failure stored in: /work/build/arago-tmp-external-arm-glibc/work/mitysom_am62x-linux/linux-cl-ti/5.10.158+gitAUTOINC+c66d84b258-r0/temp/log.do_kernel_version_sanity_check.1301
ERROR: Task (/work/sources/meta-mitysom/recipes-kernel/linux/linux-cl-ti_5.10.bb:do_kernel_version_sanity_check) failed with exit code '1'


Replies (12)

RE: Error building kernel and rootfs on host having Ubuntu 23.04 with docker - Added by Jonathan Cormier about 1 year ago

The fix for this was pushed to the meta-mitysom dunfell branch last friday. Please let me know if you are still seeing errors.

You will need to pull the latest changes in sources/meta-mitysom (git pull). You may need to clean the linux-cl-ti recipe but I don't believe so.

https://support.criticallink.com/gitweb/?p=meta-mitysom.git;a=commit;h=1e8acd44aca4cc39e5f55d1624475ca47b38ac60

RE: Error building kernel and rootfs on host having Ubuntu 23.04 with docker - Added by Rohini Gawand about 1 year ago

As suggested we did try new commit with fresh clone but error still persist.

ERROR: linux-cl-ti-5.10.158+gitAUTOINC+c66d84b258-r0 do_kernel_version_sanity_check: Package Version (5.10.158+gitAUTOINC+c66d84b258) does not match of kernel being built (5.10.168). Please update the PV variable to match the kernel source or set KERNEL_VERSION_SANITY_SKIP="1" in your recipe.
ERROR: linux-cl-ti-5.10.158+gitAUTOINC+c66d84b258-r0 do_kernel_version_sanity_check: Execution of '/work/build/arago-tmp-external-arm-glibc/work/mitysom_am62x-linux/linux-cl-ti/5.10.158+gitAUTOINC+c66d84b258-r0/temp/run.do_kernel_version_sanity_check.1367' failed with exit code 1
ERROR: Logfile of failure stored in: /work/build/arago-tmp-external-arm-glibc/work/mitysom_am62x-linux/linux-cl-ti/5.10.158+gitAUTOINC+c66d84b258-r0/temp/log.do_kernel_version_sanity_check.1367
ERROR: Task (/work/sources/meta-mitysom/recipes-kernel/linux/linux-cl-ti_5.10.bb:do_kernel_version_sanity_check) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6064 tasks of which 6043 didn't need to be rerun and 1 failed.

RE: Error building kernel and rootfs on host having Ubuntu 23.04 with docker - Added by Jonathan Cormier about 1 year ago

Hi Rohini,

Can you check the value of "LINUX_VERSION" in the file sources/meta-mitysom/recipes-kernel/linux/linux-cl-ti_5.10.bb. If its not 5.10.168, then you haven't pulled the latest changes.

Can you post the output to the following commands?

cd sources/meta-mitysom/
git pull
git status

RE: Error building kernel and rootfs on host having Ubuntu 23.04 with docker - Added by Rohini Gawand about 1 year ago

Hi Jonathan,
   When we try to pull git repository, it is asking us to mention
branch, here is the output:

rohini:~/projects/AM62x$ cd sources/meta-mitysom/
rohini:~/projects/AM62x/sources/meta-mitysom$ git pull
remote: Enumerating objects: 32, done.
remote: Counting objects: 100% (25/25), done.
remot
remote: Enumerating objects: 32, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 14 (delta 8), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (14/14), 217.58 KiB | 238.00 KiB/s, done.
From https://support.criticallink.com/git/meta-mitysom
   adb4879..b3b0fa2  main       -> origin/main
   afb9768..2721f7a  thud       -> origin/thud
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

About LINUX_VERSION in
sources/meta-mitysom/recipes-kernel/linux/linux-cl-ti_5.10.bb, it's
5.10.158, kindly find attached screenshot for reference.

Thanks and Regards,
Rohini Gawand

On 9/25/23 19:16, Jonathan Cormier wrote:

RE: Error building kernel and rootfs on host having Ubuntu 23.04 with docker - Added by Jonathan Cormier about 1 year ago

You are not currently on a branch.

Aw okay. Lets checkout the dunfell branch and pull the changes again.

cd sources/meta-mitysom/
git checkout dunfell
git pull
git status

RE: Error building kernel and rootfs on host having Ubuntu 23.04 with docker - Added by Rohini Gawand about 1 year ago

Hi,
  We have followed the step as suggested, still facing same issue.
Requested output is here.

rohini:~/projects/AM62x/sources/meta-mitysom$ git checkout dunfell
Previous HEAD position was cb7df85 u-boot: factoryconfig: Update URL to
support.criticallink.com
Switched to branch 'dunfell'
Your branch is up to date with 'origin/dunfell'.
rohini:~/projects/AM62x/sources/meta-mitysom$ git pull
Already up to date.
rohini:~/projects/AM62x/sources/meta-mitysom$ git status
On branch dunfell
Your branch is up to date with 'origin/dunfell'.
nothing to commit, working tree clean

Build Errors :
ERROR: linux-cl-ti-5.10.158+gitAUTOINC+7ac5ed8a36-r0
do_kernel_version_sanity_check: Package Version
(5.10.158+gitAUTOINC+7ac5ed8a36) does not match of kernel being built
(5.10.168). Please update the PV variable to match the kernel source or
set KERNEL_VERSION_SANITY_SKIP="1" in your recipe.
ERROR: linux-cl-ti-5.10.158+gitAUTOINC+7ac5ed8a36-r0
do_kernel_version_sanity_check: Execution of
'/work/build/arago-tmp-external-arm-glibc/work/mitysom_am62x-linux/linux-cl-ti/5.10.158+gitAUTOINC+7ac5ed8a36-r0/temp/run.do_kernel_version_sanity_check.1291'
failed with exit code 1
ERROR: Logfile of failure stored in:
/work/build/arago-tmp-external-arm-glibc/work/mitysom_am62x-linux/linux-cl-ti/5.10.158+gitAUTOINC+7ac5ed8a36-r0/temp/log.do_kernel_version_sanity_check.1291
ERROR: Task
(/work/sources/meta-mitysom/recipes-kernel/linux/linux-cl-ti_5.10.bb:do_kernel_version_sanity_check)
failed with exit code '1'

Thanks and Regards,
Rohini Gawand

On 9/26/23 19:29, Jonathan Cormier wrote:

RE: Error building kernel and rootfs on host having Ubuntu 23.04 with docker - Added by Jonathan Cormier about 1 year ago

Well isn't that strange. If I checkout the repo fresh, I see the commit. I'm not sure why its not showing up for you. Can you reach out to Tom and he can setup a quick video call with me. I'm sure we can get this sorted pretty quickly.

$ git clone https://support.criticallink.com/git/meta-mitysom.git
$ cd meta-mitysom
$ git checkout dunfell
$ git log
commit f5c59a6706fc3e5611444d9e8f2de3ce8284195b (HEAD -> dunfell, origin/dunfell)
Author: Jonathan Cormier <jcormier@criticallink.com>
Date:   Tue Sep 26 15:15:24 2023 -0400

    wic: Ensure rootfs has atleast 512MB of free space, to ensure tf sdcard doesn't fill up

commit 879124846f87788abb85a5de9c0b391f8a200d2d
Author: Jonathan Cormier <jcormier@criticallink.com>
Date:   Thu Jul 20 09:41:02 2023 -0400

    Remove make-sd-image. Been using wic images so no need

commit 1e8acd44aca4cc39e5f55d1624475ca47b38ac60
Author: Jonathan Cormier <jcormier@criticallink.com>
Date:   Fri Sep 1 12:57:52 2023 -0400

    linux-cl-ti_5.10: Update linux version to 5.10.168   ***********************************

commit 93c95190ff9b16d572498dc1920d99a2832bf35f
Author: Jonathan Cormier <jcormier@criticallink.com>
Date:   Tue Aug 8 14:41:30 2023 -0400

    conf: am57x/l138: Move mitysom.inc include to top so WKS_FILE gets set correctly

RE: Error building kernel and rootfs on host having Ubuntu 23.04 with docker - Added by Jonathan Cormier about 1 year ago

On the video call it was discovered that our wiki page was still calling out the "-config processor-sdk-08.05.00.21-cl-config.txt", this has been updated to "-config processor-sdk-08.06.00-cl-config.txt".

We also went over the use of the ./62x-setup.sh and ./62-build.sh scripts to do incremental builds to help speed up development. As well as manually entering the docker container. And running bitbake yourself.

$ ./docker-poky.sh ./62x-setup.sh 
$ ./docker-poky.sh ./62x-build.sh 

RE: Error building kernel and rootfs on host having Ubuntu 23.04 with docker - Added by Jonathan Cormier about 1 year ago

I forgot to mention, the resulting sdcard image is setup for the newer high security SOMs by default. To boot your devkit, you'll need to mount the boot partition on the sdcard and rename tiboot3-am62x-gp-evm.bin to tiboot3.bin.
This is mentioned briefly here: https://support.criticallink.com/redmine/projects/mitysom_am62x/wiki/Repositories_and_Pre-built_Images

RE: Error building kernel and rootfs on host having Ubuntu 23.04 with docker - Added by Rohini Gawand about 1 year ago

Thank you for the support, the build was successful and got the final
artifacts. Regarding booting thorough SD card, the mentioned steps will
be considered.

Thanks and Regards,
Rohini Gawand

On 10/6/23 00:10, Jonathan Cormier wrote:

RE: Error building kernel and rootfs on host having Ubuntu 22.04 desktop with docker - Added by Rohini Gawand about 1 year ago

Hi Jonathan,
   We are trying to follow steps on Ubuntu 22.04 desktop with following
command and facing some Errors. Kindly find attached build log for details.

Link:
*https://support.criticallink.com/redmine/projects/mitysom_am62x/wiki/Yoctomitysomam62
*Cmd:
IMAGE=crops/poky:ubuntu-18.04 ./meta-mitysom/build/docker-poky.sh
./meta-mitysom/build/build_MitySOM-TIProcessorSDK.sh \
 -config  processor-sdk-08.06.00-cl-config.txt \
 -machine mitysom-am62x \
 -armv7_chain gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf \
 -armv8_chain gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu \
 -armv7_url
https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz
\
 -armv8_url
https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
\
 tisdk-base-image tisdk-default-image

Thanks and Regards,
Rohini Gawand
//
On 10/6/23 08:39, Rohini Gawand wrote:

Thank you for the support, the build was successful and got the final
artifacts. Regarding booting thorough SD card, the mentioned steps
will be considered.

Thanks and Regards,
Rohini Gawand

On 10/6/23 00:10, Jonathan Cormier wrote:

RE: Error building kernel and rootfs on host having Ubuntu 23.04 with docker - Added by Jonathan Cormier about 1 year ago

Hi Rohini,

I'm not sure why this happens, however especially when all the failed packages are "native" packages and the errors always seem to mention missing files.

I've had good luck cleaning and rebuilding just the failed packages before starting a full build again.

  • Enter build environment
    $ ./docker-poky.sh
    # Copied from 62x-build.sh script
    pokyuser@fb1c3d8ec3f1:/work$ export TOOLCHAIN_PATH_ARMV7=$PWD/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf
    pokyuser@fb1c3d8ec3f1:/work$ export TOOLCHAIN_PATH_ARMV8=$PWD/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu
    pokyuser@fb1c3d8ec3f1:/work$ export TI_SECURE_DEV_PKG_K3=$PWD/core-secdev-k3
    pokyuser@fb1c3d8ec3f1:/work$ export MACHINE=mitysom-am62x
    pokyuser@fb1c3d8ec3f1:/work$ cd build/
    pokyuser@fb1c3d8ec3f1:/work/build$ source conf/setenv
    
  • First, run a cleanall on all the packages that errored out.
    bitbake --continue -c cleanall mc:k3r5-hs-fs:readline-native \
         mc:k3r5-hs-fs:libcap-ng-native \
         mc:k3r5-hs-fs:libpcre2-native \
         mc:k3r5-hs-fs:libnsl2-native \
         mc:k3r5-hs-fs:expat-native \
         mc:k3r5-hs-fs:e2fsprogs-native \
         mc:k3r5-hs-fs:dbus-native \
         mc:k3r5-hs-fs:rpm-native \
         mc:k3r5-hs-fs:u-boot-tools-native \
         mc:k3r5-hs-se:openssl-native \
         mc:k3r5-hs-se:readline-native \
         mc:k3r5-hs-se:libpcre2-native \
         mc:k3r5-hs-se:libcap-ng-native \
         mc:k3r5-hs-se:kern-tools-native \
         mc:k3r5-hs-se:libnsl2-native \
         mc:k3r5-hs-se:unzip-native \
         mc:k3r5-hs-se:expat-native \
         mc:k3r5-hs-se:e2fsprogs-native \
         mc:k3r5-hs-se:dbus-native \
         mc:k3r5-hs-se:kern-tools-native \
         mc:k3r5-hs-se:rpm-native \
         mc:k3r5-hs-se:ti-k3-secdev-native \
         mc:k3r5-hs-fs:gettext-minimal-native \
         mc:k3r5-hs-fs:libtool-native \
         mc:k3r5-hs-fs:perl-native \
         mc:k3r5-hs-se:external-arm-toolchain \
         mc:k3r5-hs-se:u-boot-tools-native
    
  • The clean on mc:k3r5-hs-se:u-boot-tools-native failed so I reran it all by itself
    bitbake -c cleanall mc:k3r5-hs-se:u-boot-tools-native
    
  • I then ran the build on all these packages
    bitbake --continue mc:k3r5-hs-fs:readline-native \
         mc:k3r5-hs-fs:libcap-ng-native \
         mc:k3r5-hs-fs:libpcre2-native \
         mc:k3r5-hs-fs:libnsl2-native \
         mc:k3r5-hs-fs:expat-native \
         mc:k3r5-hs-fs:e2fsprogs-native \
         mc:k3r5-hs-fs:dbus-native \
         mc:k3r5-hs-fs:rpm-native \
         mc:k3r5-hs-fs:u-boot-tools-native \
         mc:k3r5-hs-se:openssl-native \
         mc:k3r5-hs-se:readline-native \
         mc:k3r5-hs-se:libpcre2-native \
         mc:k3r5-hs-se:libcap-ng-native \
         mc:k3r5-hs-se:kern-tools-native \
         mc:k3r5-hs-se:libnsl2-native \
         mc:k3r5-hs-se:unzip-native \
         mc:k3r5-hs-se:expat-native \
         mc:k3r5-hs-se:e2fsprogs-native \
         mc:k3r5-hs-se:dbus-native \
         mc:k3r5-hs-se:kern-tools-native \
         mc:k3r5-hs-se:rpm-native \
         mc:k3r5-hs-se:ti-k3-secdev-native \
         mc:k3r5-hs-fs:gettext-minimal-native \
         mc:k3r5-hs-fs:libtool-native \
         mc:k3r5-hs-fs:perl-native \
         mc:k3r5-hs-se:external-arm-toolchain \
         mc:k3r5-hs-se:u-boot-tools-native
    
  • The readline package decided it was going to be difficult so I ran it by itself
    bitbake mc:k3r5-hs-se:readline-native
    
  • After the original problem packages build successfully the full build should work

Yocto should not have issues building packages like this, it seems likely there is a race condition introduced somewhere, possibly in one of TI's meta layers. Hopefully, they figure it out...

    (1-12/12)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)