Dockerfile: install byacc
PATCH 1/2 Dockerfile: install byacc
Install byacc required to build cst from source.
--- tools/docker/Dockerfile | 1 + 1 file changed, 1 insertion(+)
tools/docker/Dockerfile +1 -0
@@ -64,6 +64,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ binutils-dev \ bison \ build-essential \ + byacc \ cgpt \ clang-17 \ coreutils \
Signature · 1 line
2.34.1
PATCH 2/2 CI: Build missing binman tools before binman tests
The CI image does not ship with all tools required for the binman tests. Have binman build the missing tools.
--- .azure-pipelines.yml | 1 + .gitlab-ci.yml | 1 + 2 files changed, 2 insertions(+)
.azure-pipelines.yml +1 -0
@@ -144,6 +144,7 @@ stages: export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH} ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board tools-only set -ex + ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools tool -f missing ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test ./tools/buildman/buildman -t ./tools/dtoc/dtoc -t
.gitlab-ci.yml +1 -0
@@ -196,6 +196,7 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites: ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board tools-only; set -e; + ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools tool -f missing; ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test; ./tools/buildman/buildman -t; ./tools/dtoc/dtoc -t;
Signature · 1 line
2.34.1
Re: [PATCH 2/2] CI: Build missing binman tools before binman tests
Hi Leonard,
Quoted 5 lines · Leonard Anderweit
The CI image does not ship with all tools required for the binman tests. Have binman build the missing tools.
Signed-off-by Leonard Anderweit <[email protected]>
I applied this series with Marek's patch on top.
I get the following CI error. Please take a look:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/1084138/raw
Starting build...
0 0 0 /1 -1 (starting)
1 0 0 /1 tools-only
Completed: 1 total built, 1 newly), duration 0:00:20, rate 0.05
Fetching tools: bootgen bzip2 cbfstool cst fdt_add_pubkey fdtgrep
fiptool futility gzip ifwitool lz4 lzma_alone lzop mkeficapsule
mkimage openssl xz zstd
Fetch: cbfstool
- trying method: binary download
- downloading: https://drive.google.com/uc?export=download&id=1gxNxRuJgD0Iiy9LAPCSB_0959eJCp98g
0 MiB [ 4%] 0 MiB [
9%] 0 MiB [
14%] 0 MiB [ 19%] 0 MiB [ 24%] 0 MiB [ 29%] 0 MiB [ 34%] 0 MiB [ 39%] 0 MiB [ 44%] 0 MiB [ 49%] 0 MiB [ 54%] 0 MiB [ 58%] 0 MiB [ 63%] 0 MiB [ 68%] 0 MiB [ 73%] 1 MiB [ 78%] 1 MiB [ 83%] 1 MiB [ 88%] 1 MiB [ 93%] 1 MiB [ 98%] 1 MiB
[100%]
- writing to '/home/uboot/.binman-tools/cbfstool'
Fetch: cst
- trying method: binary download
- trying method: build from source
- clone git repo 'https://gitlab.apertis.org/pkg/imx-code-signing-tool' to '/tmp/binmanf.enbq4kln'
- build target 'all'
Exception: Error 2 running 'make -C /tmp/binmanf.enbq4kln/code/obj.linux64/ -j 40 all OSTYPE=linux64 ENCRYPTION=yes': make: byacc: No such file or directory
make: *** [../build/make/rules.mk:47: cst_parser.c] Error 127
make: *** Waiting for unfinished jobs....
- failed to fetch with all methods
Already present: 16: bootgen bzip2 fdt_add_pubkey fdtgrep fiptool futility gzip ifwitool lz4 lzma_alone lzop mkeficapsule mkimage openssl xz zstd
Tools fetched: 1: cbfstool Failures: 1: cst
/usr/lib/python3.10/os.py:1030: RuntimeWarning: line buffering
(buffering=1) isn't supported in binary mode, the default buffer size
will be used
return io.open(fd, mode, buffering, encoding, *args, **kwargs)/usr/lib/python3.10/os.py:1030: RuntimeWarning: line buffering
(buffering=1) isn't supported in binary mode, the default buffer size
will be used
return io.open(fd, mode, buffering, encoding, *args, **kwargs)
======================== Running binman tests ======================== ..................................................................................................................................................................................................................................................E.......................................................................................................................Image 'image' has missing bintools and is non-functional: cst
Some images are invalid ............................................................................................................................................................................Image 'image' has missing bintools and is non-functional: cst
Some images are invalid
...............................................
======================================================================
ERROR: binman.ftest.TestFunctional.testNxpImx8MCSTMkimageMissing (subunit.RemotedTestCase) binman.ftest.TestFunctional.testNxpImx8MCSTMkimageMissing
----------------------------------------------------------------------
testtools.testresult.real._StringException: struct.error: unpack requires a buffer of 4 bytes
----------------------------------------------------------------------
Ran 581 tests in 8.717s
FAILED (errors=1)
Re: [PATCH 2/2] CI: Build missing binman tools before binman tests
Hi Fabio,
Am Dienstag, dem 01.04.2025 um 08:12 -0300 schrieb Fabio Estevam:
Quoted 20 lines
Hi Leonard,
Quoted 6 lines · Leonard Anderweit
The CI image does not ship with all tools required for the binman tests.
Have binman build the missing tools.Signed-off-by Leonard Anderweit <[email protected]>I applied this series with Marek's patch on top.
I get the following CI error. Please take a look:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/1084138/raw
Starting build...
Quoted 8 lines
0 0 0 /1 -1 (starting)
1 0 0 /1 tools-only
Completed: 1 total built, 1 newly), duration 0:00:20, rate 0.05 Fetching tools: bootgen bzip2 cbfstool cstfdt_add_pubkeyfdtgrep
fiptool futility gzip ifwitool lz4lzma_alonelzop mkeficapsule
binman now fetches the missing build tools.
Quoted 28 lines
mkimage openssl xz zstd
Fetch: cbfstool
- trying method: binary download
- downloading:
https://drive.google.com/uc?export=download&id=1gxNxRuJgD0Iiy9LAPCSB_0959eJCp98g
0 MiB [ 4%] 0 MiB [ 9%] 0 MiB [
14%] 0 MiB [
19%] 0 MiB [
24%] 0 MiB [
29%] 0 MiB [
34%] 0 MiB [
39%] 0 MiB [
44%] 0 MiB [
49%] 0 MiB [
54%] 0 MiB [
58%] 0 MiB [
63%] 0 MiB [
68%] 0 MiB [
73%] 1 MiB [
78%] 1 MiB [
83%] 1 MiB [
88%] 1 MiB [
93%] 1 MiB [
98%] 1 MiB
[100%]
Quoted 11 lines
- writing to '
/home/uboot/.binman-tools/cbfstool'
Fetch: cst
- trying method: binary download
- trying method: build from source
- clone git repo 'https://gitlab.apertis.org/pkg/imx-code-signing-tool' to '/tmp/binmanf.enbq4kln'
- build target 'all'
Exception: Error 2 running 'make -C/tmp/binmanf.enbq4kln/code/obj.linux64/-j 40 all OSTYPE=linux64 ENCRYPTION=yes': make: byacc: No such file or directory
byacc is still missing here. To solve this, the ci build container needs to be rebuild with the first patch of this series. Then we need another patch to reference the new ci build container in the ci pipeline. After that byacc should be available and cst should build without errors.
Leonard
Quoted 51 lines
make: *** [
../build/make/rules.mk:47:cst_parser.c] Error 127
make: *** Waiting for unfinished jobs....- failed to fetch with all methods
Already present: 16: bootgen bzip2fdt_add_pubkeyfdtgrep fiptool futility gzip ifwitool lz4lzma_alonelzop mkeficapsule mkimage openssl xz zstd
Tools fetched: 1: cbfstool
Failures: 1: cst/usr/lib/python3.10/os.py:1030: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
returnio.open(fd, mode, buffering, encoding, *args, **kwargs)/usr/lib/python3.10/os.py:1030: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
returnio.open(fd, mode, buffering, encoding, *args, **kwargs)======================== Running binman tests
========================
.....................................................................
.....................................................................
.....................................................................
...................................E.................................
.....................................................................
.................Image
'image' has missing bintools and is non-functional: cstSome images are invalid
.....................................................................
.....................................................................
..................................Image 'image' has missing bintools and is non-functional: cstSome images are invalid
...............................................
=====================================================================
=
ERROR: binman.ftest.TestFunctional.testNxpImx8MCSTMkimageMissing (subunit.RemotedTestCase) binman.ftest.TestFunctional.testNxpImx8MCSTMkimageMissing
---------------------------------------------------------------------
-
testtools.testresult.real._StringException: struct.error: unpack requires a buffer of 4 bytes---------------------------------------------------------------------
-
Ran 581 tests in 8.717sFAILED (errors=1)
Re: [PATCH 2/2] CI: Build missing binman tools before binman tests
Quoted 73 lines · Leonard Anderweit
Hi Fabio,
Am Dienstag, dem 01.04.2025 um 08:12 -0300 schrieb Fabio Estevam:
Quoted 20 lines
Hi Leonard,
Quoted 6 lines · Leonard Anderweit
The CI image does not ship with all tools required for the binman tests.
Have binman build the missing tools.Signed-off-by Leonard Anderweit <[email protected]>I applied this series with Marek's patch on top.
I get the following CI error. Please take a look:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/1084138/raw
Starting build...
Quoted 8 lines
0 0 0 /1 -1 (starting)
1 0 0 /1 tools-only
Completed: 1 total built, 1 newly), duration 0:00:20, rate 0.05 Fetching tools: bootgen bzip2 cbfstool cstfdt_add_pubkeyfdtgrep
fiptool futility gzip ifwitool lz4lzma_alonelzop mkeficapsulebinman now fetches the missing build tools.
Quoted 28 lines
mkimage openssl xz zstd
Fetch: cbfstool
- trying method: binary download
- downloading:
https://drive.google.com/uc?export=download&id=1gxNxRuJgD0Iiy9LAPCSB_0959eJCp98g
0 MiB [ 4%] 0 MiB [ 9%] 0 MiB [
14%] 0 MiB [
19%] 0 MiB [
24%] 0 MiB [
29%] 0 MiB [
34%] 0 MiB [
39%] 0 MiB [
44%] 0 MiB [
49%] 0 MiB [
54%] 0 MiB [
58%] 0 MiB [
63%] 0 MiB [
68%] 0 MiB [
73%] 1 MiB [
78%] 1 MiB [
83%] 1 MiB [
88%] 1 MiB [
93%] 1 MiB [
98%] 1 MiB
[100%]Quoted 11 lines
- writing to '
/home/uboot/.binman-tools/cbfstool'
Fetch: cst
- trying method: binary download
- trying method: build from source
- clone git repo 'https://gitlab.apertis.org/pkg/imx-code-signing-tool' to '/tmp/binmanf.enbq4kln'
- build target 'all'
Exception: Error 2 running 'make -C/tmp/binmanf.enbq4kln/code/obj.linux64/-j 40 all OSTYPE=linux64 ENCRYPTION=yes': make: byacc: No such file or directory
Quoted 5 lines
byacc is still missing here. To solve this, the ci build container needs to be rebuild with the first patch of this series. Then we need another patch to reference the new ci build container in the ci pipeline. After that byacc should be available and cst should build without errors.
And updating the container is on me. Since this is for -next, I'll pick up this series in the next day or two along with some other Dockerfile changes.
Signature · 1 line
Tom
Re: (subset) [PATCH 1/2] Dockerfile: install byacc
In reply to Leonard AnderweitQuoted 3 lines · Leonard Anderweit
Install byacc required to build cst from source.
Applied to u-boot/master, thanks!
[1/2] Dockerfile: install byacc
commit: d592ebd6b805b37a127151eb8de9261cf799d438
Signature · 1 line
Tom
Re: (subset) [PATCH 1/2] Dockerfile: install byacc
In reply to Leonard AnderweitQuoted 3 lines · Leonard Anderweit
Install byacc required to build cst from source.
Applied to u-boot/master, thanks!
[2/2] CI: Build missing binman tools before binman tests
commit: 1e5e45983d80776426d4b4e467531b29f52cbc4b
Signature · 1 line
Tom