Bug#718975: Switch to kernel-based firmware loader

2013-08-08 Thread Sven Joachim
On 2013-08-07 23:48 +0200, Michael Biebl wrote:

 Am 07.08.2013 22:23, schrieb Sven Joachim:
 On 2013-08-07 13:25 +0200, Michael Biebl wrote:
 In newer Linux versions, loading the firmware can be done by the kernel
 itself. We should get the Debian Linux kernel updated to support that.
 Afaics all that is needed is building with
  CONFIG_FW_LOADER_USER_HELPER=n
 (but this needs verification).
 
 AFAIK the kernel always tries to load the firmware itself, and
 CONFIG_FW_LOADER_USER_HELPER=n just removes the fallback to udev (which
 can result in a 60 seconds delay) if it can't find the firmware.

 Ah, interesting. I guess this is related to [1] then.

Yes, except that this was with Linux 3.2 which does not support firmware
loading without a userspace helper.

 If CONFIG_FW_LOADER_USER_HELPER=n is set, I assume there is no such
 timeout, if no firmware is found by the kernel?

Indeed.

I think udev should be fixed to fail immediately rather than after 60
seconds if it doesn't support firmware loading.  Maarten Lankhorst has
recently posted¹ a patch for that on systemd-devel.

Cheers,
   Sven


¹ http://lists.freedesktop.org/archives/systemd-devel/2013-August/012554.html


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#718975: Switch to kernel-based firmware loader

2013-08-07 Thread Michael Biebl
Package: udev
Version: 204-2
Severity: normal

Loading firmware from userspace has been deprecated in udev [1] and is
scheduled to be removed [2]. It is supposed to be replaced by in-kernel
firmware loading.

In newer Linux versions, loading the firmware can be done by the kernel
itself. We should get the Debian Linux kernel updated to support that.
Afaics all that is needed is building with
 CONFIG_FW_LOADER_USER_HELPER=n
(but this needs verification).

We should make sure, the jessie Linux kernel supports that and probably
keep the userspace firmware loader for another release cycle, to
simplify (partial) upgrades.

Regarding self-compiled kernels, we could add a NEWS.Debian and/or add a
preinst check (if there is a reliable way to detect if the currently
running kernel has that kernel config set)

Michael


[1] 
http://cgit.freedesktop.org/systemd/systemd/commit/?id=a3bd8447be4ea2ce230eb8ae0e815c04d85fa15a
[2] 
http://cgit.freedesktop.org/systemd/systemd/tree/README?id=4a792f4676e5f8fa86aff8aac09c4b6391dee313#n55
-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.10-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages udev depends on:
ii  debconf [debconf-2.0]  1.5.50
ii  libacl12.2.52-1
ii  libblkid1  2.20.1-5.5
ii  libc6  2.17-92
ii  libkmod2   9-3
ii  libselinux12.1.13-2
ii  libudev1   204-2
ii  lsb-base   4.1+Debian12
ii  procps 1:3.3.8-2
ii  sysv-rc2.88dsf-43
ii  util-linux 2.20.1-5.5

udev recommends no packages.

udev suggests no packages.

-- debconf information excluded


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#718975: Switch to kernel-based firmware loader

2013-08-07 Thread Michael Biebl
For completeness sake I've attached a patch for the systemd/udev
specific changes.




-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
From a579b0e4d0a28c068c5f493a326023ca061e85bc Mon Sep 17 00:00:00 2001
From: Michael Biebl bi...@debian.org
Date: Wed, 7 Aug 2013 13:35:26 +0200
Subject: [PATCH] Disable userspace firmware loader

Closes: #718975
---
 debian/extra/initramfs.hook | 2 +-
 debian/rules| 1 -
 debian/udev-udeb.install| 1 -
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/debian/extra/initramfs.hook b/debian/extra/initramfs.hook
index ef10b43..8329717 100644
--- a/debian/extra/initramfs.hook
+++ b/debian/extra/initramfs.hook
@@ -33,7 +33,7 @@ mkdir -p $DESTDIR/etc/udev
 cp -p /etc/udev/udev.conf $DESTDIR/etc/udev/
 
 mkdir -p $DESTDIR/lib/udev/rules.d/
