Package: u-boot-menu Version: 4.0.3 Severity: normal Tags: patch X-Debbugs-Cc: undef <debian@undef.tools>
Dear Maintainer, Currently the initrd section of the generated extlinux.conf will only use discovered initrd.img-* files from /boot. However, some systems (discovered on the PinePhone Pro, but other reclaimed Android devices are affected) require a custom "miniramfs" to be used. Would it be possible to include the ability to manually set the initrd record in /etc/default/u-boot? The attached patch allows a static configuration which will be used for all kernels. An alternative would be setting "/miniramfs-${_VERSION}". Thanks for considering, Undef. -- System Information: Debian Release: 11.2 APT prefers stable-security APT policy: (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.16.11-1.fc32.qubes.x86_64 (SMP w/16 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages u-boot-menu depends on: ii linux-base 4.6 u-boot-menu recommends no packages. Versions of packages u-boot-menu suggests: pn flash-kernel <none> -- no debconf information *** 0001-Allow-configuration-of-initrd-file.patch >From 14daba63b9c1036b7672f144d29a848e306992b0 Mon Sep 17 00:00:00 2001 From: Undef <debian@undef.tools> Date: Wed, 2 Mar 2022 00:02:12 +0000 Subject: [PATCH] Allow configuration of initrd file Some devices have initrd requirements that cause the standard initrd.img-${_VERSION} to fail to boot. For example, the PinePhone Pro will fail to boot with large initrd files, solved by using a miniramfs[0] to chainload the real initrd. This allows specifying the INITRD manually in /etc/default/u-boot. If the configuration is either not present or empty, the existing initrd discovery functionality will continue to be used. [0] https://gitlab.com/mobian1/miniramfs --- u-boot-update | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/u-boot-update b/u-boot-update index da92918..4d3b395 100755 --- a/u-boot-update +++ b/u-boot-update @@ -92,6 +92,7 @@ U_BOOT_TIMEOUT="${U_BOOT_TIMEOUT:-50}" U_BOOT_MENU_LABEL="${U_BOOT_MENU_LABEL:-${PRETTY_NAME:-Debian GNU/Linux kernel}}" U_BOOT_PARAMETERS="${U_BOOT_PARAMETERS:-ro quiet}" U_BOOT_FDT_DIR="${U_BOOT_FDT_DIR:-/usr/lib/linux-image-}" +U_BOOT_INITRD="${U_BOOT_INITRD:-}" # Find parameter for root from fstab if [ -z "${U_BOOT_ROOT}" ] @@ -169,7 +170,10 @@ do _NUMBER="${_NUMBER:-0}" _ENTRY="${_ENTRY:-1}" - if [ -e /boot/initrd.img-${_VERSION} ] + if [ -n "${U_BOOT_INITRD}" ] + then + _INITRD="initrd ${U_BOOT_INITRD}" + elif [ -e /boot/initrd.img-${_VERSION} ] then _INITRD="initrd ${_BOOT_DIRECTORY}/initrd.img-${_VERSION}" else -- 2.30.2