Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/systemd: Optionally disable hwdb
@ 2016-04-15 10:46 Marcin Niestroj
  2016-04-15 20:53 ` Peter Seiderer
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Marcin Niestroj @ 2016-04-15 10:46 UTC (permalink / raw)
  To: buildroot

By default hwdb files are installed in /usr/lib/udev/hwdb.d
Currently they take about ~5MB. After first boot, systemd-hwdb tool
parses them and creates a binary in /etc/udev/hwdb.bin, which takes
another ~6.5MB.

In case of initramfs images, hwdb parsing is done every boot. This adds
about 2-3 seconds to boot time in case of rootfs on SDHC class 10
card (benchmarked with am335x board). NAND boot takes even longer.

Add config option to disable hwdb in systemd, for smaller images and
better boot performance.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
 package/systemd/Config.in  | 11 +++++++++++
 package/systemd/systemd.mk |  6 ++++++
 2 files changed, 17 insertions(+)

diff --git a/package/systemd/Config.in b/package/systemd/Config.in
index 97d48c4..324e884 100644
--- a/package/systemd/Config.in
+++ b/package/systemd/Config.in
@@ -84,6 +84,17 @@ config BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY
 
 	  http://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html
 
+config BR2_PACKAGE_SYSTEMD_HWDB
+	bool "enable hwdb installation"
+	default y
+	help
+	  Enables hardware database installation to /usr/lib/udev/hwdb.d
+
+	  Disabling this option improves first boot time (or every boot
+	  time in case of initramfs images) and saves several MB space.
+
+	  https://www.freedesktop.org/software/systemd/man/hwdb.html
+
 config BR2_PACKAGE_SYSTEMD_BINFMT
 	bool "enable binfmt tool"
 	help
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index 79e657e..29b62c0 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -127,6 +127,12 @@ else
 SYSTEMD_CONF_OPTS += --disable-microhttpd
 endif
 
+ifeq ($(BR2_PACKAGE_SYSTEMD_HWDB),y)
+SYSTEMD_CONF_OPTS += --enable-hwdb
+else
+SYSTEMD_CONF_OPTS += --disable-hwdb
+endif
+
 ifeq ($(BR2_PACKAGE_SYSTEMD_BINFMT),y)
 SYSTEMD_CONF_OPTS += --enable-binfmt
 else
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-06-15 21:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-15 10:46 [Buildroot] [PATCH] package/systemd: Optionally disable hwdb Marcin Niestroj
2016-04-15 20:53 ` Peter Seiderer
2016-04-18  8:25   ` Marcin Niestroj
2016-06-07 14:37 ` Marcin Niestroj
2016-06-08 20:19 ` Yann E. MORIN
2016-06-13  9:20   ` Marcin Niestroj
2016-06-13 20:00     ` Yann E. MORIN
2016-06-15 21:19 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox