Skip to content

Commit

Permalink
pkg: pine64: uboot-pinephone: upgrade to v2023.01
Browse files Browse the repository at this point in the history
Signed-off-by: Danct12 <[email protected]>
  • Loading branch information
Danct12 committed Jan 19, 2023
1 parent 9b1ab0a commit bcc3ab3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 35 deletions.
44 changes: 18 additions & 26 deletions PKGBUILDS/pine64/uboot-pinephone/0001-expose-DRAM-clock-speed.patch
Original file line number Diff line number Diff line change
@@ -1,52 +1,44 @@
From b94ee51a5d818e55b3288d2fa3cbc27837981307 Mon Sep 17 00:00:00 2001
From 4061bf81c366ccb309e2e597c5012ca246809b3a Mon Sep 17 00:00:00 2001
From: Bobby The Builder <[email protected]>
Date: Mon, 29 Mar 2021 16:42:07 -0400
Subject: [PATCH] expose DRAM clock speed
Date: Thu, 12 Jan 2023 10:23:39 -0500
Subject: [PATCH] common: expose DRAM clock speed

---
common/board_f.c | 6 ++++--
common/main.c | 7 +++++++
2 files changed, 11 insertions(+), 2 deletions(-)
common/board_f.c | 3 +++
common/main.c | 6 ++++++
2 files changed, 9 insertions(+)

diff --git a/common/board_f.c b/common/board_f.c
index 9f441c44f1..8e005337e6 100644
index e6117a7ba5..1fcfd3da86 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -226,12 +226,14 @@ static int show_dram_config(void)
print_size(gd->bd->bi_dram[i].size, "\n");
#endif
}
- debug("\nDRAM: ");
+ debug("\nDRAM Size: ");
@@ -251,6 +251,9 @@ static int show_dram_config(void)
debug("\nDRAM: ");

print_size(size, "");
board_add_ram_info(0);
putc('\n');
-
print_size(gd->ram_size, "");
+#if defined(CONFIG_DRAM_CLK)
+ printf("DRAM Clock: %d MHz\n", CONFIG_DRAM_CLK);
+ printf(" @ %d MHz", CONFIG_DRAM_CLK);
+#endif
return 0;
}

if (!sizes_near(gd->ram_size, size)) {
printf(" (effective ");
print_size(size, ")");
diff --git a/common/main.c b/common/main.c
index 4b3cd302c3..1dbb44060d 100644
index 682f3359ea..877df4c858 100644
--- a/common/main.c
+++ b/common/main.c
@@ -45,6 +45,13 @@ void main_loop(void)
@@ -46,6 +46,12 @@ void main_loop(void)
if (IS_ENABLED(CONFIG_VERSION_VARIABLE))
env_set("ver", version_string); /* set version variable */

+#if defined(CONFIG_DRAM_CLK)
+ char ram_clk_string[11];
+ sprintf(ram_clk_string, "%d", CONFIG_DRAM_CLK);
+ int ret = env_set("ram_freq", ram_clk_string);
+ printf("Set ram_freq : %s\n", ram_clk_string);
+ env_set("ram_freq", ram_clk_string);
+#endif
+
cli_init();

if (IS_ENABLED(CONFIG_USE_PREBOOT))
--
2.30.2
2.38.1

18 changes: 9 additions & 9 deletions PKGBUILDS/pine64/uboot-pinephone/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
buildarch=8

pkgname=uboot-pinephone
pkgver=2022.01
pkgrel=5
pkgver=2023.01
pkgrel=1
pkgdesc="U-Boot for PinePhone"
arch=('aarch64')
url='http://www.denx.de/wiki/U-Boot/WebHome'
Expand All @@ -15,10 +15,10 @@ makedepends=('bc' 'python' 'swig' 'dtc' 'python-setuptools')
install=${pkgname}.install
backup=("boot/boot.txt")

_commit_atf="d005bfcdff423fc84f03c657e0dcdb4b45621b22"
_commit_atf="9881bb93a3bc0a3ea37e9f093e09ab4b360a9e48" # v2.8.0

source=("https://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}.tar.bz2"
"arm-trusted-firmware-$_commit_atf.tar.gz::https://github.com/crust-firmware/arm-trusted-firmware/archive/${_commit_atf}.tar.gz"
"arm-trusted-firmware-$_commit_atf.tar.gz::https://github.com/ARM-software/arm-trusted-firmware/archive/${_commit_atf}.tar.gz"
'0001-ATF-set-fno-stack-protector.patch'
'0001-expose-DRAM-clock-speed.patch'
'Improve-Allwinner-A64-timer-workaround.patch'
Expand All @@ -27,10 +27,10 @@ source=("https://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}.tar.bz2"
'mkscr'
'update-u-boot'
'scp.bin')
md5sums=('49ba74a214d14c6340c8067bc1ed5fa0'
'0724b567a680e98d3240648ea14183ba'
md5sums=('fa1248787e7539b276fa59d2949a9f2f'
'01f399b325067c1b0a21e7d0a8215370'
'348a6943a1c220047ce5312b59da95b6'
'061a510280d16bddf16679cf0d23bf6e'
'94be8e4e552213ca3820d2d4ef76e9a8'
'98ad5f31b1d7ff2e6e03555f29ebc6e6'
'fb9def68f0b44c69f88f7923e21379cc'
'06c27a80909035513aac45036e8d954b'
Expand All @@ -55,8 +55,8 @@ build() {

cd arm-trusted-firmware-${_commit_atf}

make PLAT=sun50i_a64 DEBUG=1 bl31
cp build/sun50i_a64/debug/bl31.bin ../u-boot-${pkgver/rc/-rc}
make PLAT=sun50i_a64 DEBUG=0 bl31 SUNXI_AMEND_DTB=1
cp build/sun50i_a64/release/bl31.bin ../u-boot-${pkgver/rc/-rc}

cd ../u-boot-${pkgver/rc/-rc}

Expand Down

0 comments on commit bcc3ab3

Please sign in to comment.