Skip to content

Commit

Permalink
chore: drop u-boot patches
Browse files Browse the repository at this point in the history
Drop the u-boot patches which allowed building u-boot flashable to SPI.
The board wiki already has links to flashing their own u-boot to SPI.
It's a pain to update u-boot for us due to patches. The installation
docs for the board will be updated to point to the board wiki for
flashing u-boot for SPI. This also reduces our maintenance work and
makes it easier to update u-boot.

Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed Mar 19, 2024
1 parent 83dac17 commit 2435365
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 424 deletions.
8 changes: 4 additions & 4 deletions Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ vars:
arm_trusted_firmware_sha512: 958cf8f9e258638e59d0fbd8b053fce7d8a9ea2fc922686c9d20ea16f79f55219ac18a12ab240c528ee98e49c2e0eef4c963fdb255cc14b92437a5b3cffc8640

# renovate: datasource=github-tags extractVersion=^v(?<version>.*)$ depName=u-boot/u-boot
uboot_version: 2023.01
uboot_sha256: 69423bad380f89a0916636e89e6dcbd2e4512d584308d922d1039d1e4331950f
uboot_sha512: 417a28267eb7875820d08fafc7316f164663609378637539e71648b0b9b7d28796b6c381717f31b0ab6472805fefd32628ef7d1b2e7b9f3c51c8ad122993f679
uboot_version: 2024.01
uboot_sha256: b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3
uboot_sha512: 45bd093ba3bda23e43cdde83d8656c1ee1348ac2886ecff1fee475f101ac4965a5be6565408fa5b990c723f3fdc833edfca60a719f735a43040cd14a1b59a88b
labels:
org.opencontainers.image.source: https://github.com/siderolabs/sbc-raspberrypi
org.opencontainers.image.source: https://github.com/siderolabs/sbc-rockchip
6 changes: 4 additions & 2 deletions artifacts/nanopi-r4s/u-boot/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ steps:
# nanopi-r4s
- |
mkdir -p /usr/bin \
&& ln -sf /toolchain/bin/env /usr/bin/env
&& ln -sf /toolchain/bin/env /usr/bin/env \
&& ln -sf /toolchain/bin/python3 /toolchain/bin/python
pip3 install pyelftools
tar xf u-boot.tar.bz2 --strip-components=1
- |
make nanopi-r4s-rk3399_defconfig
sed -i "s/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/" .config
build:
- |
make -j $(nproc) HOSTLDLIBS_mkimage="-lssl -lcrypto" BL31=/libs/arm-trusted-firmware/rk3399/bl31.elf
Expand Down
6 changes: 4 additions & 2 deletions artifacts/rock64/u-boot/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ steps:
# rock-pi-4-rk3399
- |
mkdir -p /usr/bin \
&& ln -sf /toolchain/bin/env /usr/bin/env
&& ln -sf /toolchain/bin/env /usr/bin/env \
&& ln -sf /toolchain/bin/python3 /toolchain/bin/python
pip3 install pyelftools
tar xf u-boot.tar.bz2 --strip-components=1
- |
make rock64-rk3328_defconfig
sed -i "s/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/" .config
build:
- |
make -j $(nproc) HOSTLDLIBS_mkimage="-lssl -lcrypto" BL31=/libs/arm-trusted-firmware/rk3328/bl31.elf
Expand Down

This file was deleted.

26 changes: 0 additions & 26 deletions artifacts/rockpi4/u-boot/patches/enable-boot-from-spi-flash.patch

This file was deleted.

This file was deleted.

22 changes: 7 additions & 15 deletions artifacts/rockpi4/u-boot/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,24 @@ steps:
# rock-pi-4-rk3399
- |
mkdir -p /usr/bin \
&& ln -sf /toolchain/bin/env /usr/bin/env
&& ln -sf /toolchain/bin/env /usr/bin/env \
&& ln -sf /toolchain/bin/python3 /toolchain/bin/python
pip3 install pyelftools \
&& ln -sf /toolchain/bin/python3 /toolchain/bin/python
pip3 install pyelftools
tar xf u-boot.tar.bz2 --strip-components=1
- |
patch -p0 < /pkg/patches/board-rock-pi-4-enable-spi-flash.patch
patch -p0 < /pkg/patches/general-add-xtx-spi-nor-chips.patch
patch -p0 < /pkg/patches/enable-boot-from-spi-flash.patch
make rock-pi-4-rk3399_defconfig
sed -i "s/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/" .config
build:
- |
make -j $(nproc) HOSTLDLIBS_mkimage="-lssl -lcrypto" BL31=/libs/arm-trusted-firmware/rk3399/bl31.elf
# create spi image
# https://github.com/armbian/build/blob/09e416e31cc01ece4533a65f02a470a4c21b90ea/config/sources/families/include/rockchip64_common.inc#L173-L178
tools/mkimage -n rk3399 -T rkspi -d tpl/u-boot-tpl.bin:spl/u-boot-spl.bin rkspi_tpl_spl.img
dd if=/dev/zero of=rkspi_loader.img count=8128 status=none
dd if=rkspi_tpl_spl.img of=rkspi_loader.img conv=notrunc status=none
dd if=u-boot.itb of=rkspi_loader.img seek=768 conv=notrunc status=none
install:
- |
mkdir -p /rootfs/artifacts/arm64/u-boot/rockpi4
cp u-boot-rockchip.bin /rootfs/artifacts/arm64/u-boot/rockpi4
cp rkspi_loader.img /rootfs/artifacts/arm64/u-boot/rockpi4
finalize:
- from: /rootfs
to: /rootfs
Loading

0 comments on commit 2435365

Please sign in to comment.