-for rules in 50-firmware.rules 50-udev-default.rules 60-persistent-storage.rules \
+for rules in 50-udev-default.rules 60-persistent-storage.rules \
 	80-drivers.rules 91-permissions.rules \
 	64-md-raid.rules 60-persistent-storage-lvm.rules \
 	55-dm.rules 60-persistent-storage-dm.rules; do
diff --git a/debian/rules b/debian/rules
index 2952c3e..7988467 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,7 +10,6 @@ CONFFLAGS = \
 	--with-rootlibdir=/lib/$(DEB_HOST_MULTIARCH) \
 	--with-sysvinit-path=/etc/init.d \
 	--with-sysvrcnd-path=/etc \
-	--with-firmware-path=/lib/firmware \
 	--with-debug-shell=/bin/sh \
 	--enable-libcryptsetup \
 	--enable-tcpwrap \
diff --git a/debian/udev-udeb.install b/debian/udev-udeb.install
index 8d52c8a..2c30bf1 100644
--- a/debian/udev-udeb.install
+++ b/debian/udev-udeb.install
@@ -3,6 +3,5 @@ bin/udevadm
 lib/udev/ata_id
 lib/udev/scsi_id
 lib/udev/cdrom_id
-lib/udev/rules.d/50-firmware.rules
 lib/udev/rules.d/60-cdrom_id.rules
 lib/udev/rules.d/60-persistent-input.rules
-- 
1.8.4.rc1



signature.asc
Description: OpenPGP digital signature


Bug#718975: Switch to kernel-based firmware loader

2013-08-07 Thread Sven Joachim
On 2013-08-07 13:25 +0200, Michael Biebl wrote:

 Package: udev
 Version: 204-2
 Severity: normal

 Loading firmware from userspace has been deprecated in udev [1] and is
 scheduled to be removed [2]. It is supposed to be replaced by in-kernel
 firmware loading.

 In newer Linux versions, loading the firmware can be done by the kernel
 itself. We should get the Debian Linux kernel updated to support that.
 Afaics all that is needed is building with
  CONFIG_FW_LOADER_USER_HELPER=n
 (but this needs verification).

AFAIK the kernel always tries to load the firmware itself, and
CONFIG_FW_LOADER_USER_HELPER=n just removes the fallback to udev (which
can result in a 60 seconds delay) if it can't find the firmware.

 We should make sure, the jessie Linux kernel supports that and probably
 keep the userspace firmware loader for another release cycle, to
 simplify (partial) upgrades.

In-kernel firmware loading was introduced in Linux 3.7 (and
CONFIG_FW_LOADER_USER_HELPER in 3.9), so keeping the userspace loader
for jessie is rather desirable.

 Regarding self-compiled kernels, we could add a NEWS.Debian and/or add a
 preinst check (if there is a reliable way to detect if the currently
 running kernel has that kernel config set)

I don't think there is such a way, but checking for a kernel = 3.7
would probably be a good idea.

Cheers,
   Sven


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#718975: Switch to kernel-based firmware loader

2013-08-07 Thread Michael Biebl
Am 07.08.2013 22:23, schrieb Sven Joachim:
 On 2013-08-07 13:25 +0200, Michael Biebl wrote:
 In newer Linux versions, loading the firmware can be done by the kernel
 itself. We should get the Debian Linux kernel updated to support that.
 Afaics all that is needed is building with
  CONFIG_FW_LOADER_USER_HELPER=n
 (but this needs verification).
 
 AFAIK the kernel always tries to load the firmware itself, and
 CONFIG_FW_LOADER_USER_HELPER=n just removes the fallback to udev (which
 can result in a 60 seconds delay) if it can't find the firmware.

Ah, interesting. I guess this is related to [1] then.

If CONFIG_FW_LOADER_USER_HELPER=n is set, I assume there is no such
timeout, if no firmware is found by the kernel?

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=717635


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature