u-boot-pinebookpro-2020.07 has a bunch of patches:
- 0001-enable-rockchip-rng.patch
- Upstream as dc38a58360bfc3b21621dc9d5e626febd1aa93ec, in v2020.10
- 0002-enable-usb-keyboard.patch
- Partially upstream as 3a57712496ab4383c528184ad1021908d6620162, in v2020.10
- 0003-display-support.patch bundles has multiple patches:
1. Upstream as 7fe2ebf3a326026b9ab80ed94da3cd217c84724d, in v2021.07
2. Upstream as 04d67ceb1c62012822430135be31e18c9c176d85, in v2021.07
3. **not upstream**
4. **not upstream**
5. Upstream in decbc18ed2a9788fcaad3ca349def7bad36741f4, in v2021.07
6. Upstream as a0c248ef0844da239096ecb4a83f9fa2b0535117, in v2021.07
7. Upstream in b197c934b11f611dcc1a083d90e68019d1e010cf, in v2021.01
8. Upstream as 4db3926874a6a17cca1f97a4fd92e58e9182a272, in v2021.07
9. No longer required (screen works fine after warm reboot).
10. Upstream in 216928c772798609ba2cb01a42b6f89832bb0587, in v2023.01
11. Upstream in fce1e9bba263fb5e3e589fdc5c2321f733e3de81, in v2022.07
- 0004-rk3399-light-pinebook-power-and-standby-leds.patch
- LED support is already upstream. It's not as early as this patch,
but its preferable to align with mainline.
- 0005-support-SPI-flash-boot.patch
- Superceded by f9d67436ce5814ea4e394317ddeaf1dbecb1c36b, in v2020.10
- 0006-implement-boot-menu.patch has four patches
1. Disable CONFIG_SPLASH_SOURCE instead of patching the source.
2. No compressed bmp logo in use. Unnecessary and labelled as a hack.
3. Irrelevant as we don't enable CONFIG_CMD_BOOTMENU for this device.
4. Kept patch "vidconsole-uclass: Implement ANSI_CURSOR_COLUMN".
- 0007-rockchip-boot-order.patch
- Upstream as b212ad24a604b00b240add35516b7381965deb31, in v2021.10
- 0008-rockchip-boot-order-add-usb.patch
- **not upstream**
- 0009-rk3399-support-compressed-kernel.patch
- Upstream in 6c041b35bf8966ef3d48fc439c1c07131431d2f5, in v2020.10
Drop a few cosmetic and UX improvements were dropped. These are not
strictly required for device support. For example, only the Esc or
Ctrl+C key would interrupt boot, rather than u-boot's "press any key".
Carrying these improvements puts a burden on maintenance and drifts us
further from upstream.
Rebasing all the way up to v2024.01 was mostly strightfoward, but
v2024.07 had some major conflicts. The conflicting patch was already a
hack, so the result is a hack too.
Also drop "Define a very-opinionated boot sequence". This enables the
truetype console (which no longer builds on ARM64) and relies of
features which have been completely re-written upstream.
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8586>
84 lines
4.1 KiB
Bash
84 lines
4.1 KiB
Bash
# Seperate u-boot package for the pine64-pinebookpro because this includes
|
|
# a driver for the display and supports efi loading operating systems
|
|
maintainer="Hugo Osvaldo Barrera <hugo@whynothugo.nl>"
|
|
pkgname=u-boot-pinebookpro
|
|
pkgver=2026.04
|
|
pkgrel=0
|
|
pkgdesc="u-boot bootloader for the rk3399"
|
|
url="https://gitlab.denx.de/u-boot/u-boot"
|
|
arch="aarch64"
|
|
license="GPL-2.0-or-later OFL-1.1 BSD-2-Clause BSD-3-Clause eCos-2.0 IBM-pibs
|
|
ISC LGPL-2.0-only LGPL-2.1-only X11"
|
|
makedepends="$depends_dev
|
|
arm-trusted-firmware
|
|
bash
|
|
bc
|
|
bison
|
|
dtc
|
|
flex
|
|
gnutls-dev
|
|
openssl-dev
|
|
python3-dev
|
|
py3-elftools
|
|
py3-setuptools
|
|
swig
|
|
u-boot-tools
|
|
"
|
|
options="!check"
|
|
source="
|
|
ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver//_/-}.tar.bz2
|
|
0001-pinebook-pro-ensure-USB-keyboards-are-available.patch
|
|
0002-drivers-video-rockchip-rk_edp.c-Change-clock-rate.patch
|
|
0003-vidconsole-uclass-Implement-ANSI_CURSOR_COLUMN.patch
|
|
0004-Configure-boot-splash-logo.patch
|
|
0005-cli-Clear-ctrl-c-before-running-a-command.patch
|
|
0006-rockchip-move-usb0-after-mmc1-in-default-boot-order.patch
|
|
0007-pinebook-pro-Fix-vcc_sdio-regulator-max-voltage.patch
|
|
pine64.bmp
|
|
"
|
|
builddir="$srcdir"/u-boot-${pkgver//_/-}
|
|
|
|
build() {
|
|
touch include/config.h
|
|
LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > include/timestamp_autogenerated.h
|
|
LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> include/timestamp_autogenerated.h
|
|
|
|
export BL31="/usr/share/arm-trusted-firmware/rk3399/bl31.elf"
|
|
export BUILD_DIR="$builddir"/build
|
|
mkdir -p "$BUILD_DIR"
|
|
make O="$BUILD_DIR" HOSTCC=gcc ARCH=arm LOGO_BMP=$srcdir/pine64.bmp pinebook-pro-rk3399_defconfig
|
|
make O="$BUILD_DIR" HOSTCC=gcc ARCH=arm LOGO_BMP=$srcdir/pine64.bmp all
|
|
|
|
mkimage -n rk3399 -T rkspi -d build/tpl/u-boot-tpl-dtb.bin:build/spl/u-boot-spl-dtb.bin spl.bin
|
|
dd if=spl.bin bs=512K conv=sync of=u-boot.spiflash.bin
|
|
cat u-boot.spiflash.bin build/u-boot.itb > build/u-boot.spiflash.bin
|
|
# Make the image the exact size of the spi flash so flashrom does what it's supposed to
|
|
truncate -s 16777216 build/u-boot.spiflash.bin
|
|
|
|
truncate -s 50MB bootable.img
|
|
dd if=build/idbloader.img of=bootable.img bs=512 seek=64 conv=notrunc
|
|
dd if=build/u-boot.itb of=bootable.img bs=512 seek=16384 conv=notrunc
|
|
}
|
|
|
|
package() {
|
|
install -D -m644 build/u-boot-rockchip.bin \
|
|
"$pkgdir"/usr/share/u-boot/pine64-rockpro64/u-boot-rockchip.bin
|
|
install -D -m644 build/u-boot.spiflash.bin \
|
|
"$pkgdir"/usr/share/u-boot/pine64-rockpro64/u-boot.spiflash.bin
|
|
install -D -m644 bootable.img \
|
|
"$pkgdir"/usr/share/u-boot/pine64-rockpro64/bootable.img
|
|
}
|
|
|
|
|
|
sha512sums="
|
|
c5fca2abc533759985dfcc6d071d154007535787b0bbd569b61bda1fe2f3a31fba08481c8caf18cf5f2bc79609f50dee504977a8b65e8c4cc21f277268232e03 u-boot-2026.04.tar.bz2
|
|
572d24d70d96e84649b71a0a460ac9b9ae26d155d549bda1bc2534a54d102b158319caef24609fdbef6465a63d6c2624a42851bcad5b5cb60373abef62bd1850 0001-pinebook-pro-ensure-USB-keyboards-are-available.patch
|
|
3657612c577076c733637cf1b52ece1722369f3a7b821e6a08b7650e85692f5e69acc8f1d4a20d36b701a5bcc4a5bc306456ac371689fcc69ee4c4626ec78483 0002-drivers-video-rockchip-rk_edp.c-Change-clock-rate.patch
|
|
e1dc0553c3685ea1f52f067907b042f54f8244060f9ba865a81970bceba387fe1581d6ea05f6d1aa1ca81513a8e92580781ecb20f9d02d83c56033809ede4ccc 0003-vidconsole-uclass-Implement-ANSI_CURSOR_COLUMN.patch
|
|
da1b515afbbe2387f6fee1028277cb19f5536598ba3fe7cd940d11476f41f162d3d4c08d9ee0ff5554e16dd9cbb4fc70015b5cc5eed885e75267a9e82bf7209f 0004-Configure-boot-splash-logo.patch
|
|
11be09f9dc0bd2eefb645fcc3d5681ade90e104aa8e7c9de549b20393761074edd0e42828fb5147e186d995e11e1397bc94dd2cc521f307d8d26b6925fe22f1b 0005-cli-Clear-ctrl-c-before-running-a-command.patch
|
|
5fdf9a5b42b271414b1f07a8cd94b537562d4994b5cb21377dddc065754b3977a8a3af646c9db0736eeb9cb7e9be0da7838721c5c1bc58f6de00bc1cbed54604 0006-rockchip-move-usb0-after-mmc1-in-default-boot-order.patch
|
|
3537d81c0a839f2a35e28ef0dc9126e3d175950a0752b363839970c64db4c5aa6afceb8912a2e0a3a09d14fceb94704be2f752a0c002ace51676e736a58ba435 0007-pinebook-pro-Fix-vcc_sdio-regulator-max-voltage.patch
|
|
e317f8527dbb3b8a40a45d20da6c42f8cfd98b968060d6b4f1fa5453736441d36d1048bdc4359af47c2129fa86b6d43b3e263ef282f5c7b2e54f702d8b6bd8b1 pine64.bmp
|
|
"
|