Skip to contentSkip to conversation

editing device_table_dev.txt

Buildroot John Stile 6 participants 15 messages Feb 20, 2013 – Feb 24, 2013

lore
Share & tools
lore

John Stile

author
#0 lore raw

I need a better way to auto-populate /dev, using buildroot-2011.11, with 2.6.30 kernel, but it seems not matter what I do, /dev/ is not populated automaticly.

My config looks like this:

BR2_ROOTFS_DEVICE_CREATION_STATIC=y
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS is not set
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV is not set
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV is not set BR2_ROOTFS_DEVICE_TABLE="target/generic/device_table.txt target/generic/device_table_dev.txt" BR2_ROOTFS_STATIC_DEVICE_TABLE="target/generic/device_table_dev.txt"
# BR2_ROOTFS_SKELETON_DEFAULT is not set
BR2_ROOTFS_SKELETON_CUSTOM=y
BR2_ROOTFS_SKELETON_CUSTOM_PATH="fs/skeletonMiLON" BR2_ROOTFS_POST_BUILD_SCRIPT="$(TOPDIR)/board/atmel/at91sam9g20ek/post-build/post-build-scripts.bash"

To use hwclock I had to create dev/rtc0.
Although my kernel argument contains mtdparts, the mtd* and mtdblock* devices are not created.
There are others too.

What should my config look like in order to auto-populate /dev?

#1 lore raw

21.2.2013 1:37, John Stile kirjoitti:

Quoted 17 lines

I need a better way to auto-populate /dev, using buildroot-2011.11, with 2.6.30 kernel, but it seems not matter what I do, /dev/ is not populated automaticly.

My config looks like this:

BR2_ROOTFS_DEVICE_CREATION_STATIC=y
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS is not set
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV is not set
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV is not set BR2_ROOTFS_DEVICE_TABLE="target/generic/device_table.txt target/generic/device_table_dev.txt" BR2_ROOTFS_STATIC_DEVICE_TABLE="target/generic/device_table_dev.txt"
# BR2_ROOTFS_SKELETON_DEFAULT is not set
BR2_ROOTFS_SKELETON_CUSTOM=y
BR2_ROOTFS_SKELETON_CUSTOM_PATH="fs/skeletonMiLON" BR2_ROOTFS_POST_BUILD_SCRIPT="$(TOPDIR)/board/atmel/at91sam9g20ek/post-build/post-build-scripts.bash"

Quoted 7 lines

To use hwclock I had to create dev/rtc0.
Although my kernel argument contains mtdparts, the mtd* and mtdblock* devices are not created.
There are others too.

What should my config look like in order to auto-populate /dev?

Well, if you don't want to manually create your device nodes then there are several ways to autopopulate /dev

Maybe the simplest would be just let the kernel handle it by mounting /dev with tmpfs
So selecting BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y is the correct option.

Also kernel .config file should also have CONFIG_DEVTMPFS and DEVTMPFS as 'y'.
If you are using initramfs as your root system then kernel .config is not enough but the /dev must be mounted manually
in /etc/fstab or somehwere in init-script (I think buildroot already does this?)

mount -t devtmpfs devtmpfs /dev

Next easiest is mdev. It needs /etc/mdev.conf file and somewhere in your init script your should have
echo /sbin/mdev > /proc/sys/kernel/hotplug

BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y should be selected in that case.

Most complete but also maybe most complex in configuration is udev BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV=y

Unlike previous two methods, devtmpfs and mdev, udev daemon (udevd) is usually running continually and polling any events from kernel when devices are plugged/unplugged.

Ofcourse if all you need is just the initial auto-creation of devices at the boot time,
then devtmpfs or mdev would be perfectly enough.

Regards
Stefan

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#2 lore raw

21.2.2013 12:14, Stefan Fr?berg kirjoitti:

Quoted 28 lines

21.2.2013 1:37, John Stile kirjoitti:

Quoted 17 lines

I need a better way to auto-populate /dev, using buildroot-2011.11, with 2.6.30 kernel, but it seems not matter what I do, /dev/ is not populated automaticly.

My config looks like this:

BR2_ROOTFS_DEVICE_CREATION_STATIC=y
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS is not set
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV is not set
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV is not set BR2_ROOTFS_DEVICE_TABLE="target/generic/device_table.txt target/generic/device_table_dev.txt" BR2_ROOTFS_STATIC_DEVICE_TABLE="target/generic/device_table_dev.txt"
# BR2_ROOTFS_SKELETON_DEFAULT is not set
BR2_ROOTFS_SKELETON_CUSTOM=y
BR2_ROOTFS_SKELETON_CUSTOM_PATH="fs/skeletonMiLON" BR2_ROOTFS_POST_BUILD_SCRIPT="$(TOPDIR)/board/atmel/at91sam9g20ek/post-build/post-build-scripts.bash"

