[Pkg-raspi-maintainers] Bug#903543: raspi3-firmware: [PATCH] add configuration options for cmdline.txt

Christian Schlüter chschlue+debian at gmail.com
Wed Jul 11 08:41:20 BST 2018


Package: raspi3-firmware
Version: 1.20180316-3
Severity: wishlist
Tags: patch

Patch adds configuration options for the kernel command line. cma and
root for now.

CMA size should be configurable as the memory needed by vc4 depends on
the workload.

Also, the root fs should be configurable to support booting from e.g.
USB.
(Cf. https://github.com/Debian/raspi3-image-spec/pull/24 )

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (1, 'experimental')
Architecture: arm64 (aarch64)

Kernel: Linux 4.18.0-rc3-local (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages raspi3-firmware depends on:
ii  dosfstools  4.1-2

raspi3-firmware recommends no packages.

raspi3-firmware suggests no packages.

-- Configuration Files:
/etc/kernel/postinst.d/50raspi3-firmware changed [not included]

-- no debconf information
-------------- next part --------------
>From 25b37e83cffb5a777263360782f7fbe5001703eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20Schl=C3=BCter?= <chschlue at gmail.com>
Date: Tue, 10 Jul 2018 18:55:29 +0200
Subject: [PATCH 1/3] Add configuration options for cmdline.txt

Make cma and root configurable
---
 debian/default/raspi3-firmware             |  5 +++++
 debian/kernel/postinst.d/50raspi3-firmware | 14 +++++++++++++-
 debian/raspi3-firmware.install             |  1 +
 3 files changed, 19 insertions(+), 1 deletion(-)
 create mode 100644 debian/default/raspi3-firmware

diff --git a/debian/default/raspi3-firmware b/debian/default/raspi3-firmware
new file mode 100644
index 0000000..2d7809d
--- /dev/null
+++ b/debian/default/raspi3-firmware
@@ -0,0 +1,5 @@
+# CMA pool size
+#CMA=128M
+
+# root filesystem
+#ROOTPART="LABEL=root"
diff --git a/debian/kernel/postinst.d/50raspi3-firmware b/debian/kernel/postinst.d/50raspi3-firmware
index 857283e..f2e9cbf 100755
--- a/debian/kernel/postinst.d/50raspi3-firmware
+++ b/debian/kernel/postinst.d/50raspi3-firmware
@@ -97,11 +97,23 @@ if [ $kernelmajor -ge 4 ]; then
   fi
 fi
 
+# Default cma memory pool size for vc4
+CMA=128M
+
+# Default root partition
+ROOTPART="LABEL=root"
+
+# Try and source /etc/default/raspi3-firmware
+
+if [ -r /etc/default/raspi3-firmware ]; then
+        . /etc/default/raspi3-firmware
+fi
+
 # Our cmdline.txt is the default (see http://elinux.org/RPi_cmdline.txt), but
 # without parameters for drivers we do not have (e.g. dwc_otg.lpm_enable) or
 # parameters we do not need (e.g. rootfstype=, as we are using an initrd).
 cat >/boot/firmware/cmdline.txt <<EOF
-console=tty0 console=${serial} root=/dev/mmcblk0p2 rw elevator=deadline fsck.repair=yes net.ifnames=0 cma=64M rootwait
+console=tty0 console=${serial} root=$ROOTPART rw elevator=deadline fsck.repair=yes net.ifnames=0 cma=$CMA rootwait
 EOF
 
 cd /boot/firmware
diff --git a/debian/raspi3-firmware.install b/debian/raspi3-firmware.install
index f673e42..2532f2a 100644
--- a/debian/raspi3-firmware.install
+++ b/debian/raspi3-firmware.install
@@ -1,5 +1,6 @@
 boot/* usr/lib/raspi3-firmware
 brcm80211/brcmfmac43430-sdio.txt lib/firmware/brcm
 debian/kernel etc
+debian/default etc
 debian/initramfs etc
 debian/initramfs-tools usr/share
-- 
2.18.0



More information about the Pkg-raspi-maintainers mailing list