Skip to contentSkip to conversation

linux: Don't enable DEVTMPFS support for kernels older than 3.x.

PATCH New Ryan Barnett 4 participants 9 messages Apr 18, 2014 – Apr 25, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux: Don't enable DEVTMPFS support for kernels older than 3.x.

From: Matt Poduska <[email protected]>

In the case where DEVTMPFS is desired for older kernels where the support is experimental, it's still possible to enable the option in the board's specific linux .config instead of relying on buildroot to make the modification.

---
 linux/linux.mk |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
linux/linux.mk +5 -3
index e270705..694ea16 100644
@@ -183,9 +183,11 @@ define LINUX_CONFIGURE_CMDS
 		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.cpio\",$(@D)/.config)
 		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(@D)/.config)
 		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(@D)/.config))
-	$(if $(BR2_ROOTFS_DEVICE_CREATION_STATIC),,
-		$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config))
+	# Kernels prior to 2.6.32 don't support DEVTMPFS, which is also experimental prior to 3.x
+	$(if $(findstring x2.6.,x$(LINUX_VERSION)),,
+		$(if $(BR2_ROOTFS_DEVICE_CREATION_STATIC),,
+			$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(@D)/.config)
+			$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config)))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config))
 	$(if $(BR2_PACKAGE_KTAP),
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 linux: Don't enable DEVTMPFS support for kernels older than 3.x.

Quoted 6 lines · Ryan Barnett

From: Matt Poduska <[email protected]>

In the case where DEVTMPFS is desired for older kernels where the support is experimental, it's still possible to enable the option in the board's specific linux .config instead of relying on buildroot to make the modification.

Why? 2.6.32 is 5+ years old by now, and expecting modern SW to work with older kernels nowadays is probably not worth it. Udev has also required devtmpfs since quite a while, so I don't think you should read much into the "experimental" status.

If the kernel really is that ancient that it doesn't have devtmpfs, then the .config mangling afaik becomes a noop, so I don't see what we gain by not doing it.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 linux: Don't enable DEVTMPFS support for kernels older than 3.x.

In reply to Ryan Barnett

Dear Ryan Barnett,

Quoted 7 lines · Ryan Barnett

From: Matt Poduska <[email protected]>

In the case where DEVTMPFS is desired for older kernels where the support is experimental, it's still possible to enable the option in the board's specific linux .config instead of relying on buildroot to make the modification.

Quoted 5 lines
---
 linux/linux.mk |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Which problem is this fixing? I remember having used devtmpfs prior to 3.x, and it was working well. For versions prior to 2.6.32, the linux.mk code will set this option that doesn't exist, and the kconfig code of the kernel will simply get rid of it, without any consequences.

So I'd like to understand the "why" of this patch :)

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/1 linux: Don't enable DEVTMPFS support for kernels older than 3.x.

Hi Ryan, Thomas,

Quoted 10 lines · Thomas Petazzoni

Dear Ryan Barnett,

Quoted 7 lines · Ryan Barnett

From: Matt Poduska <[email protected]>

In the case where DEVTMPFS is desired for older kernels where the support is experimental, it's still possible to enable the option in the board's specific linux .config instead of relying on buildroot to make the modification.

Quoted 8 lines
Quoted 5 lines
---
  linux/linux.mk |    8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)

Which problem is this fixing? I remember having used devtmpfs prior to 3.x, and it was working well. For versions prior to 2.6.32, the

And in fact I have targets here that are stuck on 2.6.37, they happily use devtmpfs and it works just fine.

So I NACK this change, or if there's a strong motivation to apply it I would at least conceive a backward-compatibility path.

Signature · 1 line
Luca
#4 lore raw

PATCH 1/1 linux: Don't enable DEVTMPFS support for kernels older than 3.x.

Luca, Peter, Thomas, All,

Luca Ceresoli <[email protected]> wrote on 04/22/2014 05:41:13 AM:

Quoted 19 lines

Hi Ryan, Thomas,

Quoted 16 lines · Thomas Petazzoni

Dear Ryan Barnett,

Quoted 12 lines · Ryan Barnett

From: Matt Poduska <[email protected]>

In the case where DEVTMPFS is desired for older kernels where the support is experimental, it's still possible to enable the option in the board's specific linux .config instead of relying on buildroot to make the modification.

---
  linux/linux.mk |    8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)
Quoted 8 lines
Quoted 2 lines

Which problem is this fixing? I remember having used devtmpfs prior to 3.x, and it was working well. For versions prior to 2.6.32, the

And in fact I have targets here that are stuck on 2.6.37, they happily use devtmpfs and it works just fine.

So I NACK this change, or if there's a strong motivation to apply it I would at least conceive a backward-compatibility path.

