Lx2160a_build using "runme.sh" fails with mkimage errors

A clean full build using the latest “lx2160a_build” project fails on a clean install of Ubuntu 22.04. This is a fresh VM:

$ git clone https://github.com/SolidRun/lx2160a_build
$ cd lx2160a_build/
$ ./runme.sh


kernel2160cex7.its:15.11-17.6: Warning (unit_address_vs_reg): /images/kernel/hash@1: node has a unit name, but no reg or ranges property
kernel2160cex7.its:28.11-30.6: Warning (unit_address_vs_reg): /images/initrd/hash@1: node has a unit name, but no reg or ranges property
kernel2160cex7.its:40.11-42.6: Warning (unit_address_vs_reg): /images/lx2160acex7-dtb/hash@1: node has a unit name, but no reg or ranges property
mkimage: verify_header failed for FIT Image support with exit code 1
ERROR: Line 416 failed with status 1: mkimage -f kernel2160cex7.its kernel-lx2160acex7.itb

$ mkimage -V
mkimage version 2022.01+dfsg-2ubuntu2.4

$ uname -a
Linux cs-ubuntu 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

I found a post here about a similar issue from Jun-2022, but without a resolution (the thread changed to a different subject).

Attempting to use the docker build per the suggestion in the other thread also fails, as the command to build the docker environment fails:

docker build -t lx2160a_build docker


Setting up python3.7-minimal (3.7.3-2+deb10u5) ...
Traceback (most recent call last):
  File "/usr/lib/python3.7/py_compile.py", line 212, in <module>
  File "/usr/lib/python3.7/py_compile.py", line 204, in main
    compile(filename, doraise=True)
  File "/usr/lib/python3.7/py_compile.py", line 169, in compile
    importlib._bootstrap_external._write_atomic(cfile, bytecode, mode)
  File "<frozen importlib._bootstrap_external>", line 112, in _write_atomic
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.7/__pycache__/__future__.cpython-37.pyc.140504797173552'
dpkg: error processing package python3.7-minimal (--configure):
 installed python3.7-minimal package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command '/bin/sh -c apt-get update ; apt-get -y install --no-install-recommends acpica-tools bc bison build-essential ca-certificates cpio debian-archive-keyring debootstrap device-tree-compiler dosfstools e2tools fakeroot flex fuseext2 g++ gcc git kmod libssl-dev make meson mtools multistrap ninja-build p7zip p7zip-full pandoc parted python python2 python3 qemu-system-arm rsync squashfs-tools sudo tar u-boot-tools unzip wget xz-utils' returned a non-zero code: 100

The issue with building the Docker environment is resolved - this was due to a known access issue when using the snap version of Docker; removing and reinstalling via “sudo apt install docker.io” worked.

However, the “lx2160a_build” project still does not build using the docker command:

$ docker run --rm -i -t -v "$PWD":/work lx2160a_build -u $(id -u) -g $(id -g)

Repository prefix for images is ebbc467
Checking all required tools are installed
--2023-08-17 09:02:30--  https://releases.linaro.org/components/toolchain/binaries/7.4-2019.02/aarch64-linux-gnu/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz
Resolving releases.linaro.org (releases.linaro.org)...
Connecting to releases.linaro.org (releases.linaro.org)||:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://publishing-ie-linaro-org.s3.amazonaws.com/releases/components/toolchain/binaries/7.4-2019.02/aarch64-linux-gnu/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz?Signature=ImM908ESyaQWXDT56x0T%2FUkrIR4%3D&Expires=1692263042&AWSAccessKeyId=AKIAIELXV2RYNAHFUP7A [following]
--2023-08-17 09:02:32--  https://publishing-ie-linaro-org.s3.amazonaws.com/releases/components/toolchain/binaries/7.4-2019.02/aarch64-linux-gnu/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz?Signature=ImM908ESyaQWXDT56x0T%2FUkrIR4%3D&Expires=1692263042&AWSAccessKeyId=AKIAIELXV2RYNAHFUP7A
Resolving publishing-ie-linaro-org.s3.amazonaws.com (publishing-ie-linaro-org.s3.amazonaws.com)...,,, ...
Connecting to publishing-ie-linaro-org.s3.amazonaws.com (publishing-ie-linaro-org.s3.amazonaws.com)||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 116883348 (111M) [application/octet-stream]
Saving to: 'gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz'

gcc-linaro-7.4.1-2019.02-x86_64_aarch64 100%[============================================================================>] 111.47M  17.0MB/s    in 12s     

2023-08-17 09:02:43 (9.61 MB/s) - 'gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz' saved [116883348/116883348]


aarch64-linux-gnu-gcc  dprtc_commands.o dpseci_commands.o dpci_commands.o mc_v9/dpmac.o mc_v9/dpmng.o mc_v9/dpdmux.o mc_v9/dpdmai.o mc_v9/dpdbg.o mc_v9/dpbp.o mc_v9/dpni.o mc_v9/dpseci.o mc_v9/dpdcei.o mc_v9/dpmcp.o mc_v9/dpci.o mc_v9/dprtc.o mc_v9/dpio.o mc_v9/dpcon.o mc_v9/dpsw.o mc_v9/dpaiop.o dpdmai_commands.o dpdbg_commands.o dpni_commands.o dpsw_commands.o dpdmux_commands.o mc_v10/dpmac.o mc_v10/dpmng.o mc_v10/dpdmux.o mc_v10/dpdmai.o mc_v10/dpdbg.o mc_v10/dpbp.o mc_v10/dpni.o mc_v10/dpseci.o mc_v10/dpdcei.o mc_v10/dpmcp.o mc_v10/dpci.o mc_v10/dprtc.o mc_v10/dpio.o mc_v10/dpcon.o mc_v10/dpsw.o mc_v10/dprc.o mc_v10/dpaiop.o dprc_commands.o dpdcei_commands.o dpio_commands.o dpmcp_commands.o dprc_commands_generate_dpl.o dpcon_commands.o restool.o dpbp_commands.o common/fsl_mc_sys.o dpaiop_commands.o dpmac_commands.o -o restool -lm
file restool
make: file: Command not found
make: *** [Makefile:48: restool] Error 127
ERROR: Line 280 failed with status 2: CC=${CROSS_COMPILE}gcc DESTDIR=./install prefix=/usr make install

I will look into and get back to you. NXP has just changed their BSP build methodology and we are working to incorporate that into our runme.sh build environment.