Skip to contentSkip to conversation

package/systemd: enable tmpfs kernel option

PATCH In review Adam Duskett 3 participants 3 messages Feb 26, 2025 – Mar 16, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/systemd: enable tmpfs kernel option

systemd automatically creates tmpfs mounts for /tmp, /run, /dev/shm, and others. If tmpfs is not enabled in the kernel, systemd crashes with an unknown filesystem error on boot. This hasn't manifested itself during tests with defconfigs such as pc_x86_64_efi_defconfig for a few reasons:

- No defconfig uses systemd as the init system by default
- Even if a user does use pc_x86_64_efi_defconfig and changes to systemd, the board/pc/linux.config file enables CONFIG_PCI, which selects CONFIG_TMPFS.
- The systemd init tests use a prebuilt kernel with tmpfs enabled.

Enable tmpfs unconditionally to ensure that systemd always boots, even with a minimal kernel built.

---
 package/systemd/systemd.mk | 1 +
 1 file changed, 1 insertion(+)
package/systemd/systemd.mk +1 -0
index 28091a72a6..337d52b1f2 100644
@@ -847,6 +847,7 @@ SYSTEMD_CONF_ENV = $(HOST_UTF8_LOCALE_ENV)
 SYSTEMD_NINJA_ENV = $(HOST_UTF8_LOCALE_ENV)
 
 define SYSTEMD_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS)
 	$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS)
 	$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
 	$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER)
Signature · 6 lines
2.48.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 12 lines · Adam Duskett

systemd automatically creates tmpfs mounts for /tmp, /run, /dev/shm, and others. If tmpfs is not enabled in the kernel, systemd crashes with an unknown filesystem error on boot. This hasn't manifested itself during tests with defconfigs such as pc_x86_64_efi_defconfig for a few reasons:

- No defconfig uses systemd as the init system by default
- Even if a user does use pc_x86_64_efi_defconfig and changes to
systemd,
the board/pc/linux.config file enables CONFIG_PCI, which selects CONFIG_TMPFS.
- The systemd init tests use a prebuilt kernel with tmpfs enabled.

Quoted 4 lines

Enable tmpfs unconditionally to ensure that systemd always boots, even with a minimal kernel built.

Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Adam Duskett
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Adam" == Adam Duskett <[email protected]> writes:

systemd automatically creates tmpfs mounts for /tmp, /run, /dev/shm, and others. If tmpfs is not enabled in the kernel, systemd crashes with an unknown filesystem error on boot. This hasn't manifested itself during tests with defconfigs such as pc_x86_64_efi_defconfig for a few reasons:

- No defconfig uses systemd as the init system by default
- Even if a user does use pc_x86_64_efi_defconfig and changes to systemd, the board/pc/linux.config file enables CONFIG_PCI, which selects CONFIG_TMPFS.
- The systemd init tests use a prebuilt kernel with tmpfs enabled.

Quoted 4 lines

Enable tmpfs unconditionally to ensure that systemd always boots, even with a minimal kernel built.

Committed to 2024.02.x and 2024.11.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot