pinebookpro-uboot: update to 2010.10.
Switch from forked repo to upstream repo. Also use the atf-rk3399-bl31 package for ARM trusted firmware blob. closes #21199
This commit is contained in:
parent
eaa1a6c028
commit
39f9f33215
|
@ -1,20 +0,0 @@
|
|||
--- pbp-uboot/Makefileg 2020-09-12 15:05:30.139856893 +0200
|
||||
+++ pbp-uboot/Makefile 2020-09-12 15:06:45.963853869 +0200
|
||||
@@ -273,7 +273,7 @@
|
||||
|
||||
HOSTCC = cc
|
||||
HOSTCXX = c++
|
||||
-HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
|
||||
+HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fcommon \
|
||||
$(if $(CONFIG_TOOLS_DEBUG),-g)
|
||||
HOSTCXXFLAGS = -O2
|
||||
|
||||
@@ -413,7 +413,7 @@
|
||||
KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__
|
||||
|
||||
KBUILD_CFLAGS := -Wall -Wstrict-prototypes \
|
||||
- -Wno-format-security \
|
||||
+ -Wno-format-security -fcommon \
|
||||
-fno-builtin -ffreestanding $(CSTD_FLAG)
|
||||
KBUILD_CFLAGS += -fshort-wchar -fno-strict-aliasing
|
||||
KBUILD_AFLAGS := -D__ASSEMBLY__
|
|
@ -0,0 +1,32 @@
|
|||
commit e061f5477ee8e8d14267c4ab98dd451d7ce137be
|
||||
Author: Cameron Nemo <cnemo@tutanota.com>
|
||||
Date: Mon Sep 7 09:14:07 2020 -0700
|
||||
|
||||
rockchip: Pinebook Pro: do not delay autoboot
|
||||
|
||||
Use a key combo for preventing autoboot rather than delaying boot speed.
|
||||
Delaying boot speed on an end user portable device can lead to bad UX.
|
||||
|
||||
Signed-off-by: Cameron Nemo <cnemo@tutanota.com>
|
||||
|
||||
diff --git configs/pinebook-pro-rk3399_defconfig configs/pinebook-pro-rk3399_defconfig
|
||||
index 9a7487b04f..e9605a0ffd 100644
|
||||
--- configs/pinebook-pro-rk3399_defconfig
|
||||
+++ configs/pinebook-pro-rk3399_defconfig
|
||||
@@ -11,7 +11,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||
CONFIG_SPL_SPI_SUPPORT=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="rk3399-pinebook-pro"
|
||||
CONFIG_DEBUG_UART=y
|
||||
-CONFIG_BOOTDELAY=3
|
||||
+CONFIG_BOOTDELAY=0
|
||||
CONFIG_USE_PREBOOT=y
|
||||
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-pinebook-pro.dtb"
|
||||
CONFIG_MISC_INIT_R=y
|
||||
@@ -87,3 +87,7 @@ CONFIG_VIDEO_ROCKCHIP=y
|
||||
CONFIG_DISPLAY_ROCKCHIP_EDP=y
|
||||
CONFIG_SPL_TINY_MEMSET=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
+CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds... press q or Ctrl-C to interrupt\n"
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_AUTOBOOT_STOP_STR="q"
|
||||
+CONFIG_AUTOBOOT_KEYED_CTRLC=y
|
|
@ -0,0 +1,51 @@
|
|||
From 1a01021c9361c4e017cb5b032300f5555c393710 Mon Sep 17 00:00:00 2001
|
||||
From: dhivael <dhivael.git@eno.space>
|
||||
Date: Sat, 11 Jan 2020 15:04:46 +0100
|
||||
Subject: rk3399: light pinebook power and standby leds during early boot
|
||||
|
||||
this is a hack, but it works for now.
|
||||
---
|
||||
arch/arm/mach-rockchip/rk3399/rk3399.c | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c
|
||||
index 863024d071..cf37129d55 100644
|
||||
--- arch/arm/mach-rockchip/rk3399/rk3399.c
|
||||
+++ arch/arm/mach-rockchip/rk3399/rk3399.c
|
||||
@@ -15,6 +15,8 @@
|
||||
#include <asm/arch-rockchip/grf_rk3399.h>
|
||||
#include <asm/arch-rockchip/hardware.h>
|
||||
#include <power/regulator.h>
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/pinctrl/rockchip.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
@@ -115,8 +117,8 @@ void board_debug_uart_init(void)
|
||||
struct rk3399_grf_regs * const grf = (void *)GRF_BASE;
|
||||
#ifdef CONFIG_TARGET_CHROMEBOOK_BOB
|
||||
struct rk3399_pmugrf_regs * const pmugrf = (void *)PMUGRF_BASE;
|
||||
- struct rockchip_gpio_regs * const gpio = (void *)GPIO0_BASE;
|
||||
#endif
|
||||
+ struct rockchip_gpio_regs * const gpio = (void *)GPIO0_BASE;
|
||||
|
||||
#if defined(CONFIG_DEBUG_UART_BASE) && (CONFIG_DEBUG_UART_BASE == 0xff180000)
|
||||
/* Enable early UART0 on the RK3399 */
|
||||
@@ -149,6 +151,14 @@ void board_debug_uart_init(void)
|
||||
spl_gpio_set_pull(&pmugrf->gpio0_p, GPIO(BANK_B, 4), GPIO_PULL_NORMAL);
|
||||
#endif /* CONFIG_TARGET_CHROMEBOOK_BOB */
|
||||
|
||||
+ {
|
||||
+ // set GPIO0_A2/B3 to GPIO_ACTIVE_HIGH
|
||||
+ // set GPIO0_A2/B3 to OUTPUT
|
||||
+ int mask = (1UL << RK_PA2) | (1UL << RK_PB3);
|
||||
+ setbits_le32(&gpio->swport_dr, mask);
|
||||
+ setbits_le32(&gpio->swport_ddr, mask);
|
||||
+ }
|
||||
+
|
||||
/* Enable early UART2 channel C on the RK3399 */
|
||||
rk_clrsetreg(&grf->gpio4c_iomux,
|
||||
GRF_GPIO4C3_SEL_MASK,
|
||||
--
|
||||
cgit v1.2.3
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
commit 265376282a58c71f1ec9215653e98c602524b91c
|
||||
Author: Cameron Nemo <cnemo@tutanota.com>
|
||||
Date: Mon Sep 7 08:37:24 2020 -0700
|
||||
|
||||
rockchip: Pinebook Pro: fix mmc boot ordering
|
||||
|
||||
On the Pinebook Pro, and perhaps some other boards, the mmc indices are
|
||||
opposite from what is implied by the comment in
|
||||
include/configs/rockchip-common.h.
|
||||
|
||||
This commit fixes the boot ordering to prioritize the SD card over eMMC.
|
||||
|
||||
Most distributions of U-Boot that actually target rk3399 boards apply a
|
||||
similar patch, such as Manjaro (shipped by default on PBP) and armbian.
|
||||
|
||||
https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-pinebookpro/-/blob/60ed56b9bf8809309ec6252bfc45bca38c2b858a/0002-Correct-boot-order-to-be-USB-SD-eMMC.patch
|
||||
https://github.com/armbian/build/blob/5a2b2c360b9c26ca4bd0d309af7cd3994fd08b7d/patch/u-boot/u-boot-rockchip64-mainline/general-prioritize-sd.patch
|
||||
|
||||
Signed-off-by: Cameron Nemo <cnemo@tutanota.com>
|
||||
|
||||
diff --git include/configs/pinebook-pro-rk3399.h include/configs/pinebook-pro-rk3399.h
|
||||
index d478b19917..59780bfb0b 100644
|
||||
--- include/configs/pinebook-pro-rk3399.h
|
||||
+++ include/configs/pinebook-pro-rk3399.h
|
||||
@@ -14,6 +14,14 @@
|
||||
|
||||
#include <configs/rk3399_common.h>
|
||||
|
||||
+/* On Pinebook Pro, mmc1 is SD and mmc0 is eMMC */
|
||||
+#if CONFIG_IS_ENABLED(CMD_MMC)
|
||||
+ #undef BOOT_TARGET_MMC
|
||||
+ #define BOOT_TARGET_MMC(func) \
|
||||
+ func(MMC, mmc, 1) \
|
||||
+ func(MMC, mmc, 0)
|
||||
+#endif
|
||||
+
|
||||
#define SDRAM_BANK_SIZE (2UL << 30)
|
||||
|
||||
#define CONFIG_USB_OHCI_NEW
|
|
@ -1,39 +1,23 @@
|
|||
# Template file for 'pinebookpro-uboot'
|
||||
pkgname=pinebookpro-uboot
|
||||
reverts="20200212_1 20200212_2"
|
||||
version=0.0.20200212
|
||||
revision=4
|
||||
_commit_uboot=365495a329c8e92ca4c134562d091df71b75845e
|
||||
_commit_atf=22d12c4148c373932a7a81e5d1c59a767e143ac2
|
||||
version=2020.10
|
||||
revision=1
|
||||
archs="aarch64*"
|
||||
hostmakedepends="git flex cross-arm-none-eabi dtc python3 bc"
|
||||
wrksrc="u-boot-${version}"
|
||||
hostmakedepends="flex bc dtc python3"
|
||||
makedepends="atf-rk3399-bl31"
|
||||
depends="u-boot-tools"
|
||||
short_desc="U-Boot for Pinebook Pro"
|
||||
maintainer="Renato Aguiar <renato@renatoaguiar.net>"
|
||||
license="GPL-2.0-only, BSD-3-Clause"
|
||||
homepage="https://git.eno.space/pbp-uboot"
|
||||
|
||||
do_fetch() {
|
||||
mkdir -p "${wrksrc}"
|
||||
|
||||
cd "${wrksrc}"
|
||||
git clone https://git.eno.space/pbp-uboot.git
|
||||
cd pbp-uboot
|
||||
git reset --hard ${_commit_uboot}
|
||||
|
||||
cd "${wrksrc}"
|
||||
git clone https://github.com/ARM-software/arm-trusted-firmware.git
|
||||
cd arm-trusted-firmware
|
||||
git reset --hard ${_commit_atf}
|
||||
}
|
||||
homepage="https://www.denx.de/wiki/U-Boot/"
|
||||
distfiles="https://ftp.denx.de/pub/u-boot/u-boot-${version}.tar.bz2"
|
||||
checksum=0d481bbdc05c0ee74908ec2f56a6daa53166cc6a78a0e4fac2ac5d025770a622
|
||||
|
||||
do_configure() {
|
||||
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
|
||||
|
||||
cd pbp-uboot
|
||||
patch -Np1 -i ${FILESDIR}/fcommon-Makefile.patch
|
||||
make ${makejobs} pinebook_pro-rk3399_defconfig
|
||||
echo 'CONFIG_IDENT_STRING=" Voidlinux"' >> .config
|
||||
make ${makejobs} pinebook-pro-rk3399_defconfig
|
||||
}
|
||||
|
||||
do_build() {
|
||||
|
@ -41,22 +25,19 @@ do_build() {
|
|||
if [ "$CROSS_BUILD" ]; then
|
||||
export CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-
|
||||
fi
|
||||
|
||||
cd arm-trusted-firmware
|
||||
make ${makejobs} PLAT=rk3399
|
||||
|
||||
cd ../pbp-uboot
|
||||
make ${makejobs} EXTRAVERSION=-${revision} \
|
||||
BL31=../arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf
|
||||
BL31="${XBPS_CROSS_BASE}/usr/lib/trusted-firmware-a/rk3399/bl31.elf"
|
||||
}
|
||||
|
||||
do_install() {
|
||||
cd pbp-uboot
|
||||
vmkdir boot
|
||||
vinstall idbloader.img 0644 boot
|
||||
vinstall u-boot.itb 0644 boot
|
||||
vinstall idbloader.img 0644 usr/lib/pinebookpro-uboot
|
||||
vinstall u-boot.itb 0644 usr/lib/pinebookpro-uboot
|
||||
# FWIW this file is not at all specific to the PBP and will overwrite any custom
|
||||
# u-boot boot.scr files that a user installs into /boot.
|
||||
# I would like to remove it, but it could cause breakage for existing setups.
|
||||
# It would also require some changes to void-mklive to configure u-boot suitably.
|
||||
vinstall "${FILESDIR}/kernel.d/uboot" 750 \
|
||||
etc/kernel.d/post-install 60-uboot
|
||||
etc/kernel.d/post-install 60-uboot
|
||||
|
||||
vlicense Licenses/Exceptions
|
||||
vlicense Licenses/OFL.txt
|
||||
|
|
Loading…
Reference in New Issue