Issue setting custom kernel arguments for torizon using torizoncore-builder

Hi,

I’m trying to recognize my fpga as sram through the eim of my apalis imx6 board runing under torizon 5.3.

The eim interface works well thanks to the following device tree overlay:

&weim {
    compatible = "fsl,syctrl-eim-driver";
	pinctrl-names = "default";	

	fsl,weim-cs-gpr = <&gpr>;
	status = "okay";

	ranges = <0 0 0x08000000 0x08000000>;
	/* FPGA on CS0 */

	sram: sram@0,0 {
		compatible = "mtd-ram";
		reg = <0 0x00000000 0x00040000>;
		bank-width = <2>;
		linux,mtd-name = "mtd-ram0.0";
		        fsl,weim-cs-timing = <0x00610001 0x00000000 0x0E022000
                 0x00000000 0x1c092480 0x00000000>;
		#address-cells = <1>;
		#size-cells = <1>;
	};
};

The issue is that even if I can communicate with my fpga memory using devmem and reading adresses like 0x0800001A, I can’t find the /dev/mtd-ram0.0 file in my filesystem.

I think that my issue can be related with my kernel configuration. Indeed as you can see just below, the value of certain arguments are not set.

apalis-imx6-10571917:~$ zcat /proc/config.gz | grep MTD_ROM
# CONFIG_MTD_ROM is not set

I’m now trying to configure these values using torizon-core builder. I run the following commands:

rfonck@LAPTOP:~/tcb-sourceFiles$ torizoncore-builder kernel set_custom_args "CONFIG_MTD_ROM=y" "CONFIG_MTD_RAM=
y" "CONFIG_MTD_PHYSMAP=y"
'custom-kargs_overlay.dts' compiles successfully.
Overlay custom-kargs_overlay.dtbo successfully applied.
Kernel custom arguments successfully configured with "CONFIG_MTD_ROM=y CONFIG_MTD_RAM=y CONFIG_MTD_PHYSMAP=y".

rfonck@LAPTOP:~/tcb-sourceFiles$ torizoncore-builder kernel get_custom_args
    Currently configured custom kernel arguments: "CONFIG_MTD_ROM=y CONFIG_MTD_RAM=y CONFIG_MTD_PHYSMAP=y".

rfonck@LAPTOP:~/tcb-sourceFiles$ torizoncore-builder union  dt
    Applying changes from STORAGE/dt.
    Commit 8cd58d9bf99dada44b65bc007a3f6073da24d04832363d85567db00e2bccf9b2 has been generated for changes and is ready to be deployed.

rfonck@LAPTOP:~/tcb-sourceFiles$ torizoncore-builder deploy dt --remote-host 192.168.137.229 --remote-username torizon --remote-password syctrl --reboot
    Pulling OSTree with ref dt (checksum 8cd58d9bf99dada44b65bc007a3f6073da24d04832363d85567db00e2bccf9b2) from local archive repository...
    Starting http server to serve OSTree.
    Starting OSTree pull on the device...
    Deploying new OSTree on the device...
    Deploying successfully finished.
    Device reboot initiated...

But I don’t see any changes in the values I try to configure:

apalis-imx6-10571917:~$  zcat /proc/config.gz | grep PHYSMAP
   # CONFIG_MTD_PHYSMAP is not set
apalis-imx6-10571917:~$  zcat /proc/config.gz | grep MTD_ROM
   # CONFIG_MTD_ROM is not set
apalis-imx6-10571917:~$  zcat /proc/config.gz | grep MTD_RAM
   # CONFIG_MTD_RAM is not set

If you have any idea of what can causes my issue or an advise to give for me, feel free to answer. It will be very helpful.

Thanks a lot.

rfonck

Greetings @rfonck,

The kernel set_custom_args command is not for enabling additional Kernel configs, it’s for adding new arguments to the kernel command line: The kernel’s command-line parameters — The Linux Kernel documentation

