Skip to content

Commit

Permalink
pkg/u-boot: fix riscv64 build
Browse files Browse the repository at this point in the history
Don't build mkeficapsule tool in u-boot to fix riscv64 build. The latest
u-boot requires gnutls-dev package which is not available in alpine 3.16
for riscv64 (alpine 3.20 is needed).

Signed-off-by: Dimitrios Poulios <[email protected]>
  • Loading branch information
dpoulios authored and eriknordmark committed Nov 6, 2024
1 parent 5b9088a commit 8e60e96
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/u-boot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM lfedge/eve-alpine:591df01e581889c3027514c8a91feaca1c8ad49f AS build-base
ENV BUILD_PKGS bash binutils-dev build-base bc bison flex openssl-dev python3 swig dtc util-linux-dev gnutls-dev
ENV BUILD_PKGS bash binutils-dev build-base bc bison flex openssl-dev python3 swig dtc
ENV BUILD_PKGS_amd64 python3-dev py-pip
RUN eve-alpine-deploy.sh

Expand All @@ -22,6 +22,7 @@ RUN mkdir /boot

FROM build-base AS build-amd64
ENV TARGET qemu-x86_64_defconfig
RUN for p in /tmp/patches/patches-"${VERSION}"/*.patch ; do patch -p1 < "$p" || exit 1 ; done
# FIXME: we need to get to the bottom of this weird workaround on x86/Alpine
RUN sed -ie 's#CONFIG_IS_ENABLED(X86_64)#1#' ./arch/x86/include/asm/byteorder.h

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
From c968256eabe9547d20a4b1c811ce4e32f39e4d2d Mon Sep 17 00:00:00 2001
From: Dimitrios Poulios <[email protected]>
Date: Mon, 4 Nov 2024 19:13:08 +0200
Subject: [PATCH] Disable mkeficapsule tool

Disable mkeficapsule tool to overcome riscv64 build error in
alpine 3.16

Signed-off-by: Dimitrios Poulios <[email protected]>
---
configs/qemu-riscv64_smode_defconfig | 1 +
configs/qemu-x86_64_defconfig | 1 +
configs/rpi_4_defconfig | 1 +
3 files changed, 3 insertions(+)

diff --git a/configs/qemu-riscv64_smode_defconfig b/configs/qemu-riscv64_smode_defconfig
index 6baad1de..bd58f4cc 100644
--- a/configs/qemu-riscv64_smode_defconfig
+++ b/configs/qemu-riscv64_smode_defconfig
@@ -23,3 +23,4 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_DM_MTD=y
CONFIG_FLASH_SHOW_PROGRESS=0
CONFIG_SYS_MAX_FLASH_BANKS=2
+# CONFIG_TOOLS_MKEFICAPSULE is not set
diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig
index 008eb46a..bd7664f4 100644
--- a/configs/qemu-x86_64_defconfig
+++ b/configs/qemu-x86_64_defconfig
@@ -89,3 +89,4 @@ CONFIG_SPL_VIDEO=y
# CONFIG_SPL_USE_TINY_PRINTF is not set
CONFIG_GENERATE_ACPI_TABLE=y
# CONFIG_GZIP is not set
+# CONFIG_TOOLS_MKEFICAPSULE is not set
diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig
index db5bbe86..fe44933d 100644
--- a/configs/rpi_4_defconfig
+++ b/configs/rpi_4_defconfig
@@ -71,3 +71,4 @@ CONFIG_VIDEO_BCM2835=y
CONFIG_CONSOLE_SCROLL_LINES=10
CONFIG_PHYS_TO_BUS=y
CONFIG_TPM=y
+# CONFIG_TOOLS_MKEFICAPSULE is not set
--
2.45.2

0 comments on commit 8e60e96

Please sign in to comment.