Quoted 7 lines

To use hwclock I had to create dev/rtc0.
Although my kernel argument contains mtdparts, the mtd* and mtdblock* devices are not created.
There are others too.

What should my config look like in order to auto-populate /dev?

Well, if you don't want to manually create your device nodes then there are several ways to autopopulate /dev

Quoted 7 lines

Maybe the simplest would be just let the kernel handle it by mounting /dev with tmpfs
So selecting BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y is the correct option.

Also kernel .config file should also have CONFIG_DEVTMPFS and DEVTMPFS as 'y'.

Sorry, that should have been CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y

Regards
Stefan

#3 lore raw

Hi Stefan,

Quoted 34 lines · Stefan Fr?berg

21.2.2013 12:14, Stefan Fr?berg kirjoitti:

Quoted 33 lines

21.2.2013 1:37, John Stile kirjoitti:

Quoted 17 lines

I need a better way to auto-populate /dev, using buildroot-2011.11, with 2.6.30 kernel, but it seems not matter what I do, /dev/ is not populated automaticly.

My config looks like this:

BR2_ROOTFS_DEVICE_CREATION_STATIC=y
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS is not set
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV is not set
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV is not set BR2_ROOTFS_DEVICE_TABLE="target/generic/device_table.txt target/generic/device_table_dev.txt" BR2_ROOTFS_STATIC_DEVICE_TABLE="target/generic/device_table_dev.txt"
# BR2_ROOTFS_SKELETON_DEFAULT is not set
BR2_ROOTFS_SKELETON_CUSTOM=y
BR2_ROOTFS_SKELETON_CUSTOM_PATH="fs/skeletonMiLON" BR2_ROOTFS_POST_BUILD_SCRIPT="$(TOPDIR)/board/atmel/at91sam9g20ek/post-build/post-build-scripts.bash"

Quoted 7 lines

To use hwclock I had to create dev/rtc0.
Although my kernel argument contains mtdparts, the mtd* and mtdblock* devices are not created.
There are others too.

What should my config look like in order to auto-populate /dev?

Well, if you don't want to manually create your device nodes then there are several ways to autopopulate /dev

Maybe the simplest would be just let the kernel handle it by mounting /dev with tmpfs
So selecting BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y is the correct option.

Quoted 4 lines
Quoted 2 lines

Also kernel .config file should also have CONFIG_DEVTMPFS and DEVTMPFS as 'y'.

Sorry, that should have been CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y

Kernel version 2.6.30 is too old for that.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#4 lore raw

21.2.2013 12:23, Baruch Siach kirjoitti:

Quoted 37 lines

Hi Stefan,

Quoted 34 lines · Stefan Fr?berg

21.2.2013 12:14, Stefan Fr?berg kirjoitti:

Quoted 33 lines

21.2.2013 1:37, John Stile kirjoitti:

Quoted 17 lines

I need a better way to auto-populate /dev, using buildroot-2011.11, with 2.6.30 kernel, but it seems not matter what I do, /dev/ is not populated automaticly.

My config looks like this:

BR2_ROOTFS_DEVICE_CREATION_STATIC=y
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS is not set
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV is not set
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV is not set BR2_ROOTFS_DEVICE_TABLE="target/generic/device_table.txt target/generic/device_table_dev.txt" BR2_ROOTFS_STATIC_DEVICE_TABLE="target/generic/device_table_dev.txt"
# BR2_ROOTFS_SKELETON_DEFAULT is not set
BR2_ROOTFS_SKELETON_CUSTOM=y
BR2_ROOTFS_SKELETON_CUSTOM_PATH="fs/skeletonMiLON" BR2_ROOTFS_POST_BUILD_SCRIPT="$(TOPDIR)/board/atmel/at91sam9g20ek/post-build/post-build-scripts.bash"

Quoted 7 lines

To use hwclock I had to create dev/rtc0.
Although my kernel argument contains mtdparts, the mtd* and mtdblock* devices are not created.
There are others too.

What should my config look like in order to auto-populate /dev?

Well, if you don't want to manually create your device nodes then there are several ways to autopopulate /dev

Maybe the simplest would be just let the kernel handle it by mounting /dev with tmpfs
So selecting BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y is the correct option.

