All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] RFC: gitlab: x86: Add a coreboot test
@ 2021-12-03  2:26 Simon Glass
  2021-12-03 15:00 ` Tom Rini
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2021-12-03  2:26 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Martin Roth, Bin Meng, Tom Rini, Stefan Reinauer, Simon Glass,
	Daniel Schwierzeck, Heinrich Schuchardt, Kristian Amlie

Coreboot supports U-Boot as a payload and this recently got a bit of a
facelist. Add a test for this.

For now this uses a binary build of coreboot (v4.15). Future work could
potentially build it from source, but we need to figure out the
toolchain problems first, since coreboot uses its own toolchain.

This needs some changes to the hooks scripts as well. An example build
is at https://source.denx.de/u-boot/custodians/u-boot-dm/-/jobs/359687

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Drop the local CI changes; we need the real ones applied first anyway

 .gitlab-ci.yml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4c89daeadcf..065d8d6158e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -52,6 +52,16 @@ stages:
         genimage --inputpath . --config board/sifive/unleashed/genimage_spi-nor.cfg;
         cp images/spi-nor.img ${UBOOT_TRAVIS_BUILD_DIR}/;
       fi
+    - if [[ "${TEST_PY_BD}" == "coreboot" ]]; then
+        wget -O -
+          "https://drive.google.com/uc?id=1x6nrtWIyIRPLS2cQBwYTnT2TbOI8UjmM&export=download" |
+          xz -dc >${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom;
+        wget -O -
+          "https://drive.google.com/uc?id=149Cz-5SZXHNKpi9xg6R_5XITWohu348y&export=download" >
+          cbfstool;
+        chmod a+x cbfstool;
+        ./cbfstool ${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom add-flat-binary -f ${UBOOT_TRAVIS_BUILD_DIR}/u-boot.bin -n fallback/payload -c LZMA -l 0x1110000 -e 0x1110000;
+      fi
     - virtualenv -p /usr/bin/python3 /tmp/venv
     - . /tmp/venv/bin/activate
     - pip install -r test/py/requirements.txt
@@ -61,6 +71,10 @@ stages:
       ./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID}
         ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"}
         --build-dir "$UBOOT_TRAVIS_BUILD_DIR"
+    # It seems that the files in /tmp go away, so copy out what we need
+    - if [[ "${TEST_PY_BD}" == "coreboot" ]]; then
+        cp -v /tmp/coreboot/*.{html,css} .;
+      fi
 
 build all 32bit ARM platforms:
   stage: world build
@@ -366,3 +380,15 @@ xtfpga test.py:
     TEST_PY_TEST_SPEC: "not sleep"
     TEST_PY_ID: "--id qemu"
   <<: *buildman_and_testpy_dfn
+
+coreboot test.py:
+  variables:
+    TEST_PY_BD: "coreboot"
+    TEST_PY_TEST_SPEC: "not sleep"
+    TEST_PY_ID: "--id qemu"
+  artifacts:
+    paths:
+      - "*.html"
+      - "*.css"
+    expire_in: 1 week
+  <<: *buildman_and_testpy_dfn
-- 
2.34.0.384.gca35af8252-goog


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

* Re: [PATCH v2] RFC: gitlab: x86: Add a coreboot test
  2021-12-03  2:26 [PATCH v2] RFC: gitlab: x86: Add a coreboot test Simon Glass
@ 2021-12-03 15:00 ` Tom Rini
  2021-12-03 15:47   ` Simon Glass
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Rini @ 2021-12-03 15:00 UTC (permalink / raw)
  To: Simon Glass
  Cc: U-Boot Mailing List, Martin Roth, Bin Meng, Stefan Reinauer,
	Daniel Schwierzeck, Heinrich Schuchardt, Kristian Amlie

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

On Thu, Dec 02, 2021 at 07:26:21PM -0700, Simon Glass wrote:

> Coreboot supports U-Boot as a payload and this recently got a bit of a
> facelist. Add a test for this.
> 
> For now this uses a binary build of coreboot (v4.15). Future work could
> potentially build it from source, but we need to figure out the
> toolchain problems first, since coreboot uses its own toolchain.
> 
> This needs some changes to the hooks scripts as well. An example build
> is at https://source.denx.de/u-boot/custodians/u-boot-dm/-/jobs/359687
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

We should build coreboot in the Dockerfile like we do grub and so forth,
then not have to worry about the toolchain things since it's just a
one-time cost to me (or anyone else doing docker build).

-- 
Tom

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

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

* Re: [PATCH v2] RFC: gitlab: x86: Add a coreboot test
  2021-12-03 15:00 ` Tom Rini
@ 2021-12-03 15:47   ` Simon Glass
  2021-12-03 16:05     ` Tom Rini
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2021-12-03 15:47 UTC (permalink / raw)
  To: Tom Rini
  Cc: U-Boot Mailing List, Martin Roth, Bin Meng, Stefan Reinauer,
	Daniel Schwierzeck, Heinrich Schuchardt, Kristian Amlie

Hi Tom,

On Fri, 3 Dec 2021 at 08:00, Tom Rini <trini@konsulko.com> wrote:
>
> On Thu, Dec 02, 2021 at 07:26:21PM -0700, Simon Glass wrote:
>
> > Coreboot supports U-Boot as a payload and this recently got a bit of a
> > facelist. Add a test for this.
> >
> > For now this uses a binary build of coreboot (v4.15). Future work could
> > potentially build it from source, but we need to figure out the
> > toolchain problems first, since coreboot uses its own toolchain.
> >
> > This needs some changes to the hooks scripts as well. An example build
> > is at https://source.denx.de/u-boot/custodians/u-boot-dm/-/jobs/359687
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
>
> We should build coreboot in the Dockerfile like we do grub and so forth,
> then not have to worry about the toolchain things since it's just a
> one-time cost to me (or anyone else doing docker build).

