From 56a8c325cd63632f89a71bd949da34bead787277 Mon Sep 17 00:00:00 2001 From: Itxaka Date: Tue, 4 Mar 2025 11:03:04 +0100 Subject: [PATCH] Add uboot package (#1297) * Add uboot package Same config as the opensuse one we were using --------- Signed-off-by: Itxaka --- .../add-identifiers-for-new-rpi5-series.patch | 43 +++++++++++++++++++ packages/uboot/rpi64/build.yaml | 36 ++++++++++++++++ packages/uboot/rpi64/definition.yaml | 8 ++++ packages/uboot/rpi64/ubootconfig.txt | 2 + 4 files changed, 89 insertions(+) create mode 100644 packages/uboot/rpi64/add-identifiers-for-new-rpi5-series.patch create mode 100644 packages/uboot/rpi64/build.yaml create mode 100644 packages/uboot/rpi64/definition.yaml create mode 100644 packages/uboot/rpi64/ubootconfig.txt diff --git a/packages/uboot/rpi64/add-identifiers-for-new-rpi5-series.patch b/packages/uboot/rpi64/add-identifiers-for-new-rpi5-series.patch new file mode 100644 index 0000000..c53da43 --- /dev/null +++ b/packages/uboot/rpi64/add-identifiers-for-new-rpi5-series.patch @@ -0,0 +1,43 @@ +From 49423505898eef1baefa2823408dad8321571353 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Sun, 29 Dec 2024 14:43:33 +0000 +Subject: [PATCH] rpi: Add identifiers for the new RPi 5 series + +The Raspberry Pi foundation have released the Raspberry +Pi 500, CM5 an CM5 lite devices so add the assoicated +revision identifers so we can detect them. + +Signed-off-by: Peter Robinson +--- + board/raspberrypi/rpi/rpi.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c +index 18be244aa79..1e43c631898 100644 +--- a/board/raspberrypi/rpi/rpi.c ++++ b/board/raspberrypi/rpi/rpi.c +@@ -193,6 +193,21 @@ static const struct rpi_model rpi_models_new_scheme[] = { + DTB_DIR "bcm2712-rpi-5-b.dtb", + true, + }, ++ [0x18] = { ++ "Compute Module 5", ++ DTB_DIR "bcm2712-rpi-cm5-cm5io.dtb", ++ true, ++ }, ++ [0x19] = { ++ "500", ++ DTB_DIR "bcm2712-rpi-500.dtb", ++ true, ++ }, ++ [0x1A] = { ++ "Compute Module 5 Lite", ++ DTB_DIR "bcm2712-rpi-cm5l-cm5io.dtb", ++ true, ++ }, + }; + + static const struct rpi_model rpi_models_old_scheme[] = { +-- +2.47.1 + diff --git a/packages/uboot/rpi64/build.yaml b/packages/uboot/rpi64/build.yaml new file mode 100644 index 0000000..a82efc6 --- /dev/null +++ b/packages/uboot/rpi64/build.yaml @@ -0,0 +1,36 @@ +requires: + - name: "toolchain-go-ubuntu" + category: "development" + version: ">=0" + +package_dir: /output + +env: + - GITHUB_ORG={{ ( index .Values.labels "github.owner" ) }} + - GITHUB_REPO={{ ( index .Values.labels "github.repo" ) }} +{{ if .Values.arch }} + {{ if eq .Values.arch "amd64" }} + - CROSS_COMPILE=aarch64-linux-gnu- + {{ end }} +{{ end }} + +prelude: + - mkdir build/${GITHUB_ORG}/ -p + - mkdir /output -p + - git clone --depth 1 --branch v${PACKAGE_VERSION} https://github.com/${GITHUB_ORG}/${GITHUB_REPO}.git build/${GITHUB_ORG} + - apt-get update -y && apt-get install -y build-essential libncurses5-dev libssl-dev libelf-dev flex bison libgnutls28-dev +{{ if .Values.arch }} + {{ if eq .Values.arch "amd64" }} + - apt-get -y install gcc-aarch64-linux-gnu + {{ else if eq .Values.arch "arm64" }} + - apt-get -y install gcc + {{ end }} +{{ end }} + +steps: + - cp add-identifiers-for-new-rpi5-series.patch build/${GITHUB_ORG} + - cd build/${GITHUB_ORG} && patch -p1 < add-identifiers-for-new-rpi5-series.patch + - cd build/${GITHUB_ORG} && make rpi_arm64_defconfig + - cd build/${GITHUB_ORG} && make -j$(nproc) all + - cp build/${GITHUB_ORG}/u-boot.bin /output + - cp ubootconfig.txt /output diff --git a/packages/uboot/rpi64/definition.yaml b/packages/uboot/rpi64/definition.yaml new file mode 100644 index 0000000..0efdffd --- /dev/null +++ b/packages/uboot/rpi64/definition.yaml @@ -0,0 +1,8 @@ +name: "rpi64" +category: "uboot" +version: "2025.01" +labels: + github.repo: "u-boot" + github.owner: "u-boot" + + diff --git a/packages/uboot/rpi64/ubootconfig.txt b/packages/uboot/rpi64/ubootconfig.txt new file mode 100644 index 0000000..9770251 --- /dev/null +++ b/packages/uboot/rpi64/ubootconfig.txt @@ -0,0 +1,2 @@ +# Boot in AArch64 mode +arm_64bit=1