Quoted 7 lines
Quoted 3 lines
Quoted 2 lines

Also kernel .config file should also have CONFIG_DEVTMPFS and DEVTMPFS as 'y'.

Sorry, that should have been CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y

Kernel version 2.6.30 is too old for that.

baruch

It is ?
Damn, then the only options are mdev and udev.

Stefan

#5 lore raw
Quoted 9 lines · Stefan Fr?berg
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines

Also kernel .config file should also have CONFIG_DEVTMPFS and DEVTMPFS as 'y'.

Sorry, that should have been CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y

Kernel version 2.6.30 is too old for that.

baruch

It is ?
Damn, then the only options are mdev and udev.

I'm afraid that mdev and udev no longer work with old kernels that
don't support the DEVTMPFS option...

mdev and udev don't create device nodes; they only do something
configurable when a hotplug event happens.

That said, you can create custom mdev/udev rules to create device
nodes. But it's all manual - and much simpler to just create the device nodes manually.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#6 lore raw

22.2.2013 0:57, Arnout Vandecappelle kirjoitti:

Quoted 10 lines · Stefan Fr?berg
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

Also kernel .config file should also have CONFIG_DEVTMPFS and

DEVTMPFS

Quoted 2 lines
Quoted 1 line
Quoted 1 line

as 'y'.

Sorry, that should have been CONFIG_DEVTMPFS=y and

CONFIG_DEVTMPFS_MOUNT=y
Kernel version 2.6.30 is too old for that.

baruch

Quoted 9 lines
Quoted 2 lines

It is ?
Damn, then the only options are mdev and udev.

I'm afraid that mdev and udev no longer work with old kernels that
don't support the DEVTMPFS option...

mdev and udev don't create device nodes; they only do something
configurable when a hotplug event happens.

What you mean that mdev or udev does not create device nodes ??? If older kernels don't support devtmpfs like Baruch
said then who does that device node creation if not the mdev or udev when event happens ???

Quoted 4 lines

That said, you can create custom mdev/udev rules to create device
nodes. But it's all manual - and much simpler to just create the device nodes manually.

for mdev it's just a single file, /etc/mdev.conf (I can even copy-paste it here, it's not that long and will cover 99% of needs).

for udev it punch of rules found under /lib/udev/rules.d and yes, it can get really tedious to play games with those files if some device node is not created or
is not created with right permissions or whatever.

Quoted 3 lines

Regards,
Arnout

Regards
Stefan

/etc/mdev.conf

# null may already exist; therefore ownership has to be changed with command
null        root:root 666 @chmod 666 $MDEV
zero        root:root 666
full        root:root 666
random        root:root 444
urandom        root:root 444
hwrandom    root:root 444
grsec        root:root 660

kmem root:root 640
mem root:root 640
port root:root 640

# console may already exist; therefore ownership has to be changed with
command
console        root:tty 600 @chmod 600 $MDEV
ptmx        root:tty 666
pty.*        root:tty 660

# Typical devices
tty root:tty 666
tty[0-9]* root:tty 660
vcsa*[0-9]* root:tty 660
ttyS[0-9]* root:root 660

# alsa sound devices
pcm.*        root:audio 660 =snd/
control.*    root:audio 660 =snd/
midi.*        root:audio 660 =snd/
seq        root:audio 660 =snd/
timer        root:audio 660 =snd/
# input stuff
event[0-9]+    root:root 640 =input/
mice        root:root 640 =input/
mouse[0-9]    root:root 640 =input/
ts[0-9]        root:root 600 =input/

#
#sr[0-9] root:cdrom 660 *ln -sf $MDEV cdrom

sr[0-9] root:root 660 *ln -sf $MDEV cdrom

#7 lore raw
Quoted 17 lines · Stefan Fr?berg

22.2.2013 0:57, Arnout Vandecappelle kirjoitti:

Quoted 16 lines · Stefan Fr?berg
Quoted 11 lines
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

Also kernel .config file should also have CONFIG_DEVTMPFS and

DEVTMPFS

Quoted 2 lines
Quoted 1 line
Quoted 1 line

as 'y'.

Sorry, that should have been CONFIG_DEVTMPFS=y and

CONFIG_DEVTMPFS_MOUNT=y
Kernel version 2.6.30 is too old for that.

baruch

It is ?
Damn, then the only options are mdev and udev.

I'm afraid that mdev and udev no longer work with old kernels that
don't support the DEVTMPFS option...

Quoted 8 lines
Quoted 3 lines

mdev and udev don't create device nodes; they only do something
configurable when a hotplug event happens.

