public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 1/3] Dockerfile: Build coreboot from source
@ 2024-02-13 14:39 Tom Rini
  2024-02-13 14:39 ` [PATCH 2/3] CI: Switch to using coreboot from our image Tom Rini
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Tom Rini @ 2024-02-13 14:39 UTC (permalink / raw)
  To: u-boot

To make CI runs rely less on external servers, build a coreboot release
from source and populate /opt/coreboot with the output.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 tools/docker/Dockerfile | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index 6122776bc64d..3d044657406e 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -231,6 +231,17 @@ RUN mkdir /tmp/trace && \
     sudo make install && \
     rm -rf /tmp/trace
 
+# Build coreboot
+RUN wget -O - https://coreboot.org/releases/coreboot-4.22.01.tar.xz | tar -C /tmp -xJ && \
+    cd /tmp/coreboot-4.22.01 && \
+    make crossgcc-i386 CPUS=$(nproc) && \
+    make -C payloads/coreinfo olddefconfig && \
+    make -C payloads/coreinfo && \
+    make olddefconfig && \
+    make -j $(nproc) && \
+    sudo mkdir /opt/coreboot && \
+    sudo cp build/coreboot.rom build/cbfstool /opt/coreboot/
+
 # Create our user/group
 RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot
 RUN useradd -m -U uboot
-- 
2.34.1


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

* [PATCH 2/3] CI: Switch to using coreboot from our image
  2024-02-13 14:39 [PATCH 1/3] Dockerfile: Build coreboot from source Tom Rini
@ 2024-02-13 14:39 ` Tom Rini
  2024-02-13 14:39 ` [PATCH 3/3] CI: Move to latest container image Tom Rini
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2024-02-13 14:39 UTC (permalink / raw)
  To: u-boot

Instead of downloading coreboot binaries from a Google drive location,
use the ones we have built ourselves.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 .azure-pipelines.yml |  7 +++----
 .gitlab-ci.yml       | 11 +++--------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index e2646783ee62..aebcc8908687 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -236,10 +236,9 @@ stages:
               cp images/spi-nor.img \${UBOOT_TRAVIS_BUILD_DIR}/;
           fi
           if [[ "\${TEST_PY_BD}" == "coreboot" ]]; then
-              wget -O - "https://drive.google.com/uc?id=1uJ2VkUQ8czWFZmhJQ90Tp8V_zrJ6BrBH&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;
+              cp /opt/coreboot/coreboot.rom \${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom;
+              /opt/coreboot/cbfstool \${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom remove -n fallback/payload;
+              /opt/coreboot/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
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 278a2e2bbf31..66f3cb14b03a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -70,14 +70,9 @@ stages:
         cp images/spi-nor.img ${UBOOT_TRAVIS_BUILD_DIR}/;
       fi
     - if [[ "${TEST_PY_BD}" == "coreboot" ]]; then
-        wget -O -
-          "https://drive.google.com/uc?id=1uJ2VkUQ8czWFZmhJQ90Tp8V_zrJ6BrBH&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;
+        cp /opt/coreboot/coreboot.rom ${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom;
+        /opt/coreboot/cbfstool ${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom remove -n fallback/payload;
+        /opt/coreboot/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
-- 
2.34.1


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

* [PATCH 3/3] CI: Move to latest container image
  2024-02-13 14:39 [PATCH 1/3] Dockerfile: Build coreboot from source Tom Rini
  2024-02-13 14:39 ` [PATCH 2/3] CI: Switch to using coreboot from our image Tom Rini
