diff --git a/temp/u-boot-pinephone/APKBUILD b/temp/u-boot-pinephone/APKBUILD new file mode 100644 index 000000000..a7800f0a7 --- /dev/null +++ b/temp/u-boot-pinephone/APKBUILD @@ -0,0 +1,40 @@ +# U-boot with patches to make the PinePhone boot faster and have control over the ddr clock speed + +pkgname=u-boot-pinephone +pkgver=2020.04_git20200228 +pkgrel=0 +_commit="ec643935990b517e96ba9676eb0093b9bec96189" +pkgdesc="u-boot bootloader for the PINE64 PinePhone" +url="https://gitlab.com/pine64-org/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 bc dtc python3-dev swig bison flex openssl-dev arm-trusted-firmware-sun50i" +options="!check" +source=" + $pkgname-$_commit.tar.gz::https://gitlab.com/pine64-org/u-boot/-/archive/$_commit/u-boot-$_commit.tar.gz + dram-speed.patch + " +builddir="$srcdir"/u-boot-$_commit + +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-sun50i/bl31.bin" + export BUILD_DIR="$builddir"/build + mkdir -p "$BUILD_DIR" + make O="$BUILD_DIR" HOSTCC=gcc ARCH=arm pinephone_defconfig + make O="$BUILD_DIR" HOSTCC=gcc ARCH=arm all +} + +package() { + cd "$builddir"/build + install -D -m644 "u-boot-sunxi-with-spl.bin" \ + "$pkgdir"/usr/share/u-boot/pine64-pinephone/u-boot-sunxi-with-spl.bin +} + + +sha512sums="3fec7e60b04539ddab241920a8e691acf2695e049fa726f52de632b40828a6f9db51c4b260364bb41dad9878d771b6024d6733d8957abbcee805049e3905d933 u-boot-pinephone-ec643935990b517e96ba9676eb0093b9bec96189.tar.gz +0331e05f9077eb4c8219b5fa804a8372a0ca20957cacfdff618d2045f64949581418aef4dfef2e87c31ca218c9ac22e20cf8021b679c5fa7cfb9f89876da02fa dram-speed.patch" diff --git a/temp/u-boot-pinephone/dram-speed.patch b/temp/u-boot-pinephone/dram-speed.patch new file mode 100644 index 000000000..8562b2062 --- /dev/null +++ b/temp/u-boot-pinephone/dram-speed.patch @@ -0,0 +1,13 @@ +diff --git a/configs/pinephone_defconfig b/configs/pinephone_defconfig +index f4b9f6adaa..ad5bff5132 100644 +--- a/configs/pinephone_defconfig ++++ b/configs/pinephone_defconfig +@@ -5,7 +5,7 @@ CONFIG_SPL=y + CONFIG_IDENT_STRING="" + CONFIG_MACH_SUN50I=y + CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y +-CONFIG_DRAM_CLK=552 ++CONFIG_DRAM_CLK=624 + CONFIG_DRAM_ZQ=3881949 + CONFIG_MMC_SUNXI_SLOT_EXTRA=2 + # CONFIG_VIDEO_DE2 is not set