Skip to content

Commit

Permalink
rockchip64/uboot: increase rng-seed size to make it sufficient for mo…
Browse files Browse the repository at this point in the history
…dern linux
  • Loading branch information
alex3d committed Oct 11, 2024
1 parent 1c79dad commit 0828d2a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions patch/u-boot/v2024.07/rockchip-fix-rng-seed.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alex Shumsky <[email protected]>
Date: Tue, 11 Oct 2024 17:54:53 +0000
Subject: Make rockchip rng-seed sufficient size to initialize modern linux

Signed-off-by: Alex Shumsky <[email protected]>
---
arch/arm/mach-rockchip/board.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index cd226844b6..e84fc0c7fa 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -478,11 +478,11 @@ __weak int misc_init_r(void)

/* Use hardware rng to seed Linux random. */
__weak int board_rng_seed(struct abuf *buf)
{
struct udevice *dev;
- size_t len = 0x8;
+ size_t len = 32;
u64 *data;

data = malloc(len);
if (!data) {
printf("Out of memory\n");
--
Created with Armbian build tools https://github.com/armbian/build

0 comments on commit 0828d2a

Please sign in to comment.