u-boot: Remove customized build

This commit is contained in:
Samuel Dionne-Riel 2021-05-11 19:05:42 -04:00
parent 5e3882d207
commit fb057b9eca
7 changed files with 0 additions and 268 deletions

View File

@ -4,13 +4,6 @@ let
inherit (final) callPackage kernelPatches linuxPackagesFor;
in
{
# Alternative BSP u-boot, with nvme support if desired
# * https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-pinebookpro
uBootPinebookPro = callPackage ./u-boot {};
uBootPinebookProExternalFirst = callPackage ./u-boot {
externalFirst = true;
};
# The unqualified kernel attr is deprecated.
linux_pinebookpro = throw "The linux_pinebookpro attribute has been replaced by linux_pinebookpro_latest.";
linuxPackages_pinebookpro = throw "The linuxPackages_pinebookpro attribute has been replaced by linuxPackages_pinebookpro_latest.";

View File

@ -1,52 +0,0 @@
From f62ba28ac93ebc759d9774cbffe7ce6ae22a51c0 Mon Sep 17 00:00:00 2001
From: dhivael <dhivael.git@eno.space>
Date: Sat, 11 Jan 2020 15:04:46 +0100
Subject: [PATCH 1/5] 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 4fda93b1527..e24b39486d0 100644
--- a/arch/arm/mach-rockchip/rk3399/rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/rk3399.c
@@ -19,6 +19,8 @@
#include <asm/arch-rockchip/hardware.h>
#include <linux/bitops.h>
#include <power/regulator.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/rockchip.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -119,8 +121,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 */
@@ -153,6 +155,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,
--
2.25.3

View File

@ -1,25 +0,0 @@
From f44bd5bb5fefea8404489c3e14f8537300fa3fb6 Mon Sep 17 00:00:00 2001
From: dhivael <dhivael.git@eno.space>
Date: Sat, 11 Jan 2020 15:12:34 +0100
Subject: [PATCH 2/5] reduce pinebook_pro bootdelay to 1
---
configs/pinebook-pro-rk3399_defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configs/pinebook-pro-rk3399_defconfig b/configs/pinebook-pro-rk3399_defconfig
index 18b2d74253b..297cc5f17a5 100644
--- a/configs/pinebook-pro-rk3399_defconfig
+++ b/configs/pinebook-pro-rk3399_defconfig
@@ -10,7 +10,7 @@ CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_SPL_SPI_FLASH_SUPPORT=y
CONFIG_SPL_SPI_SUPPORT=y
CONFIG_DEBUG_UART=y
-CONFIG_BOOTDELAY=3
+CONFIG_BOOTDELAY=1
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-pinebook-pro.dtb"
CONFIG_MISC_INIT_R=y
CONFIG_DISPLAY_BOARDINFO_LATE=y
--
2.25.3

View File

@ -1,29 +0,0 @@
From dd52b971005271d615e63f4f946a0ee9331925bc Mon Sep 17 00:00:00 2001
From: dhivael <dhivael.git@eno.space>
Date: Sat, 11 Jan 2020 15:04:04 +0100
Subject: [PATCH 3/5] rockchip: move mmc1 before mmc0 in default boot order
on pinebooks mmc1 is the external card, which should take boot priority
over the internal emmc even if the emmc is bootable.
---
include/configs/rockchip-common.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index 0b9e24d1db4..6610f95b7b9 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -17,8 +17,8 @@
/* First try to boot from SD (index 0), then eMMC (index 1) */
#if CONFIG_IS_ENABLED(CMD_MMC)
#define BOOT_TARGET_MMC(func) \
- func(MMC, mmc, 0) \
- func(MMC, mmc, 1)
+ func(MMC, mmc, 1) \
+ func(MMC, mmc, 0)
#else
#define BOOT_TARGET_MMC(func)
#endif
--
2.25.3

View File

@ -1,55 +0,0 @@
From 4b11a4444983c997addc5c581da1ec287f27fa47 Mon Sep 17 00:00:00 2001
From: dhivael <dhivael.git@eno.space>
Date: Sat, 11 Jan 2020 15:04:04 +0100
Subject: [PATCH 4/5] rockchip: move usb0 after mmc1 in default boot order
now that we support booting from USB we should prefer USB boot over eMMC
boot. we still try to boot from SD cards first.
---
include/configs/rockchip-common.h | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index 6610f95b7b9..d743ebe83e6 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -16,11 +16,10 @@
/* First try to boot from SD (index 0), then eMMC (index 1) */
#if CONFIG_IS_ENABLED(CMD_MMC)
- #define BOOT_TARGET_MMC(func) \
- func(MMC, mmc, 1) \
- func(MMC, mmc, 0)
+ #define BOOT_TARGET_MMC(func, idx) \
+ func(MMC, mmc, idx)
#else
- #define BOOT_TARGET_MMC(func)
+ #define BOOT_TARGET_MMC(func, idx)
#endif
#if CONFIG_IS_ENABLED(CMD_NVME)
@@ -55,16 +54,18 @@
#ifdef CONFIG_ROCKCHIP_RK3399
#define BOOT_TARGET_DEVICES(func) \
- BOOT_TARGET_MMC(func) \
- BOOT_TARGET_NVME(func) \
+ BOOT_TARGET_MMC(func, 1) \
BOOT_TARGET_USB(func) \
+ BOOT_TARGET_NVME(func) \
+ BOOT_TARGET_MMC(func, 0) \
BOOT_TARGET_PXE(func) \
BOOT_TARGET_DHCP(func) \
BOOT_TARGET_SF(func)
#else
#define BOOT_TARGET_DEVICES(func) \
- BOOT_TARGET_MMC(func) \
+ BOOT_TARGET_MMC(func, 1) \
BOOT_TARGET_USB(func) \
+ BOOT_TARGET_MMC(func, 0) \
BOOT_TARGET_PXE(func) \
BOOT_TARGET_DHCP(func)
#endif
--
2.25.3

View File

@ -1,25 +0,0 @@
From 70ea0ddc9cea88ef06a685a09b2d407db60bceae Mon Sep 17 00:00:00 2001
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
Date: Mon, 6 Jan 2020 20:16:27 -0500
Subject: [PATCH 5/5] HACK: Add changing LEDs signal at boot on pinebook pro
---
include/configs/pinebook-pro-rk3399.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/configs/pinebook-pro-rk3399.h b/include/configs/pinebook-pro-rk3399.h
index d478b19917d..3c7ca9e7600 100644
--- a/include/configs/pinebook-pro-rk3399.h
+++ b/include/configs/pinebook-pro-rk3399.h
@@ -8,6 +8,8 @@
#define __PINEBOOK_PRO_RK3399_H
#define ROCKCHIP_DEVICE_SETTINGS \
+ "beep_boop=led green:power on; led red:standby on; sleep 0.1; led green:power off; sleep 0.1; led green:power on; sleep 0.1; led red:standby off; sleep 0.1; led red:standby on\0" \
+ "bootcmd=run beep_boop; run distro_bootcmd\0" \
"stdin=serial,usbkbd\0" \
"stdout=serial,vidconsole\0" \
"stderr=serial,vidconsole\0"
--
2.25.3

View File

@ -1,75 +0,0 @@
{ buildUBoot
, lib
, python
, armTrustedFirmwareRK3399
, fetchpatch
, fetchFromGitLab
, fetchFromGitHub
, externalFirst ? false
}:
let
pw = id: sha256: fetchpatch {
inherit sha256;
name = "${id}.patch";
url = "https://patchwork.ozlabs.org/patch/${id}/raw/";
};
atf = armTrustedFirmwareRK3399.overrideAttrs(oldAttrs: {
src = fetchFromGitHub {
owner = "ARM-software";
repo = "arm-trusted-firmware";
rev = "9935047b2086faa3bf3ccf0b95a76510eb5a160b";
sha256 = "1a6pm0nbgm5r3a41nwlkrli90l2blcijb02li7h75xcri6rb7frk";
};
version = "2020-06-17";
});
in
(buildUBoot {
defconfig = "pinebook-pro-rk3399_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${atf}/bl31.elf";
filesToInstall = [
"idbloader.img"
"u-boot.itb"
".config"
];
extraPatches = [
# Dhivael patchset
# ----------------
#
# Origin: https://git.eno.space/pbp-uboot.git/
# Forward ported to 2020.07
./0001-rk3399-light-pinebook-power-and-standby-leds-during-.patch
./0002-reduce-pinebook_pro-bootdelay-to-1.patch
# samueldr's patchset
# -------------------
./0005-HACK-Add-changing-LEDs-signal-at-boot-on-pinebook-pr.patch
] ++ lib.optionals (externalFirst) [
# Origin: https://git.eno.space/pbp-uboot.git/
# Forward ported to 2020.07
./0003-rockchip-move-mmc1-before-mmc0-in-default-boot-order.patch
./0004-rockchip-move-usb0-after-mmc1-in-default-boot-order.patch
];
})
.overrideAttrs(oldAttrs: {
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [
python
];
postPatch = oldAttrs.postPatch + ''
patchShebangs arch/arm/mach-rockchip/
'';
src = fetchFromGitLab {
domain = "gitlab.denx.de";
owner = "u-boot";
repo = "u-boot";
sha256 = "11154cxycw81dnmxfl10n2mgyass18jhjpwygqp7w1vjk9hgi4lw";
rev = "v2020.07";
};
})