OK...it does take an age though, since it builds various toolchains
before it will even build coreboot. I'm going to talk to them about
why they can't use 'normal' toolchains. Anyway, I'll add it in and see
how it looks.

Do you want me to try the DockerFile thing first, or is having a
download OK for now? What do you think about doing a docker thing for
nikia_rx51 ?

Regards,
Simon

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

* Re: [PATCH v2] RFC: gitlab: x86: Add a coreboot test
  2021-12-03 15:47   ` Simon Glass
@ 2021-12-03 16:05     ` Tom Rini
  2021-12-03 20:13       ` Simon Glass
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Rini @ 2021-12-03 16:05 UTC (permalink / raw)
  To: Simon Glass
  Cc: U-Boot Mailing List, Martin Roth, Bin Meng, Stefan Reinauer,
	Daniel Schwierzeck, Heinrich Schuchardt, Kristian Amlie

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

On Fri, Dec 03, 2021 at 08:47:55AM -0700, Simon Glass wrote:
> Hi Tom,
> 
> On Fri, 3 Dec 2021 at 08:00, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Thu, Dec 02, 2021 at 07:26:21PM -0700, Simon Glass wrote:
> >
> > > Coreboot supports U-Boot as a payload and this recently got a bit of a
> > > facelist. Add a test for this.
> > >
> > > For now this uses a binary build of coreboot (v4.15). Future work could
> > > potentially build it from source, but we need to figure out the
> > > toolchain problems first, since coreboot uses its own toolchain.
> > >
> > > This needs some changes to the hooks scripts as well. An example build
> > > is at https://source.denx.de/u-boot/custodians/u-boot-dm/-/jobs/359687
> > >
> > > Signed-off-by: Simon Glass <sjg@chromium.org>
> >
> > We should build coreboot in the Dockerfile like we do grub and so forth,
> > then not have to worry about the toolchain things since it's just a
> > one-time cost to me (or anyone else doing docker build).
> 
> OK...it does take an age though, since it builds various toolchains
> before it will even build coreboot. I'm going to talk to them about
> why they can't use 'normal' toolchains. Anyway, I'll add it in and see
> how it looks.
> 
> Do you want me to try the DockerFile thing first, or is having a
> download OK for now? What do you think about doing a docker thing for
> nikia_rx51 ?

For coreboot, lets see what the feedback you get is, and we can deal
with adding the test soon like this I suppose.

For nokia_rx51, I assume you mean building qemu and I'm not sure we can
without making the test more fragile for non-CI?  It doesn't tend to be
much of a bottleneck so I'd rather not tweak it further.

-- 
Tom

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

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

* Re: [PATCH v2] RFC: gitlab: x86: Add a coreboot test
  2021-12-03 16:05     ` Tom Rini
@ 2021-12-03 20:13       ` Simon Glass
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2021-12-03 20:13 UTC (permalink / raw)
  To: Tom Rini
  Cc: U-Boot Mailing List, Martin Roth, Bin Meng, Stefan Reinauer,
	Daniel Schwierzeck, Heinrich Schuchardt, Kristian Amlie

Hi Tom,

On Fri, 3 Dec 2021 at 09:05, Tom Rini <trini@konsulko.com> wrote:
>
> On Fri, Dec 03, 2021 at 08:47:55AM -0700, Simon Glass wrote:
> > Hi Tom,
> >
> > On Fri, 3 Dec 2021 at 08:00, Tom Rini <trini@konsulko.com> wrote:
> > >
> > > On Thu, Dec 02, 2021 at 07:26:21PM -0700, Simon Glass wrote:
> > >
> > > > Coreboot supports U-Boot as a payload and this recently got a bit of a
> > > > facelist. Add a test for this.
> > > >
> > > > For now this uses a binary build of coreboot (v4.15). Future work could
> > > > potentially build it from source, but we need to figure out the
> > > > toolchain problems first, since coreboot uses its own toolchain.
> > > >
> > > > This needs some changes to the hooks scripts as well. An example build
> > > > is at https://source.denx.de/u-boot/custodians/u-boot-dm/-/jobs/359687
> > > >
> > > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > >
> > > We should build coreboot in the Dockerfile like we do grub and so forth,
> > > then not have to worry about the toolchain things since it's just a
> > > one-time cost to me (or anyone else doing docker build).
> >
> > OK...it does take an age though, since it builds various toolchains
> > before it will even build coreboot. I'm going to talk to them about
> > why they can't use 'normal' toolchains. Anyway, I'll add it in and see
> > how it looks.
> >
> > Do you want me to try the DockerFile thing first, or is having a
> > download OK for now? What do you think about doing a docker thing for
> > nikia_rx51 ?
>
> For coreboot, lets see what the feedback you get is, and we can deal
> with adding the test soon like this I suppose.

OK, it might take some weeks to figure it out but am having a chat next week.

>
> For nokia_rx51, I assume you mean building qemu and I'm not sure we can
> without making the test more fragile for non-CI?  It doesn't tend to be
> much of a bottleneck so I'd rather not tweak it further.

Ah OK I hadn't thought of that side. It fails for me a fair bit which
is why I think of it.

Regards,
Simon

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

end of thread, other threads:[~2021-12-03 20:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-03  2:26 [PATCH v2] RFC: gitlab: x86: Add a coreboot test Simon Glass
2021-12-03 15:00 ` Tom Rini
2021-12-03 15:47   ` Simon Glass
2021-12-03 16:05     ` Tom Rini
2021-12-03 20:13       ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.