What you mean that mdev or udev does not create device nodes ??? If older kernels don't support devtmpfs like Baruch
said then who does that device node creation if not the mdev or udev when event happens ???

Well, nobody...

Turns out that mdev still does device node creation. Makes me wonder if
I'm not mistaken about udev as well... I just remember hearing that device node creation was removed when DEVTMPFS was introduced.

Quoted 7 lines
Quoted 4 lines

That said, you can create custom mdev/udev rules to create device
nodes. But it's all manual - and much simpler to just create the device nodes manually.

for mdev it's just a single file, /etc/mdev.conf (I can even copy-paste it here, it's not that long and will cover 99% of needs).

Yes, but that file just specifies the chmod/chown rules, not how to
create the device nodes. But as I just saw in the code, mdev does in fact create the device nodes.

Regards,
Arnout

Quoted 4 lines

for udev it punch of rules found under /lib/udev/rules.d and yes, it can get really tedious to play games with those files if some device node is not created or
is not created with right permissions or whatever.

[snip]

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#8 lore raw

[snip]

Quoted 12 lines
Quoted 11 lines
Quoted 6 lines

I'm afraid that mdev and udev no longer work with old kernels that
don't support the DEVTMPFS option...

mdev and udev don't create device nodes; they only do something
configurable when a hotplug event happens.

What you mean that mdev or udev does not create device nodes ??? If older kernels don't support devtmpfs like Baruch
said then who does that device node creation if not the mdev or udev when event happens ???

Quoted 6 lines

Well, nobody...

Turns out that mdev still does device node creation. Makes me wonder
if I'm not mistaken about udev as well... I just remember hearing that device node creation was removed when DEVTMPFS was introduced.

Speaking of udev, I must say that Im not very happy of that recent including of systemd as hard dependency.
If it would be optional then it would be ok and fine, but to forcefully cram yet-another init system (in addition to bazillion other existing ones) down the throats of latest udev users .... not good, not good at all!

Also, what I have studied little of those Gnome3 software packages, there also seems to spreading this systemd thing.

Stefan

#9 lore raw
Quoted 5 lines · Stefan Fr?berg

Speaking of udev, I must say that Im not very happy of that recent including of systemd as hard dependency.
If it would be optional then it would be ok and fine, but to forcefully cram yet-another init system (in addition to bazillion other existing ones) down the throats of latest udev users .... not good, not good at all!

If I understand correctly, you can still build udev without systemd,
they're just packaged together. They have added a somewhat hard-to-avoid dependency on dbus, though.

But then, why would you want udev to begin with? mdev can do everything
that udev can, no?

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#10 lore raw

23.2.2013 11:30, Arnout Vandecappelle kirjoitti:

Quoted 8 lines · Stefan Fr?berg
Quoted 6 lines

Speaking of udev, I must say that Im not very happy of that recent including of systemd as hard dependency.
If it would be optional then it would be ok and fine, but to forcefully cram yet-another init system (in addition to bazillion other existing ones)
down the throats of latest udev users .... not good, not good at all!

Quoted 4 lines

If I understand correctly, you can still build udev without systemd,
they're just packaged together. They have added a somewhat hard-to-avoid dependency on dbus, though.

It can? Hmmm... have to check it again. I think Gentoo folks have avoided that dbus thing and they even forked lately udev -> eudev. And that eudev does not need need /usr to be mounted before it starts.

Quoted 3 lines

But then, why would you want udev to begin with? mdev can do
everything that udev can, no?

True.
mdev should be able to do everything that udev does.
Maybe even run scripts when mdev detect plugin event from kernel (not sure, have not checked).

But what really annoys me is that some newer Gnome packages include udev as hard dependency.
So I end up installing udev anyway even if I would have just liked to use simple mdev.

Quoted 3 lines

Regards,
Arnout

#11 lore raw
In reply to Arnout Vandecappelle

Dear Arnout Vandecappelle,

Quoted 11 lines · Arnout Vandecappelle
Quoted 4 lines

What you mean that mdev or udev does not create device nodes ??? If older kernels don't support devtmpfs like Baruch
said then who does that device node creation if not the mdev or udev when event happens ???

Well, nobody...

Turns out that mdev still does device node creation. Makes me
wonder if I'm not mistaken about udev as well... I just remember hearing that device node creation was removed when DEVTMPFS was introduced.

Yes, I think you got the thing wrong: udev and mdev are still creating the device nodes. Of course, they might have already been created by devtmpfs, but I don't think it is a requirement. At least, devtmpfs is definitely not a requirement for mdev to work (except in Buildroot, in which we made the decision that if mdev is to be used, then devtmpfs support must be there).

