pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils properly fix reboots for rk3399 ATF, by pulli...
details: https://anonhg.NetBSD.org/pkgsrc/rev/7513921bdef9
branches: trunk
changeset: 411890:7513921bdef9
user: mrg <mrg%pkgsrc.org@localhost>
date: Sun Feb 23 01:01:11 2020 +0000
description:
properly fix reboots for rk3399 ATF, by pulling in
https://github.com/ARM-software/arm-trusted-firmware/commit/d52331d01e0efae36e837af90887a8aed33ff604#diff-94a9f1c135591eedd6addbcc729f46fb
and removing my hack.
switch rk3399 ATF to release builds over debug builds.
bump both u-boot-pinebook-pro & arm-trusted-firmware-rk3399.
diffstat:
sysutils/arm-trusted-firmware-rk3399/Makefile | 15 ++-
sysutils/arm-trusted-firmware-rk3399/buildlink3.mk | 4 +-
sysutils/arm-trusted-firmware-rk3399/distinfo | 9 +-
sysutils/arm-trusted-firmware-rk3399/patches/patch-plat_rockchip_common_params_setup.c | 52 ++++++++++
sysutils/arm-trusted-firmware-rk3399/patches/patch-plat_rockchip_rk3399_drivers_pmu_pmu.c | 14 +--
sysutils/arm-trusted-firmware-rk3399/patches/patch-plat_rockchip_rk3399_drivers_pmu_pmu.h | 5 +-
sysutils/arm-trusted-firmware-rk3399/patches/patch-plat_rockchip_rk3399_drivers_soc_soc.c | 5 +-
sysutils/u-boot-pinebook-pro/Makefile | 4 +-
8 files changed, 75 insertions(+), 33 deletions(-)
diffs (214 lines):
diff -r 82e7f1f59705 -r 7513921bdef9 sysutils/arm-trusted-firmware-rk3399/Makefile
--- a/sysutils/arm-trusted-firmware-rk3399/Makefile Sun Feb 23 00:13:14 2020 +0000
+++ b/sysutils/arm-trusted-firmware-rk3399/Makefile Sun Feb 23 01:01:11 2020 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.2 2020/02/22 11:55:36 mrg Exp $
+# $NetBSD: Makefile,v 1.3 2020/02/23 01:01:11 mrg Exp $
VERSION= 2.2
-PKGREVISION= 1
+PKGREVISION= 2
GITHUB_PROJECT= arm-trusted-firmware
GITHUB_TAG= v2.2
#GITHUB_TAG= ab3d22473df279c61ed4d4873d26b072dcf887e8
@@ -24,7 +24,8 @@
MAKE_FLAGS+= M0_CROSS_COMPILE=${PREFIX}/cross-arm-none-eabi/bin/arm-none-eabi-
MAKE_FLAGS+= PLAT=${PLATFORM}
MAKE_FLAGS+= CFLAGS='-gdwarf-2'
-MAKE_FLAGS+= DEBUG=1
+#MAKE_FLAGS+= DEBUG=1
+#MAKE_FLAGS+= LOG_LEVEL=50
#MAKE_FLAGS+= V=1
MAKE_FLAGS+= BUILD_STRING=${GITHUB_TAG}
BUILD_TARGET= bl31
@@ -33,9 +34,15 @@
BUILD_DEPENDS+= cross-aarch64-none-elf-gcc-[0-9]*:../../cross/aarch64-none-elf-gcc
BUILD_DEPENDS+= cross-arm-none-eabi-gcc-[0-9]*:../../cross/arm-none-eabi-gcc
+.if empty(MAKE_FLAGS:MDEBUG=1)
+BL31_DIR=release
+.else
+BL31_DIR=debug
+.endif
+
do-install:
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/arm-trusted-firmware/${PLATFORM}
- ${INSTALL_DATA} ${WRKSRC}/build/${PLATFORM}/debug/bl31/bl31.elf \
+ ${INSTALL_DATA} ${WRKSRC}/build/${PLATFORM}/${BL31_DIR}/bl31/bl31.elf \
${DESTDIR}${PREFIX}/share/arm-trusted-firmware/${PLATFORM}/
# XXX kludge. pkgsrc passes down run path flags in LDFLAGS assuming
diff -r 82e7f1f59705 -r 7513921bdef9 sysutils/arm-trusted-firmware-rk3399/buildlink3.mk
--- a/sysutils/arm-trusted-firmware-rk3399/buildlink3.mk Sun Feb 23 00:13:14 2020 +0000
+++ b/sysutils/arm-trusted-firmware-rk3399/buildlink3.mk Sun Feb 23 01:01:11 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.3 2020/02/22 11:55:36 mrg Exp $
+# $NetBSD: buildlink3.mk,v 1.4 2020/02/23 01:01:11 mrg Exp $
BUILDLINK_DEPMETHOD.arm-trusted-firmware-rk3399?= build
@@ -7,7 +7,7 @@
.if !defined(ARM_TRUSTED_FIRMWARE_RK3399_BUILDLINK3_MK)
ARM_TRUSTED_FIRMWARE_RK3399_BUILDLINK3_MK:=
-BUILDLINK_API_DEPENDS.arm-trusted-firmware-rk3399+= arm-trusted-firmware-rk3399>=2.2nb1
+BUILDLINK_API_DEPENDS.arm-trusted-firmware-rk3399+= arm-trusted-firmware-rk3399>=2.2nb2
BUILDLINK_PKGSRCDIR.arm-trusted-firmware-rk3399?= ../../sysutils/arm-trusted-firmware-rk3399
.endif # ARM_TRUSTED_FIRMWARE_RK3399_BUILDLINK3_MK
diff -r 82e7f1f59705 -r 7513921bdef9 sysutils/arm-trusted-firmware-rk3399/distinfo
--- a/sysutils/arm-trusted-firmware-rk3399/distinfo Sun Feb 23 00:13:14 2020 +0000
+++ b/sysutils/arm-trusted-firmware-rk3399/distinfo Sun Feb 23 01:01:11 2020 +0000
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.2 2020/02/22 11:55:36 mrg Exp $
+$NetBSD: distinfo,v 1.3 2020/02/23 01:01:11 mrg Exp $
SHA1 (arm-trusted-firmware-2.2.zip) = 95bd4fc50b233ffffef87fe209756811a813f284
RMD160 (arm-trusted-firmware-2.2.zip) = 615b7a60e3293dee8686cfca8bca3a83fea5ff88
SHA512 (arm-trusted-firmware-2.2.zip) = 84fd95b14b5363b1a98482b71bde6915e8e36e832260371343fd576245124abfeb017ee5898996c373efcc46d03210b86ab665446aa1f7a3c9e4f290d2137f37
Size (arm-trusted-firmware-2.2.zip) = 5205813 bytes
-SHA1 (patch-plat_rockchip_rk3399_drivers_pmu_pmu.c) = 3b14320a47c9606ce9f6c48d8c7b3e06ab9a0253
-SHA1 (patch-plat_rockchip_rk3399_drivers_pmu_pmu.h) = cfc458bd37c5467612d4d3b39bf4bfbb2f2ba27f
-SHA1 (patch-plat_rockchip_rk3399_drivers_soc_soc.c) = 06016302b793f1256a1baac46ab0a54f41332795
+SHA1 (patch-plat_rockchip_common_params_setup.c) = 4a53e20d8ff0500aee691f415801c574a07d2d7f
+SHA1 (patch-plat_rockchip_rk3399_drivers_pmu_pmu.c) = 64d3db54b8b3a9d25b955636a4338969dae05f5e
+SHA1 (patch-plat_rockchip_rk3399_drivers_pmu_pmu.h) = f3cc7c2ec114cb08d38e5e08e54eb4b34080da70
+SHA1 (patch-plat_rockchip_rk3399_drivers_soc_soc.c) = 3813ad5f37eeb5ae431fdb1eb779a0a74b9598a9
diff -r 82e7f1f59705 -r 7513921bdef9 sysutils/arm-trusted-firmware-rk3399/patches/patch-plat_rockchip_common_params_setup.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/arm-trusted-firmware-rk3399/patches/patch-plat_rockchip_common_params_setup.c Sun Feb 23 01:01:11 2020 +0000
@@ -0,0 +1,52 @@
+$NetBSD: patch-plat_rockchip_common_params_setup.c,v 1.1 2020/02/23 01:01:11 mrg Exp $
+
+https://github.com/ARM-software/arm-trusted-firmware/commit/d52331d01e0efae36e837af90887a8aed33ff604#diff-94a9f1c135591eedd6addbcc729f46fb
+
+ plat/rockchip: initialize reset and poweroff GPIOs with known invalid value
+
+ And return NULL if we didn't get them in bl aux params otherwise reset and poweroff
+ will be broken on platforms that do not have reset and poweroff GPIOs.
+
+ Fixes: c1185ff ("plat/rockchip: Switch to use new common BL aux parameter library")
+ Signed-off-by: Vasily Khoruzhick <anarsoul%gmail.com@localhost>
+ Change-Id: Ic6cf6383d8f05d745e2c5d5e1b1df38514ea8429
+
+--- plat/rockchip/common/params_setup.c.orig 2019-10-22 06:36:23.000000000 -0700
++++ plat/rockchip/common/params_setup.c 2020-02-22 16:35:59.372670386 -0800
+@@ -6,6 +6,7 @@
+
+ #include <assert.h>
+ #include <errno.h>
++#include <limits.h>
+ #include <string.h>
+
+ #include <lib/bl_aux_params/bl_aux_params.h>
+@@ -21,8 +22,8 @@
+ #include <plat_params.h>
+ #include <plat_private.h>
+
+-static struct bl_aux_gpio_info rst_gpio;
+-static struct bl_aux_gpio_info poweroff_gpio;
++static struct bl_aux_gpio_info rst_gpio = { .index = UINT_MAX };
++static struct bl_aux_gpio_info poweroff_gpio = { .index = UINT_MAX };
+ static struct bl_aux_gpio_info suspend_gpio[10];
+ uint32_t suspend_gpio_cnt;
+ static struct bl_aux_rk_apio_info suspend_apio;
+@@ -174,11 +175,17 @@
+
+ struct bl_aux_gpio_info *plat_get_rockchip_gpio_reset(void)
+ {
++ if (rst_gpio.index == UINT_MAX)
++ return NULL;
++
+ return &rst_gpio;
+ }
+
+ struct bl_aux_gpio_info *plat_get_rockchip_gpio_poweroff(void)
+ {
++ if (poweroff_gpio.index == UINT_MAX)
++ return NULL;
++
+ return &poweroff_gpio;
+ }
+
diff -r 82e7f1f59705 -r 7513921bdef9 sysutils/arm-trusted-firmware-rk3399/patches/patch-plat_rockchip_rk3399_drivers_pmu_pmu.c
--- a/sysutils/arm-trusted-firmware-rk3399/patches/patch-plat_rockchip_rk3399_drivers_pmu_pmu.c Sun Feb 23 00:13:14 2020 +0000
+++ b/sysutils/arm-trusted-firmware-rk3399/patches/patch-plat_rockchip_rk3399_drivers_pmu_pmu.c Sun Feb 23 01:01:11 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-plat_rockchip_rk3399_drivers_pmu_pmu.c,v 1.1 2020/02/22 11:55:36 mrg Exp $
+$NetBSD: patch-plat_rockchip_rk3399_drivers_pmu_pmu.c,v 1.2 2020/02/23 01:01:11 mrg Exp $
pull in https://github.com/ARM-software/arm-trusted-firmware/commit/b4899041e5f0b8e8b388c6511b5233516b8785ec
@@ -9,9 +9,6 @@
Signed-off-by: Piotr Szczepanik <piter75%gmail.com@localhost>
Change-Id: If41b12ba1dfcb2ba937361b58eafd50bf5c483d4
-with one additional change to force using the soft reset path,
-as the gpio one does not seem to work.
-
--- plat/rockchip/rk3399/drivers/pmu/pmu.c.orig 2019-10-22 06:36:23.000000000 -0700
+++ plat/rockchip/rk3399/drivers/pmu/pmu.c 2020-02-22 03:31:50.759523535 -0800
@@ -41,12 +38,3 @@
void rk3399_flush_l2_b(void)
{
uint32_t wait_cnt = 0;
-@@ -1504,7 +1523,7 @@
-
- rst_gpio = plat_get_rockchip_gpio_reset();
-
-- if (rst_gpio) {
-+ if (rst_gpio && 0) {
- gpio_set_direction(rst_gpio->index, GPIO_DIR_OUT);
- gpio_set_value(rst_gpio->index, rst_gpio->polarity);
- } else {
diff -r 82e7f1f59705 -r 7513921bdef9 sysutils/arm-trusted-firmware-rk3399/patches/patch-plat_rockchip_rk3399_drivers_pmu_pmu.h
--- a/sysutils/arm-trusted-firmware-rk3399/patches/patch-plat_rockchip_rk3399_drivers_pmu_pmu.h Sun Feb 23 00:13:14 2020 +0000
+++ b/sysutils/arm-trusted-firmware-rk3399/patches/patch-plat_rockchip_rk3399_drivers_pmu_pmu.h Sun Feb 23 01:01:11 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-plat_rockchip_rk3399_drivers_pmu_pmu.h,v 1.1 2020/02/22 11:55:36 mrg Exp $
+$NetBSD: patch-plat_rockchip_rk3399_drivers_pmu_pmu.h,v 1.2 2020/02/23 01:01:11 mrg Exp $
pull in https://github.com/ARM-software/arm-trusted-firmware/commit/b4899041e5f0b8e8b388c6511b5233516b8785ec
@@ -9,9 +9,6 @@
Signed-off-by: Piotr Szczepanik <piter75%gmail.com@localhost>
Change-Id: If41b12ba1dfcb2ba937361b58eafd50bf5c483d4
-with one additional change to force using the soft reset path,
-as the gpio one does not seem to work.
-
--- plat/rockchip/rk3399/drivers/pmu/pmu.h.orig 2019-10-22 06:36:23.000000000 -0700
+++ plat/rockchip/rk3399/drivers/pmu/pmu.h 2020-02-22 02:32:31.695012124 -0800
diff -r 82e7f1f59705 -r 7513921bdef9 sysutils/arm-trusted-firmware-rk3399/patches/patch-plat_rockchip_rk3399_drivers_soc_soc.c
--- a/sysutils/arm-trusted-firmware-rk3399/patches/patch-plat_rockchip_rk3399_drivers_soc_soc.c Sun Feb 23 00:13:14 2020 +0000
+++ b/sysutils/arm-trusted-firmware-rk3399/patches/patch-plat_rockchip_rk3399_drivers_soc_soc.c Sun Feb 23 01:01:11 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-plat_rockchip_rk3399_drivers_soc_soc.c,v 1.1 2020/02/22 11:55:36 mrg Exp $
+$NetBSD: patch-plat_rockchip_rk3399_drivers_soc_soc.c,v 1.2 2020/02/23 01:01:11 mrg Exp $
pull in https://github.com/ARM-software/arm-trusted-firmware/commit/b4899041e5f0b8e8b388c6511b5233516b8785ec
@@ -9,9 +9,6 @@
Signed-off-by: Piotr Szczepanik <piter75%gmail.com@localhost>
Change-Id: If41b12ba1dfcb2ba937361b58eafd50bf5c483d4
-with one additional change to force using the soft reset path,
-as the gpio one does not seem to work.
-
--- plat/rockchip/rk3399/drivers/soc/soc.c.orig 2020-02-22 02:30:58.094221102 -0800
+++ plat/rockchip/rk3399/drivers/soc/soc.c 2020-02-22 02:31:04.989130511 -0800
diff -r 82e7f1f59705 -r 7513921bdef9 sysutils/u-boot-pinebook-pro/Makefile
--- a/sysutils/u-boot-pinebook-pro/Makefile Sun Feb 23 00:13:14 2020 +0000
+++ b/sysutils/u-boot-pinebook-pro/Makefile Sun Feb 23 01:01:11 2020 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.6 2020/02/22 11:55:36 mrg Exp $
+# $NetBSD: Makefile,v 1.7 2020/02/23 01:01:11 mrg Exp $
-PKGREVISION= 4
+PKGREVISION= 5
UBOOT_TARGET= pinebook-pro
UBOOT_CONFIG= pinebook_pro-rk3399_defconfig
Home |
Main Index |
Thread Index |
Old Index