Package: u-boot-menu
Version: 4.2.0
Severity: important
Tags: patch
X-Debbugs-Cc: aferra...@debian.org

Dear Maintainer,

Using u-boot 21.10 (which does not have support for KASLR), the generated
extlinux.conf makes the system unbootable.
This is most likely a bug in u-boot, causing it to ignore any unknown command
*and all the following ones*:

  Retrieving file: /extlinux/extlinux.conf
  843 bytes read in 17 ms (47.9 KiB/s)
  Ignoring unknown command:     kaslrseed
  Ignoring unknown command:     append
  Ignoring unknown command:     kaslrseed
  Ignoring unknown command:     append

Attached is a patch working around this issue in u-boot-menu.

Thanks,
Arnaud


-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (500, 'testing'), (200, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.0.0-5-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.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.9

Versions of packages u-boot-menu recommends:
ii  rsync  3.2.6-4+b1

Versions of packages u-boot-menu suggests:
pn  flash-kernel  <none>
>From 3cd399d3c853f452711b6e5b37098b89e1633c51 Mon Sep 17 00:00:00 2001
From: Arnaud Ferraris <arnaud.ferra...@collabora.com>
Date: Mon, 12 Dec 2022 14:59:44 +0100
Subject: [PATCH] u-boot-update: put `kaslrseed` last

When using a version of u-boot without KASLR support (21.10 in this
case), having this command set makes all following lines to be ignored,
even though they contain valid commands:

  Retrieving file: /extlinux/extlinux.conf
  843 bytes read in 17 ms (47.9 KiB/s)
  Ignoring unknown command:     kaslrseed
  Ignoring unknown command:     append
  Ignoring unknown command:     kaslrseed
  Ignoring unknown command:     append

Ensuring `kaslrseed` is the last command is enough this work around this
`u-boot` bug.
---
 u-boot-update | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/u-boot-update b/u-boot-update
index effd304..f42cacb 100755
--- a/u-boot-update
+++ b/u-boot-update
@@ -189,8 +189,8 @@ label l${_NUMBER}
        ${_INITRD}
        ${_FDT}
        ${_FDTOVERLAYS}
-       kaslrseed
-       append ${U_BOOT_ROOT} ${U_BOOT_PARAMETERS}"
+       append ${U_BOOT_ROOT} ${U_BOOT_PARAMETERS}
+       kaslrseed"
 
        fi
 
-- 
2.35.1

Reply via email to