As for enabling CONFIG_MTD_ROM, you’ll need to recompile/rebuild the kernel via Yocto: Build TorizonCore from Source With Yocto Project/OpenEmbedded | Toradex Developer Center

Additionally I could make a request on your behalf to include CONFIG_MTD_ROM, in our default config. Would you like me to make this request for you? Please note this is only a request and not a guarantee that this configs will be accepted into our default config.

In case you do want me to make this request is this the only config you require? CONFIG_MTD_ROM or are there other configs you need as well?

Best Regards,
Jeremias

Hi,
thanks a lot for your quick answer.

I tried to follow step described to rebuild the kernel but I meet the following error:

C:\Users\rfonc>docker run --rm -it --name=crops -v \\wsl$\Ubuntu-18.04\home\rfonck\yocto-workdir:/workdir --workdir=/workdir -e MACHINE=apalis-imx6 -e DISTRO=torizon -e IMAGE=torizon-core-docker torizon/crops:dunfell-5.x.y startup-tdx.sh

... A new version of repo (2.15) is available.
... New version is available at: /workdir/torizon/.repo/repo/repo
... The launcher is run from: /bin/repo
!!! The launcher is not writable.  Please talk to your sysadmin or distro
!!! to get an update installed.

nothing to commit (working directory clean)

Welcome to Toradex TorizonCore

For more information about OpenEmbedded see their website:

    http://www.openembedded.org/

Your build environemnt has been configured with:

    MACHINE = apalis-imx6
    SDKMACHINE = x86_64
    DISTRO = torizon

You can now run 'bitbake <target>'

Some of common targets are:

    torizon-core-docker
    torizon-core-podman
    torizon-core-lite

Build environment configured. Building target image torizon-core-docker
> DISTRO=torizon MACHINE=apalis-imx6 bitbake torizon-core-docker
WARNING: You are running bitbake under WSLv2, this works properly but you should optimize your VHDX file eventually to avoid running out of storage space
Parsing recipes:  99% |################################################################################# | ETA:Parsing recipes: 100% |##################################################################################| Time: 0:03:22
Parsing of 2679 .bb files complete (0 cached, 2679 parsed). 3892 targets, 599 skipped, 2 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "debian-10"
TARGET_SYS           = "arm-tdx-linux-gnueabi"
MACHINE              = "apalis-imx6"
DISTRO               = "torizon"
DISTRO_VERSION       = "5.3.0-devel-20210621160102+build.0"
TUNE_FEATURES        = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU           = "hard"
meta-toradex-torizon = "HEAD:ebe4f460ef1850551a4b66bf82dd480c178a93a1"
meta-toradex-distro  = "HEAD:a12eef0d00f2dce08e65ac3b70075a21abc5c5dc"
meta-toradex-bsp-common = "HEAD:2c539036e3421150b29336fc926b2678df589206"
meta-oe
meta-networking
meta-filesystems
meta-python
meta-perl            = "HEAD:11eae114522a6befa06c7f4021a83bc016133543"
meta-virtualization  = "HEAD:92cd3467502bd27b98a76862ca6525ce425a8479"
meta-updater         = "HEAD:b1bb00f4b645e7ab5cf6af4a6579df8b0f24e079"
meta-toradex-nxp     = "HEAD:ce70bcafb720725ef78fb3f47c2da153372099fa"
meta-freescale       = "HEAD:0173d3f8d0cbf7844a4d23bc3fb30144abc914bb"
meta-freescale-3rdparty = "HEAD:a7b96dc91bb2818d8ed8210654db10d08d4d7890"
meta-yocto-bsp
meta-poky            = "HEAD:134c1e9902148f907d4f9e78435fa3a827c6df03"
meta-security        = "HEAD:93232ae6d52b0d1968aa0ce69fa745e85e3bbc6b"
meta-lmp-base        = "HEAD:4bc19dd07a748301bbd8314f454c35a6ceb77880"
meta                 = "HEAD:ecd636154e7cfc1349a7cfd8026a85eafa219535"