Quoted 11 lines
Quoted 7 lines
Quoted 4 lines

That said, you can create custom mdev/udev rules to create device
nodes. But it's all manual - and much simpler to just create the device nodes manually.

for mdev it's just a single file, /etc/mdev.conf (I can even copy-paste it here, it's not that long and will cover 99% of needs).

Yes, but that file just specifies the chmod/chown rules, not how to
create the device nodes. But as I just saw in the code, mdev does in fact create the device nodes.

udev can also create symbolic links to device files based on custom rules, or other funky things.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#12 lore raw
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Turns out that mdev still does device node creation. Makes me wonder if I'm not mistaken about udev as well... I just remember hearing that device node creation was removed when DEVTMPFS was introduced.

Thomas> Yes, I think you got the thing wrong: udev and mdev are still Thomas> creating the device nodes. Of course, they might have already Thomas> been created by devtmpfs, but I don't think it is a Thomas> requirement. At least, devtmpfs is definitely not a requirement Thomas> for mdev to work (except in Buildroot, in which we made the Thomas> decision that if mdev is to be used, then devtmpfs support must Thomas> be there).

And the main reason for this is that you need a writable /dev and basic device nodes before mdev starts up, and the simplest way of getting this is using devtmpfs.

What mdev/udev buys you over pure devtmpfs is the possibility of custom rules (names/permissions/programs executed).

Signature · 1 line
Bye, Peter Korsgaard
#13 lore raw
In reply to Stefan Fröberg

Dear Stefan Fr?berg,

Quoted 11 lines · Stefan Fr?berg
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Also kernel .config file should also have CONFIG_DEVTMPFS and DEVTMPFS as 'y'.

Sorry, that should have been CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y

Kernel version 2.6.30 is too old for that.

baruch

It is ?
Damn, then the only options are mdev and udev.

No, because our mdev/udev handling makes the assumption that devtmpfs support is enabled in the kernel.

Contrary to what Arnout says, I don't think devtmpfs support is *mandatory* to get mdev to work. But in Buildroot, we've decided to support only mdev on top of devtmpfs.

From linux/linux.mk:

        $(if $(BR2_ROOTFS_DEVICE_CREATION_STATIC),,
                $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(@D)/.config)
                $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config))

So whenever we're not using the "static" method, we enable DEVTMPFS + DEVTMPFS_MOUNT.

So if you're using a kernel < 2.6.32 (I think that's the kernel release in which devtmpfs was introduced), then your only choice is to use the static method. Obviously, another better solution is to upgrade the kernel version you're using. The .config posted by John Stile originally mentions a board/atmel/at91sam9g20ek/ directory, which seems to indicate John is using the AT91SAM9G20 SoC. This SoC is perfectly well supported by mainline kernel versions, so there should normally be no reason to stick with the old 2.6.30.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#14 lore raw
In reply to John Stile
Quoted 17 lines · John Stile

I need a better way to auto-populate /dev, using buildroot-2011.11, with 2.6.30 kernel, but it seems not matter what I do, /dev/ is not populated automaticly.

My config looks like this:

BR2_ROOTFS_DEVICE_CREATION_STATIC=y
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS is not set
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV is not set
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV is not set BR2_ROOTFS_DEVICE_TABLE="target/generic/device_table.txt target/generic/device_table_dev.txt" BR2_ROOTFS_STATIC_DEVICE_TABLE="target/generic/device_table_dev.txt"
# BR2_ROOTFS_SKELETON_DEFAULT is not set
BR2_ROOTFS_SKELETON_CUSTOM=y
BR2_ROOTFS_SKELETON_CUSTOM_PATH="fs/skeletonMiLON" BR2_ROOTFS_POST_BUILD_SCRIPT="$(TOPDIR)/board/atmel/at91sam9g20ek/post-build/post-build-scripts.bash"

Quoted 1 line

To use hwclock I had to create dev/rtc0.

/dev/rtc is part of device_table_dev.txt. Isn't that enough?

Quoted 2 lines

Although my kernel argument contains mtdparts, the mtd* and mtdblock* devices are not created.

device_table_dev.txt creates /dev/mtd0 through /dev/mtd3.

Can you check in the tar file if these device nodes do exist? Note that
they will not appear in the output/target/dev, they are only created when the rootfs is created.

Regards,
Arnout

Quoted 3 lines

There are others too.

What should my config look like in order to auto-populate /dev?

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F