We recently ran into a issue where brought a board forward to use Buildroot 2014.02 that we kept at a kernel version of 2.6.33. Yes, I agree that we should be using a new kernel but the work to port to a newer version is too great but we needed to upgrade some package versions. The system was unable to boot because DEVTMPFS_MOUNT was enabled in kernel config. We traced the issue back to Buildroot automatically enabling these options in our kernel config. There was no way to not include this kernel config option when BR2_ROOTFS_DEVICE_CREATION_STATIC is enabled.

We will try to analyze to see if there is a better way to get around this issue but I'm OK with this patch being rejected. Since this is mostly for legacy support and who wants to do that ;)

Thanks,
-Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140423/5fe914d8/attachment.html>

#5 lore raw

PATCH 1/1 linux: Don't enable DEVTMPFS support for kernels older than 3.x.

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"rjbarnet" == rjbarnet <[email protected]> writes:

Hi,

Quoted 8 lines

We recently ran into a issue where brought a board forward to use Buildroot 2014.02 that we kept at a kernel version of 2.6.33. Yes, I agree that we should be using a new kernel but the work to port to a newer version is too great but we needed to upgrade some package versions. The system was unable to boot because DEVTMPFS_MOUNT was enabled in kernel config. We traced the issue back to Buildroot automatically enabling these options in our kernel config. There was no way to not include this kernel config option when BR2_ROOTFS_DEVICE_CREATION_STATIC is enabled.

Huh, but we ONLY enable it if BR2_ROOTFS_DEVICE_CREATION_STATIC isn't enabled - So why not just enabled it?

Signature · 1 line
Bye, Peter Korsgaard 
#6 lore raw

PATCH 1/1 linux: Don't enable DEVTMPFS support for kernels older than 3.x.

Peter,

Peter Korsgaard <[email protected]> wrote on 04/24/2014 01:49:14 AM:

Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"rjbarnet" == rjbarnet <[email protected]> writes:

Hi,

Quoted 1 line

We recently ran into a issue where brought a board forward to use

Buildroot

Quoted 1 line
Quoted 1 line

2014.02 that we kept at a kernel version of 2.6.33. Yes, I agree that

we should

Quoted 1 line
Quoted 1 line

be using a new kernel but the work to port to a newer version is too

great but

Quoted 1 line
Quoted 1 line

we needed to upgrade some package versions. The system was unable to

boot

Quoted 1 line
Quoted 1 line

because DEVTMPFS_MOUNT was enabled in kernel config. We traced the

issue back

Quoted 1 line
Quoted 1 line

to Buildroot automatically enabling these options in our kernel

config. There

Quoted 5 lines
Quoted 2 lines

was no way to not include this kernel config option when BR2_ROOTFS_DEVICE_CREATION_STATIC is enabled.

Huh, but we ONLY enable it if BR2_ROOTFS_DEVICE_CREATION_STATIC isn't enabled - So why not just enabled it?

I meant to say, "when BR2_ROOTFS_DEVICE_CREATION_STATIC is NOT enabled". Sorry for the confusion and thanks for the clarification.

Thanks,
-Ryan

#7 lore raw

PATCH 1/1 linux: Don't enable DEVTMPFS support for kernels older than 3.x.

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ryan" == Ryan Barnett <[email protected]> writes:

Hi,

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

was no way to not include this kernel config option when BR2_ROOTFS_DEVICE_CREATION_STATIC is enabled.

Huh, but we ONLY enable it if BR2_ROOTFS_DEVICE_CREATION_STATIC isn't enabled - So why not just enabled it?

I meant to say, "when BR2_ROOTFS_DEVICE_CREATION_STATIC is NOT enabled". Sorry for the confusion and thanks for the clarification.

Ok, but the point of the other options are that they REALLY need devtmpfs support in the kernel, so if you don't want to use that then you should really select static /dev.

mdev could be made to work without devtmpfs, but not in the setup we support.

Signature · 1 line
Bye, Peter Korsgaard 
#8 lore raw

PATCH 1/1 linux: Don't enable DEVTMPFS support for kernels older than 3.x.

Peter,

Peter Korsgaard <[email protected]> wrote on 04/24/2014 03:00:48 PM:

Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ryan" == Ryan Barnett <[email protected]> writes:

Hi,

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

was no way to not include this kernel config option when BR2_ROOTFS_DEVICE_CREATION_STATIC is enabled.

Huh, but we ONLY enable it if BR2_ROOTFS_DEVICE_CREATION_STATIC isn't enabled - So why not just enabled it?

I meant to say, "when BR2_ROOTFS_DEVICE_CREATION_STATIC is NOT

enabled".

Quoted 8 lines
Quoted 1 line

Sorry for the confusion and thanks for the clarification.

Ok, but the point of the other options are that they REALLY need devtmpfs support in the kernel, so if you don't want to use that then you should really select static /dev.

mdev could be made to work without devtmpfs, but not in the setup we support.

Looking back the configuration that was causing the issue, this is the exact corner case that we need to support - mdev without devtmpfs.

Thanks,
-Ryan