U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Dockerfile: install byacc
@ 2025-04-01  8:46 Leonard Anderweit
  2025-04-01  8:46 ` [PATCH 2/2] CI: Build missing binman tools before binman tests Leonard Anderweit
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Leonard Anderweit @ 2025-04-01  8:46 UTC (permalink / raw)
  To: u-boot; +Cc: trini, sjg, festevam, marex, upstream

Install byacc required to build cst from source.

Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
---
 tools/docker/Dockerfile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index 569912303fc9..60f63c2d73dc 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -64,6 +64,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
 	binutils-dev \
 	bison \
 	build-essential \
+	byacc \
 	cgpt \
 	clang-17 \
 	coreutils \
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] CI: Build missing binman tools before binman tests
  2025-04-01  8:46 [PATCH 1/2] Dockerfile: install byacc Leonard Anderweit
@ 2025-04-01  8:46 ` Leonard Anderweit
  2025-04-01 11:12   ` Fabio Estevam
  2025-04-10 17:33 ` (subset) [PATCH 1/2] Dockerfile: install byacc Tom Rini
  2025-04-11 19:16 ` Tom Rini
  2 siblings, 1 reply; 7+ messages in thread
From: Leonard Anderweit @ 2025-04-01  8:46 UTC (permalink / raw)
  To: u-boot; +Cc: trini, sjg, festevam, marex, upstream

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 <l.anderweit@phytec.de>
---
 .azure-pipelines.yml | 1 +
 .gitlab-ci.yml       | 1 +
 2 files changed, 2 insertions(+)

diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index d5cfa59a8a61..9ef6b6564597 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -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
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2dbe6325f334..c407e3946814 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -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;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] CI: Build missing binman tools before binman tests
  2025-04-01  8:46 ` [PATCH 2/2] CI: Build missing binman tools before binman tests Leonard Anderweit
@ 2025-04-01 11:12   ` Fabio Estevam
  2025-04-01 11:42     ` Leonard Anderweit
  0 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2025-04-01 11:12 UTC (permalink / raw)
  To: Leonard Anderweit; +Cc: u-boot, trini, sjg, marex, upstream

Hi Leonard,

On Tue, Apr 1, 2025 at 5:46 AM Leonard Anderweit <l.anderweit@phytec.de> wrote:
>
> 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 <l.anderweit@phytec.de>

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)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] CI: Build missing binman tools before binman tests
  2025-04-01 11:12   ` Fabio Estevam
@ 2025-04-01 11:42     ` Leonard Anderweit
  2025-04-01 13:52       ` Tom Rini
  0 siblings, 1 reply; 7+ messages in thread
From: Leonard Anderweit @ 2025-04-01 11:42 UTC (permalink / raw)
  To: festevam@gmail.com
  Cc: sjg@chromium.org, u-boot@lists.denx.de, trini@konsulko.com,
	upstream@lists.phytec.de, marex@denx.de

Hi Fabio,

Am Dienstag, dem 01.04.2025 um 08:12 -0300 schrieb Fabio Estevam:
> Hi Leonard,
> 
> On Tue, Apr 1, 2025 at 5:46 AM Leonard Anderweit
> <l.anderweit@phytec.de> wrote:
> > 
> > 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 <l.anderweit@phytec.de>
> 
> 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

binman now fetches the missing build tools.
> 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

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

> 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)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] CI: Build missing binman tools before binman tests
  2025-04-01 11:42     ` Leonard Anderweit
@ 2025-04-01 13:52       ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2025-04-01 13:52 UTC (permalink / raw)
  To: Leonard Anderweit
  Cc: festevam@gmail.com, sjg@chromium.org, u-boot@lists.denx.de,
	upstream@lists.phytec.de, marex@denx.de

[-- Attachment #1: Type: text/plain, Size: 4006 bytes --]

On Tue, Apr 01, 2025 at 11:42:35AM +0000, Leonard Anderweit wrote:
> Hi Fabio,
> 
> Am Dienstag, dem 01.04.2025 um 08:12 -0300 schrieb Fabio Estevam:
> > Hi Leonard,
> > 
> > On Tue, Apr 1, 2025 at 5:46 AM Leonard Anderweit
> > <l.anderweit@phytec.de> wrote:
> > > 
> > > 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 <l.anderweit@phytec.de>
> > 
> > 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
> 
> binman now fetches the missing build tools.
> > 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
> 
> 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.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: (subset) [PATCH 1/2] Dockerfile: install byacc
  2025-04-01  8:46 [PATCH 1/2] Dockerfile: install byacc Leonard Anderweit
  2025-04-01  8:46 ` [PATCH 2/2] CI: Build missing binman tools before binman tests Leonard Anderweit
@ 2025-04-10 17:33 ` Tom Rini
  2025-04-11 19:16 ` Tom Rini
  2 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2025-04-10 17:33 UTC (permalink / raw)
  To: u-boot, Leonard Anderweit; +Cc: sjg, festevam, marex, upstream

On Tue, 01 Apr 2025 10:46:41 +0200, Leonard Anderweit wrote:

> Install byacc required to build cst from source.
> 
> 

Applied to u-boot/master, thanks!

[1/2] Dockerfile: install byacc
      commit: d592ebd6b805b37a127151eb8de9261cf799d438
-- 
Tom



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: (subset) [PATCH 1/2] Dockerfile: install byacc
  2025-04-01  8:46 [PATCH 1/2] Dockerfile: install byacc Leonard Anderweit
  2025-04-01  8:46 ` [PATCH 2/2] CI: Build missing binman tools before binman tests Leonard Anderweit
  2025-04-10 17:33 ` (subset) [PATCH 1/2] Dockerfile: install byacc Tom Rini
@ 2025-04-11 19:16 ` Tom Rini
  2 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2025-04-11 19:16 UTC (permalink / raw)
  To: u-boot, Leonard Anderweit; +Cc: sjg, festevam, marex, upstream

On Tue, 01 Apr 2025 10:46:41 +0200, Leonard Anderweit wrote:

> 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
-- 
Tom



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-04-11 19:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-01  8:46 [PATCH 1/2] Dockerfile: install byacc Leonard Anderweit
2025-04-01  8:46 ` [PATCH 2/2] CI: Build missing binman tools before binman tests Leonard Anderweit
2025-04-01 11:12   ` Fabio Estevam
2025-04-01 11:42     ` Leonard Anderweit
2025-04-01 13:52       ` Tom Rini
2025-04-10 17:33 ` (subset) [PATCH 1/2] Dockerfile: install byacc Tom Rini
2025-04-11 19:16 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox