From patchwork Mon Mar 31 18:19:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herman Rimm X-Patchwork-Id: 41087 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 72DD127BBE9; Mon, 31 Mar 2025 19:21:37 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8C18027BBE2 for ; Mon, 31 Mar 2025 19:21:35 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzJl0-0002lT-DM; Mon, 31 Mar 2025 14:21:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tzJks-0002l1-Qq for guix-patches@gnu.org; Mon, 31 Mar 2025 14:21:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tzJks-0006oc-Gz for guix-patches@gnu.org; Mon, 31 Mar 2025 14:21:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=PlgkJOPOsAuUfxD6hJq6unz+k1qP9YIkxa4vnx18lTQ=; b=B6wfjho0xdKGVfV+vvfdvVGhOY0KRRIrJiMM3MmssdY/WUp7LMy9bVn9BmJ9iNUPlfUmG/Qy3tWL4ibt7MkeV+he9zcYEXMgcyGdM4oJRHpT98/22p/mQeA2ykULvSylmGPXfoFhYerzRAMR44/0GBZiks5nqTZylKLvkGVclFGl55e1vrFc6z+GWWMGuoUgcCWe4Q2x/sV6TBQpDWGlFJO6uMxsOztAgfo74i1sho5fkh6uTJk3QHFLTvuHoEjBGDwN20IvdfTvVAD468+whG21sylCIDzeELH+tmPFbFpwUr3+amMo6B+EHzUKtcSNUIbmuQFD8FOUZr8MQIWDPA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzJks-0003Io-CZ for guix-patches@gnu.org; Mon, 31 Mar 2025 14:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72987] [PATCH v4 1/3] gnu: bootloader: Add nanopi-r4s-rk3399-ddr3 bootloader. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 Mar 2025 18:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72987 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72987@debbugs.gnu.org Received: via spool by 72987-submit@debbugs.gnu.org id=B72987.174344524712561 (code B ref 72987); Mon, 31 Mar 2025 18:21:02 +0000 Received: (at 72987) by debbugs.gnu.org; 31 Mar 2025 18:20:47 +0000 Received: from localhost ([127.0.0.1]:42798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzJkc-0003GV-9M for submit@debbugs.gnu.org; Mon, 31 Mar 2025 14:20:46 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:42135 helo=email.rimm.ee) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tzJkN-0003DN-Gq for 72987@debbugs.gnu.org; Mon, 31 Mar 2025 14:20:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1743445219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PlgkJOPOsAuUfxD6hJq6unz+k1qP9YIkxa4vnx18lTQ=; b=LKJB6qU7WlmFISGdAcLUN964L0NP+jjjbc/d+oBy/8gGO15d74Ih/RGOejWvwySiVlKJBp CkbN61oP7uLuk0ND5i1HzoLLW6wigr/IIzTw1DwvJaOAURuCitGT8oObt+PEYlN3KEfGt3 0NbbFBv4VBrKf7DawoEhHtmhoKbsJcuLVwpLV4QhQY7sp5IFvWAgWsN3NQsdlEXAl9Gz1H v7wrYl1KqzbZA9gFZLko79/NNNz8p1vCpMmp11MlKS5eWTKB2wz2GUOGZorLji72GSrcgm /RyIBk9hMxIyU7PR/7PGwCNkRr7j39D9vfjNThDWJdMZ7zFgAyIYhQ7//TrngQ== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 1df0c2d8 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <72987@debbugs.gnu.org>; Mon, 31 Mar 2025 18:20:19 +0000 (UTC) Date: Mon, 31 Mar 2025 20:19:25 +0200 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches X-Patchwork-Original-From: Herman Rimm via Guix-patches via From: Herman Rimm Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/bootloader/u-boot.scm (u-boot-nanopi-r4s-rk3399-ddr3-bootloader): Add variable. * gnu/packages/bootloaders.scm (u-boot-nanopi-r4s-rk3399-ddr3): Add variable. * gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch: Add file. * gnu/local.mk (dist_patch_DATA): Register patch. Change-Id: I6d4cb098727fe4027aea33a39c59d34000dfc4db --- gnu/bootloader/u-boot.scm | 6 ++++ gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 10 ++++++ .../patches/u-boot-nanopi-r4s-ddr3.patch | 33 +++++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index 64fb319f50f..a7c73093bd6 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -38,6 +38,7 @@ (define-module (gnu bootloader u-boot) u-boot-cubietruck-bootloader u-boot-firefly-rk3399-bootloader u-boot-mx6cuboxi-bootloader + u-boot-nanopi-r4s-rk3399-ddr3-bootloader u-boot-nintendo-nes-classic-edition-bootloader u-boot-novena-bootloader u-boot-orangepi-r1-plus-lts-rk3328-bootloader @@ -221,6 +222,11 @@ (define u-boot-novena-bootloader (inherit u-boot-imx-bootloader) (package u-boot-novena))) +(define u-boot-nanopi-r4s-rk3399-ddr3-bootloader + (bootloader + (inherit u-boot-rockchip-bootloader) + (package u-boot-nanopi-r4s-rk3399-ddr3))) + (define u-boot-orangepi-r1-plus-lts-rk3328-bootloader (bootloader (inherit u-boot-rockchip-bootloader) diff --git a/gnu/local.mk b/gnu/local.mk index f03fcb14fcc..955b8fb1ddf 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2342,6 +2342,7 @@ dist_patch_DATA = \ %D%/packages/patches/u-boot-allow-disabling-openssl.patch \ %D%/packages/patches/u-boot-nintendo-nes-serial.patch \ %D%/packages/patches/u-boot-rockchip-inno-usb.patch \ + %D%/packages/patches/u-boot-nanopi-r4s-ddr3.patch \ %D%/packages/patches/ucx-tcp-iface-ioctl.patch \ %D%/packages/patches/ultrastar-deluxe-no-freesans.patch \ %D%/packages/patches/ungoogled-chromium-extension-search-path.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 8ece61f11c3..1953222ae12 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1303,6 +1303,16 @@ (define-public u-boot-novena version, contrary to Novena upstream, does not load u-boot.img from the first partition.")) +(define-public u-boot-nanopi-r4s-rk3399-ddr3 + (let ((base (make-u-boot-rockchip-package "nanopi-r4s" 'rk3399))) + (package + (inherit base) + (source + (origin + (inherit (package-source base)) + (patches (cons (search-patch "u-boot-nanopi-r4s-ddr3.patch") + (origin-patches (package-source base))))))))) + (define-public u-boot-orangepi-r1-plus-lts-rk3328 (make-u-boot-rockchip-package "orangepi-r1-plus-lts" 'rk3328)) diff --git a/gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch b/gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch new file mode 100644 index 00000000000..435ffd55546 --- /dev/null +++ b/gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch @@ -0,0 +1,33 @@ +From: Herman Rimm +Date: Sun, 2 Jul 2023 13:43:18 +0200 +Subject: [PATCH] Configure the Nano Pi R4S with DDR3. + +--- +This patch should be removed once something like this is upstream: +https://github.com/anaelorlinski/OpenWrt-NanoPi-R2S-R4S-Builds/commit/9d836044340ddef53f5d9f1946ac48c946a78284 + +diff --git a/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi +index 69800cc368d..a3054849f88 100644 +--- a/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi ++++ b/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi +@@ -13,7 +13,7 @@ + */ + + #include "rk3399-nanopi4-u-boot.dtsi" +-#include "rk3399-sdram-lpddr4-100.dtsi" ++#include "rk3399-sdram-ddr3-1866.dtsi" + + / { + smbios { +diff --git a/configs/nanopi-r4s-rk3399_defconfig b/configs/nanopi-r4s-rk3399_defconfig +index ada04b46cb1..b39e350bbed 100644 +--- a/configs/nanopi-r4s-rk3399_defconfig ++++ b/configs/nanopi-r4s-rk3399_defconfig +@@ -48,7 +48,6 @@ CONFIG_PMIC_RK8XX=y + CONFIG_SPL_DM_REGULATOR_FIXED=y + CONFIG_REGULATOR_RK8XX=y + CONFIG_PWM_ROCKCHIP=y +-CONFIG_RAM_ROCKCHIP_LPDDR4=y + CONFIG_BAUDRATE=1500000 + CONFIG_DEBUG_UART_SHIFT=2 + CONFIG_SYS_NS16550_MEM32=y From patchwork Mon Mar 31 18:19:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herman Rimm X-Patchwork-Id: 41088 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 43B7927BBEA; Mon, 31 Mar 2025 19:21:42 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AFC2727BBE2 for ; Mon, 31 Mar 2025 19:21:41 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzJl4-0002mM-78; Mon, 31 Mar 2025 14:21:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tzJkv-0002lE-Ql for guix-patches@gnu.org; Mon, 31 Mar 2025 14:21:08 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tzJkt-0006ol-GM for guix-patches@gnu.org; Mon, 31 Mar 2025 14:21:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=a8mtgIppAYeScFAZq+EPt2rHcJ2kjnVYpvx350KeJdo=; b=izK2kQAtc5qdWlJw+fk4f4hC+s7QbhEmg72H/Pp+2EdcQ3ceESxdQVAWU/qPuPvQMCMkQPq6CvVa5wOBE8iftearjxxUvHu+RCtoa1vxxH2eGsnsqlJx2ti7IdjSCLkMbGq57U8kpkK7gIjwHT3/NO/KAiv/cGHAToQFYj0CH6BZrRxaqquohALluA1TTa927+uCA/C9fAX+nCbNtO5lUD3TYU14VDtvKp49l4K19p6073iQorXU5SH370S5zRQ3er6c0BJDR9xCt6fdxHo5bTEMOE5uJuAS9mO0hJ0V/O/i6Pql9pMXfh1TGqfady9XJqcV6Oez0vcTxFMhy1M4nQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzJkt-0003JC-1q for guix-patches@gnu.org; Mon, 31 Mar 2025 14:21:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72987] [PATCH v4 2/3] gnu: bootloader: Add ASUS Tinker Board S bootloader. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 Mar 2025 18:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72987 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72987@debbugs.gnu.org Received: via spool by 72987-submit@debbugs.gnu.org id=B72987.174344524712568 (code B ref 72987); Mon, 31 Mar 2025 18:21:02 +0000 Received: (at 72987) by debbugs.gnu.org; 31 Mar 2025 18:20:47 +0000 Received: from localhost ([127.0.0.1]:42800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzJkd-0003GY-1w for submit@debbugs.gnu.org; Mon, 31 Mar 2025 14:20:47 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:42135 helo=email.rimm.ee) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tzJkO-0003DN-VQ for 72987@debbugs.gnu.org; Mon, 31 Mar 2025 14:20:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1743445219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a8mtgIppAYeScFAZq+EPt2rHcJ2kjnVYpvx350KeJdo=; b=WO6Mjnr4Z+1ODUEx4D7lUp4kyv9QbxiriexjyQTa4DbKQJzapeE+zhIfvYzSaqZ/5xAMig J+VPrSM5hcoq5Voh5voL1D6/wqY7n8oRKiVNSaVVOBbC9Eld8GKEnys+4FrENLUrg9LtyJ OAHlmr/3Fww0p+U7V9Y6vV+geItfsRDaQGOaxl9pLdb/di7v/1ODS+ikaDDrXE85MO2ScP 08Q3RGJ9R99+LU6/2CqtyaGt01IqZqwIlTzZmfWJRyUtFw1zPbXjCP8OnTXtm0UBdaD+C9 mBp5Ft9REX9MHGBZ2oHv1qs31lMzF51Qgz6p0789/26A2fAxChLh7Dag7F2nHQ== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id d97a7119 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <72987@debbugs.gnu.org>; Mon, 31 Mar 2025 18:20:19 +0000 (UTC) Date: Mon, 31 Mar 2025 20:19:26 +0200 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches X-Patchwork-Original-From: Herman Rimm via Guix-patches via From: Herman Rimm Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/bootloader/u-boot.scm (install-tinker-s-rk3288-u-boot, u-boot-tinker-s-rk3288-bootloader): Add variables. * gnu/packages/bootloaders.scm (u-boot-tinker-s-rk3288): Add variable. * gnu/packages/firmware.scm (arm-trusted-firmware-rk3288): Add variable. Change-Id: Ic28193d4377c672f4cbbac4cc059e283fcfb06e0 --- gnu/bootloader/u-boot.scm | 10 ++++++++++ gnu/packages/bootloaders.scm | 19 +++++++++++++++++++ gnu/packages/firmware.scm | 6 ++++++ 3 files changed, 35 insertions(+) diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index a7c73093bd6..8acf8af785b 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -53,6 +53,7 @@ (define-module (gnu bootloader u-boot) u-boot-sifive-unmatched-bootloader u-boot-qemu-riscv64-bootloader u-boot-starfive-visionfive2-bootloader + u-boot-tinker-s-rk3288-bootloader u-boot-ts7970-q-2g-1000mhz-c-bootloader u-boot-wandboard-bootloader)) @@ -115,6 +116,9 @@ (define install-puma-rk3399-u-boot (define install-rockchip-u-boot (write-u-boot-image '(("idbloader.img" 64) ("u-boot.itb" 16384)) 512)) +(define install-tinker-s-rk3288-u-boot + (write-u-boot-image '(("idbloader.img" 64) ("u-boot.img" 16384)) 512)) + (define install-sifive-unmatched-u-boot (write-u-boot-image '(("spl/u-boot-spl.bin" 34) ("u-boot.itb" 2082)) 512)) @@ -273,6 +277,12 @@ (define u-boot-pinebook-pro-rk3399-bootloader (inherit u-boot-rockchip-bootloader) (package u-boot-pinebook-pro-rk3399))) +(define u-boot-tinker-s-rk3288-bootloader + (bootloader + (inherit u-boot-bootloader) + (package u-boot-tinker-s-rk3288) + (disk-image-installer install-tinker-s-rk3288-u-boot))) + (define u-boot-ts7970-q-2g-1000mhz-c-bootloader ;; This bootloader doesn't really need to be installed, as it is read from ;; an SPI memory chip, not the SD card. It is copied to /boot/u-boot.imx diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 1953222ae12..5a030360226 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -39,6 +39,7 @@ (define-module (gnu packages bootloaders) #:use-module (gnu packages) + #:use-module (gnu packages algebra) #:use-module (gnu packages assembly) #:use-module (gnu packages base) #:use-module (gnu packages disk) @@ -1325,6 +1326,24 @@ (define-public u-boot-cubietruck (define-public u-boot-puma-rk3399 (make-u-boot-rockchip-package "puma" 'rk3399)) +(define-public u-boot-tinker-s-rk3288 + (let ((base (make-u-boot-package "tinker-s-rk3288" "arm-linux-gnueabihf"))) + (package + (inherit base) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'unpack 'set-environment + (lambda* (#:key inputs #:allow-other-keys) + ;; ARMv7 does not have the BL31 stage. + (setenv "BL32" (search-input-file inputs "/bl32.elf")))))))) + (native-inputs + (modify-inputs (package-native-inputs base) + (append bc))) + (inputs (modify-inputs (package-inputs base) + (append arm-trusted-firmware-rk3288)))))) + (define-public u-boot-qemu-arm (make-u-boot-package "qemu_arm" "arm-linux-gnueabihf" ;; Disable features that require OpenSSL due diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index f04edefafe8..ba3dfae715b 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -1198,6 +1198,12 @@ (define-public arm-trusted-firmware-sun50i-a64 (define-public arm-trusted-firmware-sun50i-h616 (make-arm-trusted-firmware "sun50i_h616")) +(define-public arm-trusted-firmware-rk3288 + (make-arm-trusted-firmware "rk3288" #:triplet "arm-linux-gnueabihf" + #:make-flags '("ARCH=aarch32" + "AARCH32_SP=sp_min" + "DEBUG=1"))) + (define-public arm-trusted-firmware-rk3328 (make-arm-trusted-firmware "rk3328")) From patchwork Mon Mar 31 18:19:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herman Rimm X-Patchwork-Id: 41089 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DBE8627BBE2; Mon, 31 Mar 2025 19:21:54 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 57B6B27BBE9 for ; Mon, 31 Mar 2025 19:21:54 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzJl8-0002mv-CH; Mon, 31 Mar 2025 14:21:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tzJkv-0002lF-RF for guix-patches@gnu.org; Mon, 31 Mar 2025 14:21:08 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tzJkt-0006os-Vb for guix-patches@gnu.org; Mon, 31 Mar 2025 14:21:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=nrBRneos38qKL/jLuQjGiqLK5fSePngHOiuO4nNh4V4=; b=K9C5U/9Ov5/k/Z37ogIiZmzcd9JPT4W73/EBVwMFoq68skro7+EhwoL/99Jf3G63jQmPDTB2+FEssPp+K0NgRPyYoz8KlTGYDPyCQ7w1Buen1Y1COsVyP+dE724w+4C7TEgIS2S8H6Bi9e7l0ZKZ6tztihPNIKshp6mcsjwrFfaitHKD4U42FKSFVTjfGtUV44yDrhyHhHBrfWLSDGHO86YWykONmUVnAZdqUTRQO0t5PP/Jri6jAlsD9jjfJINzvx+OfG1+FLvyu7NVN6YZLAW59D34T1gevSPydPD2jXKLIDJfdeOlPxJMT5SFe9RKq0wiZGZVOviK33+QkBsrsg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzJkt-0003JP-QK for guix-patches@gnu.org; Mon, 31 Mar 2025 14:21:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72987] [PATCH v4 3/3] gnu: u-boot: Enlarge space available for kernel. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 Mar 2025 18:21:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72987 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72987@debbugs.gnu.org Received: via spool by 72987-submit@debbugs.gnu.org id=B72987.174344524812574 (code B ref 72987); Mon, 31 Mar 2025 18:21:03 +0000 Received: (at 72987) by debbugs.gnu.org; 31 Mar 2025 18:20:48 +0000 Received: from localhost ([127.0.0.1]:42802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzJkd-0003Gf-I8 for submit@debbugs.gnu.org; Mon, 31 Mar 2025 14:20:48 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:42135 helo=email.rimm.ee) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tzJkP-0003DN-UY for 72987@debbugs.gnu.org; Mon, 31 Mar 2025 14:20:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1743445219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nrBRneos38qKL/jLuQjGiqLK5fSePngHOiuO4nNh4V4=; b=Se9Fh/Wp0Wmp6JJ/bZYL5jEuYidtnWMbDLjfMpHsz+dY/bDcbUd4AHrEcbM+Y7WJzde/Nw g6jPL3d2ujsT7wVooivvOPCziXFZ0yrf3v9iDXlD5gTaeW8ocQFWEi8AhQP490jgCymkjU A/c1CH42zyuXwMFk9AnNKhq7UFhjr49nBxuzivX9S9+nQmVWIggpNMCjfjCl1maDsiqmk9 f1IUVbHu34qz80OYHZ/F89V+oeYxVCJw39Qbafazxt/QFLU3x3rIzRwCfXGHQfO+fr02YT 97q4lLVr0m/xcPYbo/zovX4VLeG1wHKsFh+dzRgb6dw5z2oLMKooTtRD4KZD9A== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 4318c8bd (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <72987@debbugs.gnu.org>; Mon, 31 Mar 2025 18:20:19 +0000 (UTC) Date: Mon, 31 Mar 2025 20:19:27 +0200 Message-ID: <486beae8e4ae3b081d1c970257fe4c47a27e40b5.1743444294.git.herman@rimm.ee> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches X-Patchwork-Original-From: Herman Rimm via Guix-patches via From: Herman Rimm Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/bootloaders.scm (u-boot)[source]: Add patch. * gnu/packages/patches/u-boot-50M-kernel.patch: Add file. * gnu/local.mk (dist_patch_DATA): Register patch. Change-Id: Ib0074d888a3553543b491e9198f9b9a1162722f3 --- gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 1 + gnu/packages/patches/u-boot-50M-kernel.patch | 55 ++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 gnu/packages/patches/u-boot-50M-kernel.patch diff --git a/gnu/local.mk b/gnu/local.mk index 955b8fb1ddf..3bb421b49e7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2339,6 +2339,7 @@ dist_patch_DATA = \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/tvm_fix_cpptest_build.patch \ %D%/packages/patches/twinkle-bcg729.patch \ + %D%/packages/patches/u-boot-50M-kernel.patch \ %D%/packages/patches/u-boot-allow-disabling-openssl.patch \ %D%/packages/patches/u-boot-nintendo-nes-serial.patch \ %D%/packages/patches/u-boot-rockchip-inno-usb.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 5a030360226..8a2ca8cfda3 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -769,6 +769,7 @@ (define u-boot (sha256 (base32 "1i1v86bnixh8hyqbwwr5iwdnnadmg2fqxw9g526fvclsbvl8lz0v")) (patches (search-patches "u-boot-allow-disabling-openssl.patch" + "u-boot-50M-kernel.patch" "u-boot-rockchip-inno-usb.patch")))) (build-system gnu-build-system) (native-inputs diff --git a/gnu/packages/patches/u-boot-50M-kernel.patch b/gnu/packages/patches/u-boot-50M-kernel.patch new file mode 100644 index 00000000000..c4d054dd42d --- /dev/null +++ b/gnu/packages/patches/u-boot-50M-kernel.patch @@ -0,0 +1,55 @@ +From: Herman Rimm +Date: Mon, Sep 16 2024 19:24:02 +0200 +Subject: [PATCH] Configure Raspberry Pis to reserve 50 MB for linux kernels. + +--- +The 6.9 and newer linux-libre-arm64-generic kernels for Guix can be +larger than the allocated 36 MB. This patch is not submitted upstream. + +diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env +index 30228285edd..666883e9212 100644 +--- a/board/raspberrypi/rpi/rpi.env ++++ b/board/raspberrypi/rpi/rpi.env +@@ -43,22 +43,22 @@ dfu_alt_info+=zImage fat 0 1 + * text_offset bytes (specified in the header of the Image) into a 2MB + * boundary. The 'booti' command relocates the image if necessary. Linux uses + * a default text_offset of 0x80000. In summary, loading at 0x80000 +- * satisfies all these constraints and reserving memory up to 0x02400000 +- * permits fairly large (roughly 36M) kernels. ++ * satisfies all these constraints and reserving memory up to 0x03400000 ++ * permits fairly large (roughly 50M) kernels. + * + * scriptaddr and pxefile_addr_r can be pretty much anywhere that doesn't + * conflict with something else. Reserving 1M for each of them at +- * 0x02400000-0x02500000 and 0x02500000-0x02600000 should be plenty. ++ * 0x03200000-0x03300000 and 0x03300000-0x03400000 should be plenty. + * + * On ARM, both the DTB and any possible initrd must be loaded such that they + * fit inside the lowmem mapping in Linux. In practice, this usually means not + * more than ~700M away from the start of the kernel image but this number can + * be larger OR smaller depending on e.g. the 'vmalloc=xxxM' command line + * parameter given to the kernel. So reserving memory from low to high +- * satisfies this constraint again. Reserving 1M at 0x02600000-0x02700000 for +- * the DTB leaves rest of the free RAM to the initrd starting at 0x02700000. ++ * satisfies this constraint again. Reserving 1M at 0x03400000-0x03500000 for ++ * the DTB leaves rest of the free RAM to the initrd starting at 0x03500000. + * Even with the smallest possible CPU-GPU memory split of the CPU getting +- * only 64M, the remaining 25M starting at 0x02700000 should allow quite ++ * only 64M, the remaining 11M starting at 0x03500000 should allow quite + * large initrds before they start colliding with U-Boot. + */ + #ifdef CONFIG_ARM64 +@@ -69,9 +69,9 @@ fdt_high=ffffffff + initrd_high=ffffffff + #endif + kernel_addr_r=0x00080000 +-scriptaddr=0x02400000 +-pxefile_addr_r=0x02500000 +-fdt_addr_r=0x02600000 +-ramdisk_addr_r=0x02700000 ++scriptaddr=0x03200000 ++pxefile_addr_r=0x03300000 ++fdt_addr_r=0x03400000 ++ramdisk_addr_r=0x03500000 + + boot_targets=mmc usb pxe dhcp