@ 2024-02-13 14:39 ` Tom Rini
  2024-02-13 15:31 ` [PATCH 1/3] Dockerfile: Build coreboot from source Tom Rini
  2024-02-28 16:21 ` Tom Rini
  3 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2024-02-13 14:39 UTC (permalink / raw)
  To: u-boot

This moves us to our latest container image, which is now based on the
current "Jammy" tag.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 .azure-pipelines.yml    | 2 +-
 .gitlab-ci.yml          | 2 +-
 tools/docker/Dockerfile | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index aebcc8908687..7c3172610ee6 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -2,7 +2,7 @@ variables:
   windows_vm: windows-2019
   ubuntu_vm: ubuntu-22.04
   macos_vm: macOS-12
-  ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20240111-17Jan2024
+  ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20240125-12Feb2024
   # Add '-u 0' options for Azure pipelines, otherwise we get "permission
   # denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer",
   # since our $(ci_runner_image) user is not root.
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 66f3cb14b03a..6ab3bb5ec2aa 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,7 +10,7 @@ default:
 
 # Grab our configured image.  The source for this is found
 # in the u-boot tree at tools/docker/Dockerfile
-image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:jammy-20240111-17Jan2024
+image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:jammy-20240125-12Feb2024
 
 # We run some tests in different order, to catch some failures quicker.
 stages:
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index 3d044657406e..274255456619 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -2,7 +2,7 @@
 # This Dockerfile is used to build an image containing basic stuff to be used
 # to build U-Boot and run our test suites.
 
-FROM ubuntu:jammy-20240111
+FROM ubuntu:jammy-20240125
 MAINTAINER Tom Rini <trini@konsulko.com>
 LABEL Description=" This image is for building U-Boot inside a container"
 
-- 
2.34.1


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

* Re: [PATCH 1/3] Dockerfile: Build coreboot from source
  2024-02-13 14:39 [PATCH 1/3] Dockerfile: Build coreboot from source Tom Rini
  2024-02-13 14:39 ` [PATCH 2/3] CI: Switch to using coreboot from our image Tom Rini
  2024-02-13 14:39 ` [PATCH 3/3] CI: Move to latest container image Tom Rini
@ 2024-02-13 15:31 ` Tom Rini
  2024-02-28 16:21 ` Tom Rini
  3 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2024-02-13 15:31 UTC (permalink / raw)
  To: u-boot

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

On Tue, Feb 13, 2024 at 09:39:26AM -0500, Tom Rini wrote:
> To make CI runs rely less on external servers, build a coreboot release
> from source and populate /opt/coreboot with the output.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>  tools/docker/Dockerfile | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
> index 6122776bc64d..3d044657406e 100644
> --- a/tools/docker/Dockerfile
> +++ b/tools/docker/Dockerfile
> @@ -231,6 +231,17 @@ RUN mkdir /tmp/trace && \
>      sudo make install && \
>      rm -rf /tmp/trace
>  
> +# Build coreboot
> +RUN wget -O - https://coreboot.org/releases/coreboot-4.22.01.tar.xz | tar -C /tmp -xJ && \
> +    cd /tmp/coreboot-4.22.01 && \
> +    make crossgcc-i386 CPUS=$(nproc) && \
> +    make -C payloads/coreinfo olddefconfig && \
> +    make -C payloads/coreinfo && \
> +    make olddefconfig && \
> +    make -j $(nproc) && \
> +    sudo mkdir /opt/coreboot && \
> +    sudo cp build/coreboot.rom build/cbfstool /opt/coreboot/

And I forgot an "rm -rf /tmp/coreboot-4.22.01" at the end here which
I'll add while merging if there's no further comments.

-- 
Tom

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

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

* Re: [PATCH 1/3] Dockerfile: Build coreboot from source
  2024-02-13 14:39 [PATCH 1/3] Dockerfile: Build coreboot from source Tom Rini
                   ` (2 preceding siblings ...)
  2024-02-13 15:31 ` [PATCH 1/3] Dockerfile: Build coreboot from source Tom Rini
@ 2024-02-28 16:21 ` Tom Rini
  3 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2024-02-28 16:21 UTC (permalink / raw)
  To: u-boot, Tom Rini

On Tue, 13 Feb 2024 09:39:26 -0500, Tom Rini wrote:

> To make CI runs rely less on external servers, build a coreboot release
> from source and populate /opt/coreboot with the output.
> 
> 

Applied to u-boot/master, thanks!

-- 
Tom



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

end of thread, other threads:[~2024-02-28 16:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-13 14:39 [PATCH 1/3] Dockerfile: Build coreboot from source Tom Rini
2024-02-13 14:39 ` [PATCH 2/3] CI: Switch to using coreboot from our image Tom Rini
2024-02-13 14:39 ` [PATCH 3/3] CI: Move to latest container image Tom Rini
2024-02-13 15:31 ` [PATCH 1/3] Dockerfile: Build coreboot from source Tom Rini
2024-02-28 16:21 ` Tom Rini

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