From patchwork Mon Sep 16 17:24:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herman Rimm X-Patchwork-Id: 67991 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 637CF27BBEA; Mon, 16 Sep 2024 18:26:07 +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_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 1905427BBE2 for ; Mon, 16 Sep 2024 18:26:05 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sqFTz-0001jP-Fj; Mon, 16 Sep 2024 13:25:51 -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 1sqFTx-0001j4-Tn for guix-patches@gnu.org; Mon, 16 Sep 2024 13:25:49 -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 1sqFTx-0002Yi-KF for guix-patches@gnu.org; Mon, 16 Sep 2024 13:25:49 -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:Date:From:To:In-Reply-To:References:Subject; bh=Klj2BAK4IanjRmHJml7eP5xEAlO3BC7LcqzBhPgSxfs=; b=EZ6VifgSRHJ2BiQjXZWZgxTdb/+B5K+EOMuD//VBrvWZY6d1mRGAioaJTHqHSMCV/LAGftgN2yKzKT0jI5awoAa36ArrqgDbzHmU9vn6D1hAcRIurpc5cD+cHMBVVwpW1vNBO/ZKSmV35JxFF/QFrEWSAPssckKlI5x6J5pwzmIG0tMRdL/YLyalDf17OnoaXFCYSmJdgg1Q2E36E0MAlPb/v/Ii7XzmK4TaZJalt8euuIgkG0F8y6KLP51esBYG2YzzsnvA8gr5ND5EnbciZQY13lRBGHZOBLvMfJ8n0r7xFTtYUhwHbotxc+khpNY7TblmeSorsenV2c38JpmHJw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sqFUA-0004uk-3d; Mon, 16 Sep 2024 13:26:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72987] [PATCH v2] gnu: u-boot: Enlarge space available for kernel. References: <20240902190459.13783-1-herman@rimm.ee> In-Reply-To: <20240902190459.13783-1-herman@rimm.ee> Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, vagrant@debian.org, guix-patches@gnu.org Resent-Date: Mon, 16 Sep 2024 17:26: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 Cc: Efraim Flashner , Vagrant Cascadian X-Debbugs-Original-Xcc: Efraim Flashner , Vagrant Cascadian Received: via spool by 72987-submit@debbugs.gnu.org id=B72987.172650752918818 (code B ref 72987); Mon, 16 Sep 2024 17:26:02 +0000 Received: (at 72987) by debbugs.gnu.org; 16 Sep 2024 17:25:29 +0000 Received: from localhost ([127.0.0.1]:53199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqFTd-0004tR-0q for submit@debbugs.gnu.org; Mon, 16 Sep 2024 13:25:29 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:55765 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqFTa-0004oD-FN for 72987@debbugs.gnu.org; Mon, 16 Sep 2024 13:25:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1726507503; 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; bh=Klj2BAK4IanjRmHJml7eP5xEAlO3BC7LcqzBhPgSxfs=; b=qVuGY29AmPq7NBZtxVmeDEuYNRsjxnmqExCPGEJ8rU3ztT+fOa6A3Iw152wpY13dQ8XC0r ldpL1fFvnlefNhLuXbNeiMvfRunggB2qR8WmWbz1ETRmoUtmEiQ/wuix6+10uHndHItRm9 kC4jDEddTEHvGZp3Vcv47v/7uBWr0Fq+PpSeGvTTwQ5Lj1oWHnF2FWllcPb0iiqbHIXx3V nBqaGwSs7yOG/UcIp52FtYJPlp79VkN8MVKi0E60owtD65actPTCNwcQNLm52xKu0M48oq ycPsEWuSZVjHVQDr878JbuG60jXDWlnOsaLEshyKysezkO+4cX7n1j20BOCo/Q== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 14d0fd28 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <72987@debbugs.gnu.org>; Mon, 16 Sep 2024 17:25:03 +0000 (UTC) Date: Mon, 16 Sep 2024 19:24:02 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 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-rockchip-inno-usb-patch, %u-boot-allow-disabling-openssl-patch, %u-boot-nanopi-r4s-ddr3-patch): Remove variables. (u-boot)[source]: Use search-patches and add new 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 | 49 +++++++++---------- gnu/packages/patches/u-boot-50M-kernel.patch | 51 ++++++++++++++++++++ 3 files changed, 74 insertions(+), 27 deletions(-) create mode 100644 gnu/packages/patches/u-boot-50M-kernel.patch base-commit: a493d65d04deafb763710bb1cb0425185750327d diff --git a/gnu/local.mk b/gnu/local.mk index ce58d5bfb4..b763991d63 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2216,6 +2216,7 @@ dist_patch_DATA = \ %D%/packages/patches/turbovnc-find-system-packages.patch \ %D%/packages/patches/tuxpaint-stamps-path.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 50e7bb8bbc..b38b407d38 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -826,37 +826,32 @@ (define-public dtc tree binary files. These are board description files used by Linux and BSD.") (license license:gpl2+))) -(define %u-boot-rockchip-inno-usb-patch - ;; Fix regression in 2020.10 causing freezes on boot with USB boot enabled. - ;; See https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-rockpro64/-/issues/4 - ;; and https://patchwork.ozlabs.org/project/uboot/patch/20210406151059.1187379-1-icenowy@aosc.io - (search-patch "u-boot-rockchip-inno-usb.patch")) - -(define %u-boot-allow-disabling-openssl-patch - ;; Fixes build of u-boot 2021.10 without openssl - ;; https://lists.denx.de/pipermail/u-boot/2021-October/462728.html - (search-patch "u-boot-allow-disabling-openssl.patch")) - -(define %u-boot-nanopi-r4s-ddr3-patch - ;; Use DDR3 instead of LPDDR4 for the Nano Pi R4S U-boot. - (search-patch "u-boot-nanopi-r4s-ddr3.patch")) - (define u-boot (package (name "u-boot") (version "2024.07") - (source (origin - (patches - (list %u-boot-rockchip-inno-usb-patch - %u-boot-allow-disabling-openssl-patch - %u-boot-nanopi-r4s-ddr3-patch)) - (method url-fetch) - (uri (string-append - "https://ftp.denx.de/pub/u-boot/" - "u-boot-" version ".tar.bz2")) - (sha256 - (base32 - "13rwv28g6z8ihrs8k0066gblw37rvw6nsxkks6rxdwqfp6ddm4gm")))) + (source + (origin + (patches + (search-patches + ;; Fix regression in 2020.10 causing freezes on boot with + ;; USB boot enabled. See: + ;; https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-rockpro64/-/issues/4 + ;; https://patchwork.ozlabs.org/project/uboot/patch/20210406151059.1187379-1-icenowy@aosc.io + "u-boot-rockchip-inno-usb.patch" + ;; Fixes build of u-boot 2021.10 without openssl. See: + ;; https://lists.denx.de/pipermail/u-boot/2021-October/462728.html + "u-boot-allow-disabling-openssl.patch" + ;; Use DDR3 instead of LPDDR4 for the Nano Pi R4S. + "u-boot-nanopi-r4s-ddr3.patch" + ;; Reserve more than 36 MB for linux-libre 6.9+ kernels. + "u-boot-50M-kernel.patch")) + (method url-fetch) + (uri (string-append "https://ftp.denx.de/pub/u-boot/" + "u-boot-" version ".tar.bz2")) + (sha256 + (base32 + "13rwv28g6z8ihrs8k0066gblw37rvw6nsxkks6rxdwqfp6ddm4gm")))) (build-system gnu-build-system) (native-inputs (list bison 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 0000000000..4566894087 --- /dev/null +++ b/gnu/packages/patches/u-boot-50M-kernel.patch @@ -0,0 +1,51 @@ +This patch configures the U-Boot for Raspberry Pis to reserve 50 MB for +linux kernels, because the 6.9 and newer linux-libre-arm64-generic +kernels can be larger than 36 MB. It was created by Herman Rimm + in August 2024 and is not submitted upstream yet. +diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env +index 30228285ed..54a8e9e5ae 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