Initialising tasks: 100% |###############################################################| Time: 0:00:07Sstate summary: Wanted 2122 Found 1191 Missed 931 Current 0 (56% match, 0% complete)
NOTE: Executing Tasks
WARNING: go-systemd-4+gitAUTOINC+b4a58d9518-r0 do_fetch: Failed to fetch URL git://github.com/coreos/go-systemd.git, attempting MIRRORS if available
ERROR: go-systemd-4+gitAUTOINC+b4a58d9518-r0 do_fetch: Fetcher failure: Unable to find revision b4a58d95188dd092ae20072bac14cece0e67c388 in branch master even from upstream
ERROR: go-systemd-4+gitAUTOINC+b4a58d9518-r0 do_fetch: Fetcher failure for URL: 'git://github.com/coreos/go-systemd.git'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /workdir/torizon/build-torizon/tmp/work/armv7at2hf-neon-tdx-linux-gnueabi/go-systemd/4+gitAUTOINC+b4a58d9518-r0/temp/log.do_fetch.3231
ERROR: Task (/workdir/torizon/build-torizon/conf/../../layers/meta-virtualization/recipes-devtools/go/go-systemd_git.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3743 tasks of which 2897 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 6 seconds

Summary: 1 task failed:
  /workdir/torizon/build-torizon/conf/../../layers/meta-virtualization/recipes-devtools/go/go-systemd_git.bb:do_fetch
Summary: There were 2 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

I undestood that the script can’t fetch a repository but how can I adress this error ?

thank you very much for your suggestion but It is too early for me to tell which options I really need. I know that CONFIG_MTD_ROM, CONFIG_MTD_RAM and CONFIG_MTD_PHYSMAP can be useful butI will maybe use others too. I will try to rebuild the kernel and see which configuration works.

Best Regards,
rfonck

That repository is out of Toradex’s control so I can’t say for certain what the issue is. Can you fetch the repository manually with git? Perhaps it was just a temporary connection hiccup on that server at the moment of your build, does this fetching error happen every time?

Best Regards,
Jeremias

Thank you for your quick reply.

This is pretty strange because when I run it manually I don’t have any error.

Using git bash I have:

rfonc@LAPTOP-LTG4PETV MINGW64 ~
$ git clone git://github.com/coreos/go-systemd.git
Cloning into 'go-systemd'...
remote: Enumerating objects: 2156, done.
remote: Counting objects: 100% (116/116), done.
remote: Compressing objects: 100% (82/82), done.
remote: Total 2156 (delta 48), reused 73 (delta 29), pack-reused 2040
Receiving objects: 100% (2156/2156), 707.46 KiB | 429.00 KiB/s, done.
Resolving deltas: 100% (1119/1119), done.

But now when I run the following command I have 4 errors now:

C:\Users\rfonc>docker run --rm -it --name=crops -v \\wsl$\Ubuntu-18.04\home\rfonck\yocto-workdir:/workdir --workdir=/workdir -e MACHINE=apalis-imx6 -e DISTRO=torizon -e IMAGE=torizon-core-docker torizon/crops:dunfell-5.x.y startup-tdx.sh

... A new version of repo (2.15) is available.
... New version is available at: /workdir/torizon/.repo/repo/repo
... The launcher is run from: /bin/repo
!!! The launcher is not writable.  Please talk to your sysadmin or distro
!!! to get an update installed.

nothing to commit (working directory clean)
Build environment configured. Building target image torizon-core-docker
> DISTRO=torizon MACHINE=apalis-imx6 bitbake torizon-core-docker
Loading cache: 100% |####################################################################################| Time: 0:00:01
Loaded 3892 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-tdx-linux-gnueabi"
MACHINE              = "apalis-imx6"
DISTRO               = "torizon"
DISTRO_VERSION       = "5.3.0-devel-20210622182435+build.0"
TUNE_FEATURES        = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU           = "hard"
meta-toradex-torizon = "HEAD:ebe4f460ef1850551a4b66bf82dd480c178a93a1"
meta-toradex-distro  = "HEAD:a12eef0d00f2dce08e65ac3b70075a21abc5c5dc"
meta-toradex-bsp-common = "HEAD:2c539036e3421150b29336fc926b2678df589206"
meta-oe
meta-networking
meta-filesystems
meta-python
meta-perl            = "HEAD:11eae114522a6befa06c7f4021a83bc016133543"
meta-virtualization  = "HEAD:92cd3467502bd27b98a76862ca6525ce425a8479"
meta-updater         = "HEAD:b1bb00f4b645e7ab5cf6af4a6579df8b0f24e079"
meta-toradex-nxp     = "HEAD:ce70bcafb720725ef78fb3f47c2da153372099fa"
meta-freescale       = "HEAD:0173d3f8d0cbf7844a4d23bc3fb30144abc914bb"
meta-freescale-3rdparty = "HEAD:a7b96dc91bb2818d8ed8210654db10d08d4d7890"
meta-yocto-bsp
meta-poky            = "HEAD:134c1e9902148f907d4f9e78435fa3a827c6df03"
meta-security        = "HEAD:93232ae6d52b0d1968aa0ce69fa745e85e3bbc6b"
meta-lmp-base        = "HEAD:4bc19dd07a748301bbd8314f454c35a6ceb77880"
meta                 = "HEAD:ecd636154e7cfc1349a7cfd8026a85eafa219535"

Initialising tasks: 100% |###############################################################################| Time: 0:00:05
Sstate summary: Wanted 1040 Found 166 Missed 874 Current 1082 (15% match, 58% complete)
NOTE: Executing Tasks
ERROR: linux-toradex-5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0 do_compile: oe_runmake failed
ERROR: linux-toradex-5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0 do_compile: Execution of '/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/temp/run.do_compile.270' failed with exit code 1:
  GEN     Makefile
  CALL    /workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/atomic/check-atomics.sh
  CALL    /workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC      drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.o
  AR      drivers/gpu/drm/omapdrm/displays/built-in.a
  AR      drivers/gpu/drm/omapdrm/dss/built-in.a
/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c: In function 'ipu_drm_bind':
/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c:448:2: error: 'ret' undeclared (first use in this function); did you mean 'net'?
  448 |  ret = ipu_crtc_init(ipu_crtc, pdata, drm);
      |  ^~~
      |  net
/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c:448:2: note: each undeclared identifier is reported only once for each function it appears in
  AR      drivers/gpu/drm/omapdrm/built-in.a
make[6]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/Makefile.build:262: drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.o] Error 1
make[5]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/Makefile.build:496: drivers/gpu/drm/imx/ipuv3] Error 2
make[4]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/Makefile.build:496: drivers/gpu/drm/imx] Error 2
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/Makefile.build:496: drivers/gpu/drm] Error 2
make[2]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/Makefile.build:496: drivers/gpu] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/Makefile:1734: drivers] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/Makefile:179: sub-make] Error 2
WARNING: /workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/temp/run.do_compile.270:1 exit 1 from 'exit 1'

ERROR: Logfile of failure stored in: /workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/temp/log.do_compile.270
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: KBUILD_BUILD_TIMESTAMP: Thu May 27 21:52:13 UTC 2021
| NOTE: make -j 4 HOSTCC=gcc  -isystem/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/recipe-sysroot-native/usr/lib                         -L/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/recipe-sysroot-native/lib                         -Wl,-rpath,/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/workdir/torizon/build-torizon/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc  -E HOSTCXX=g++  -isystem/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/recipe-sysroot-native/usr/lib                         -L/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/recipe-sysroot-native/lib                         -Wl,-rpath,/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/workdir/torizon/build-torizon/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 zImage CC=arm-tdx-linux-gnueabi-gcc  -mno-thumb-interwork -marm -fuse-ld=bfd -fmacro-prefix-map=/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0=/usr/src/debug/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0                      -fdebug-prefix-map=/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0=/usr/src/debug/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0                      -fdebug-prefix-map=/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/recipe-sysroot=                      -fdebug-prefix-map=/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/recipe-sysroot-native=  -fdebug-prefix-map=/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source=/usr/src/kernel   LD=arm-tdx-linux-gnueabi-ld.bfd   LOADADDR=0x11000000
|   GEN     Makefile
|   CALL    /workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/atomic/check-atomics.sh
|   CALL    /workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/checksyscalls.sh
|   CHK     include/generated/compile.h
|   CC      drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.o
|   AR      drivers/gpu/drm/omapdrm/displays/built-in.a
|   AR      drivers/gpu/drm/omapdrm/dss/built-in.a
| /workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c: In function 'ipu_drm_bind':
| /workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c:448:2: error: 'ret' undeclared (first use in this function); did you mean 'net'?
|   448 |  ret = ipu_crtc_init(ipu_crtc, pdata, drm);
|       |  ^~~
|       |  net
| /workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c:448:2: note: each undeclared identifier is reported only once for each function it appears in
|   AR      drivers/gpu/drm/omapdrm/built-in.a
| make[6]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/Makefile.build:262: drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.o] Error 1
| make[5]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/Makefile.build:496: drivers/gpu/drm/imx/ipuv3] Error 2
| make[4]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/Makefile.build:496: drivers/gpu/drm/imx] Error 2
| make[4]: *** Waiting for unfinished jobs....
| make[3]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/Makefile.build:496: drivers/gpu/drm] Error 2
| make[2]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/Makefile.build:496: drivers/gpu] Error 2
| make[2]: *** Waiting for unfinished jobs....
| make[1]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/Makefile:1734: drivers] Error 2
| make[1]: *** Waiting for unfinished jobs....
| make: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/Makefile:179: sub-make] Error 2
| ERROR: oe_runmake failed
| WARNING: /workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/temp/run.do_compile.270:1 exit 1 from 'exit 1'
| ERROR: Execution of '/workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/temp/run.do_compile.270' failed with exit code 1:
|   GEN     Makefile
|   CALL    /workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/atomic/check-atomics.sh
|   CALL    /workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/checksyscalls.sh
|   CHK     include/generated/compile.h
|   CC      drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.o
|   AR      drivers/gpu/drm/omapdrm/displays/built-in.a
|   AR      drivers/gpu/drm/omapdrm/dss/built-in.a
| /workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c: In function 'ipu_drm_bind':
| /workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c:448:2: error: 'ret' undeclared (first use in this function); did you mean 'net'?
|   448 |  ret = ipu_crtc_init(ipu_crtc, pdata, drm);
|       |  ^~~
|       |  net
| /workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c:448:2: note: each undeclared identifier is reported only once for each function it appears in
|   AR      drivers/gpu/drm/omapdrm/built-in.a
| make[6]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/Makefile.build:262: drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.o] Error 1
| make[5]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/Makefile.build:496: drivers/gpu/drm/imx/ipuv3] Error 2
| make[4]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/Makefile.build:496: drivers/gpu/drm/imx] Error 2
| make[4]: *** Waiting for unfinished jobs....
| make[3]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/Makefile.build:496: drivers/gpu/drm] Error 2
| make[2]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/scripts/Makefile.build:496: drivers/gpu] Error 2
| make[2]: *** Waiting for unfinished jobs....
| make[1]: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/Makefile:1734: drivers] Error 2
| make[1]: *** Waiting for unfinished jobs....
| make: *** [/workdir/torizon/build-torizon/tmp/work-shared/apalis-imx6/kernel-source/Makefile:179: sub-make] Error 2
| WARNING: /workdir/torizon/build-torizon/tmp/work/apalis_imx6-tdx-linux-gnueabi/linux-toradex/5.4.115+gitAUTOINC+e4c8d52727_64dbf17bb3-r0/temp/run.do_compile.270:1 exit 1 from 'exit 1'
|
ERROR: Task (/workdir/torizon/build-torizon/conf/../../layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_5.4-2.3.x.bb:do_compile) failed with exit code '1'
WARNING: go-systemd-4+gitAUTOINC+b4a58d9518-r0 do_fetch: Failed to fetch URL git://github.com/coreos/go-systemd.git, attempting MIRRORS if available
ERROR: go-systemd-4+gitAUTOINC+b4a58d9518-r0 do_fetch: Fetcher failure: Unable to find revision b4a58d95188dd092ae20072bac14cece0e67c388 in branch master even from upstream
ERROR: go-systemd-4+gitAUTOINC+b4a58d9518-r0 do_fetch: Fetcher failure for URL: 'git://github.com/coreos/go-systemd.git'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /workdir/torizon/build-torizon/tmp/work/armv7at2hf-neon-tdx-linux-gnueabi/go-systemd/4+gitAUTOINC+b4a58d9518-r0/temp/log.do_fetch.1385
ERROR: Task (/workdir/torizon/build-torizon/conf/../../layers/meta-virtualization/recipes-devtools/go/go-systemd_git.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3994 tasks of which 3988 didn't need to be rerun and 2 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 1 seconds

Summary: 2 tasks failed:
  /workdir/torizon/build-torizon/conf/../../layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_5.4-2.3.x.bb:do_compile
  /workdir/torizon/build-torizon/conf/../../layers/meta-virtualization/recipes-devtools/go/go-systemd_git.bb:do_fetch
Summary: There was 1 WARNING message shown.
Summary: There were 4 ERROR messages shown, returning a non-zero exit code.

I don’t understand why it works using git and not in the script. If you have any idea about the origin of my problem I will be very grateful.

Best regards,
rfonck

I’m not sure what is the issue to be honest. Why have your errors changed since the first time? Now the fetch error can’t find a specific commit in the source: Unable to find revision b4a58d95188dd092ae20072bac14cece0e67c388 in branch master even from upstream

Also that compile error for the linux-toradex kernel seems weird and shouldn’t exist, seeing as we build our kernels almost every day for testing. I noticed you’re running this inside WSL on Windows. Last I checked the Yocto build container should work on windows but your errors seem very strange. Do you have a linux machine that you can do the build on as a sanity check?

Best Regards,
Jeremias

Hi,

I tried to compile it from a Virtual machine running xubuntu (I know this solution is deprecated but I don’t have any other linux machine …)

the script is running since approximately 13 hours (my machine is not the most efficient). I don’t have error messages for now but I have the feeling that a thread is stuck.

I have the first line of the “building summary” that shows :

0: linux-toradex-mainline-5.4.77+gitAUTOINC+e4c8d52727_7aaf6c2823-r0 do_fetch (pid 476006) |   <=>                 |

since 10 hours approximately. The task manager don’t show any cpu usage in any of his child.

you can find the full message here :

However I think that my machine have the good prerequisite to compile it.

syctrl@syctrl-VirtualBox:~$ git --version
git version 2.25.1
syctrl@syctrl-VirtualBox:~$ tar --version
tar (GNU tar) 1.30
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
syctrl@syctrl-VirtualBox:~$ gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

syctrl@syctrl-VirtualBox:~$ python --version
Python 3.8.5

Is it an usual behavior for this script to be stuck for a long time on this process ?

Best regards,
rfonck

Hi,
my compilation finished with the same error:

syctrl@syctrl-VirtualBox:~/build$ bitbake torizon-core-docker
Loading cache: 100% |############################################| Time: 0:00:03
Loaded 3892 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-tdx-linux-gnueabi"
MACHINE              = "apalis-imx6"
DISTRO               = "torizon-upstream"
DISTRO_VERSION       = "5.3.0-devel-20210624065748+build.0"
TUNE_FEATURES        = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU           = "hard"
meta-toradex-torizon = "HEAD:ebe4f460ef1850551a4b66bf82dd480c178a93a1"
meta-toradex-distro  = "HEAD:a12eef0d00f2dce08e65ac3b70075a21abc5c5dc"
meta-toradex-bsp-common = "HEAD:2c539036e3421150b29336fc926b2678df589206"
meta-oe              
meta-networking      
meta-filesystems     
meta-python          
meta-perl            = "HEAD:11eae114522a6befa06c7f4021a83bc016133543"
meta-virtualization  = "HEAD:92cd3467502bd27b98a76862ca6525ce425a8479"
meta-updater         = "HEAD:b1bb00f4b645e7ab5cf6af4a6579df8b0f24e079"
meta-toradex-nxp     = "HEAD:ce70bcafb720725ef78fb3f47c2da153372099fa"
meta-freescale       = "HEAD:0173d3f8d0cbf7844a4d23bc3fb30144abc914bb"
meta-freescale-3rdparty = "HEAD:a7b96dc91bb2818d8ed8210654db10d08d4d7890"
meta-yocto-bsp       
meta-poky            = "HEAD:134c1e9902148f907d4f9e78435fa3a827c6df03"
meta-security        = "HEAD:93232ae6d52b0d1968aa0ce69fa745e85e3bbc6b"
meta-lmp-base        = "HEAD:4bc19dd07a748301bbd8314f454c35a6ceb77880"
meta                 = "HEAD:ecd636154e7cfc1349a7cfd8026a85eafa219535"

Initialising tasks: 100% |#######################################| Time: 0:00:10
WARNING: go-systemd-4+gitAUTOINC+b4a58d9518-r0 do_fetch: Failed to fetch URL git://github.com/coreos/go-systemd.git, attempting MIRRORS if available
ERROR: go-systemd-4+gitAUTOINC+b4a58d9518-r0 do_fetch: Fetcher failure: Unable to find revision b4a58d95188dd092ae20072bac14cece0e67c388 in branch master even from upstream
ERROR: go-systemd-4+gitAUTOINC+b4a58d9518-r0 do_fetch: Fetcher failure for URL: 'git://github.com/coreos/go-systemd.git'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/syctrl/build/tmp/work/armv7at2hf-neon-tdx-linux-gnueabi/go-systemd/4+gitAUTOINC+b4a58d9518-r0/temp/log.do_fetch.29716
ERROR: Task (/home/syctrl/build/conf/../../layers/meta-virtualization/recipes-devtools/go/go-systemd_git.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3881 tasks of which 3812 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 7 seconds

Summary: 1 task failed:
  /home/syctrl/build/conf/../../layers/meta-virtualization/recipes-devtools/go/go-systemd_git.bb:do_fetch
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

Maybe the error is caused by an issue on my host machine. But I don’t know where to look to resolve this error.

If you have an idea I will be grateful to you.

Best regards,
rfonck

Hello, I’am facing the same issue during the build with Yocto of a standard torizon-core-docker image for the apalis-imx8 machine.
The error:

ERROR: go-systemd-4+gitAUTOINC+b4a58d9518-r0 do_fetch: Fetcher failure: Unable to find revision b4a58d95188dd092ae20072bac14cece0e67c388 in branch master even from upstream

is due to an update of the repository git://github.com/coreos/go-systemd.git
After this update, on 2021-06-21 the recipe meta-virtualization/recipes-devtools/go/go-systemd_git.bb has been updated (see meta-virtualization - Layer enabling hypervisor, virtualization tool stack, and cloud support.)
The new version of the recipe is not in the “toradex environment” at present.

In the meta-virtualization/recipes-devtools/go/go-systemd_git.bb the SRC_URI = "git://${PKG_NAME}.git" should be changed to SRC_URI = "git://${PKG_NAME}.git;branch=main"

@rfonck It seems the issue is as @tpav described. This was a rather recent change in the go-systemd upstream project and we’re still updating our own environment.

In the meantime please manually perform the workaround that @tpav described in his post.

Best Regards,
Jeremias