* [Buildroot] editing device_table_dev.txt
@ 2013-02-20 23:37 John Stile
2013-02-21 10:14 ` Stefan Fröberg
2013-02-21 23:14 ` Arnout Vandecappelle
0 siblings, 2 replies; 15+ messages in thread
From: John Stile @ 2013-02-20 23:37 UTC (permalink / raw)
To: buildroot
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?
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] editing device_table_dev.txt
2013-02-20 23:37 [Buildroot] editing device_table_dev.txt John Stile
@ 2013-02-21 10:14 ` Stefan Fröberg
2013-02-21 10:21 ` Stefan Fröberg
2013-02-21 23:14 ` Arnout Vandecappelle
1 sibling, 1 reply; 15+ messages in thread
From: Stefan Fröberg @ 2013-02-21 10:14 UTC (permalink / raw)
To: buildroot
21.2.2013 1:37, John Stile kirjoitti:
> 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?
>
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
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] editing device_table_dev.txt
2013-02-21 10:14 ` Stefan Fröberg
@ 2013-02-21 10:21 ` Stefan Fröberg
2013-02-21 10:23 ` Baruch Siach
0 siblings, 1 reply; 15+ messages in thread
From: Stefan Fröberg @ 2013-02-21 10:21 UTC (permalink / raw)
To: buildroot
21.2.2013 12:14, Stefan Fr?berg kirjoitti:
> 21.2.2013 1:37, John Stile kirjoitti:
>> 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?
>>
> 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'.
Sorry, that should have been CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y
Regards
Stefan
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] editing device_table_dev.txt
2013-02-21 10:21 ` Stefan Fröberg
@ 2013-02-21 10:23 ` Baruch Siach
2013-02-21 10:32 ` Stefan Fröberg
0 siblings, 1 reply; 15+ messages in thread
From: Baruch Siach @ 2013-02-21 10:23 UTC (permalink / raw)
To: buildroot
Hi Stefan,
On Thu, Feb 21, 2013 at 12:21:00PM +0200, Stefan Fr?berg wrote:
> 21.2.2013 12:14, Stefan Fr?berg kirjoitti:
> > 21.2.2013 1:37, John Stile kirjoitti:
> >> 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?
> >>
> > 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'.
>
> Sorry, that should have been CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y
Kernel version 2.6.30 is too old for that.
baruch
--
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 -
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] editing device_table_dev.txt
2013-02-21 10:23 ` Baruch Siach
@ 2013-02-21 10:32 ` Stefan Fröberg
2013-02-21 22:57 ` Arnout Vandecappelle
2013-02-24 17:24 ` Thomas Petazzoni
0 siblings, 2 replies; 15+ messages in thread
From: Stefan Fröberg @ 2013-02-21 10:32 UTC (permalink / raw)
To: buildroot
21.2.2013 12:23, Baruch Siach kirjoitti:
> Hi Stefan,
>
> On Thu, Feb 21, 2013 at 12:21:00PM +0200, Stefan Fr?berg wrote:
>> 21.2.2013 12:14, Stefan Fr?berg kirjoitti:
>>> 21.2.2013 1:37, John Stile kirjoitti:
>>>> 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?
>>>>
>>> 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'.
>> 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] editing device_table_dev.txt
2013-02-21 10:32 ` Stefan Fröberg
@ 2013-02-21 22:57 ` Arnout Vandecappelle
2013-02-21 23:07 ` Stefan Fröberg
2013-02-24 17:24 ` Thomas Petazzoni
1 sibling, 1 reply; 15+ messages in thread
From: Arnout Vandecappelle @ 2013-02-21 22:57 UTC (permalink / raw)
To: buildroot
On 21/02/13 11:32, Stefan Fr?berg wrote:
>>>> >>>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
--
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] editing device_table_dev.txt
2013-02-21 22:57 ` Arnout Vandecappelle
@ 2013-02-21 23:07 ` Stefan Fröberg
2013-02-21 23:24 ` Arnout Vandecappelle
0 siblings, 1 reply; 15+ messages in thread
From: Stefan Fröberg @ 2013-02-21 23:07 UTC (permalink / raw)
To: buildroot
22.2.2013 0:57, Arnout Vandecappelle kirjoitti:
> On 21/02/13 11:32, Stefan Fr?berg wrote:
>>>>> >>>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.
>
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 ???
> 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.
> 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] editing device_table_dev.txt
2013-02-20 23:37 [Buildroot] editing device_table_dev.txt John Stile
2013-02-21 10:14 ` Stefan Fröberg
@ 2013-02-21 23:14 ` Arnout Vandecappelle
1 sibling, 0 replies; 15+ messages in thread
From: Arnout Vandecappelle @ 2013-02-21 23:14 UTC (permalink / raw)
To: buildroot
On 21/02/13 00:37, John Stile wrote:
> 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.
/dev/rtc is part of device_table_dev.txt. Isn't that enough?
> 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
> There are others too.
>
> What should my config look like in order to auto-populate /dev?
--
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] editing device_table_dev.txt
2013-02-21 23:07 ` Stefan Fröberg
@ 2013-02-21 23:24 ` Arnout Vandecappelle
2013-02-21 23:32 ` Stefan Fröberg
2013-02-24 17:26 ` Thomas Petazzoni
0 siblings, 2 replies; 15+ messages in thread
From: Arnout Vandecappelle @ 2013-02-21 23:24 UTC (permalink / raw)
To: buildroot
On 22/02/13 00:07, Stefan Fr?berg wrote:
> 22.2.2013 0:57, Arnout Vandecappelle kirjoitti:
>> On 21/02/13 11:32, Stefan Fr?berg wrote:
>>>>>>>>> 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.
>>
>
> 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.
>> 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
> 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]
--
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] editing device_table_dev.txt
2013-02-21 23:24 ` Arnout Vandecappelle
@ 2013-02-21 23:32 ` Stefan Fröberg
2013-02-23 9:30 ` Arnout Vandecappelle
2013-02-24 17:26 ` Thomas Petazzoni
1 sibling, 1 reply; 15+ messages in thread
From: Stefan Fröberg @ 2013-02-21 23:32 UTC (permalink / raw)
To: buildroot
[snip]
>>> 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 ???
>
> 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] editing device_table_dev.txt
2013-02-21 23:32 ` Stefan Fröberg
@ 2013-02-23 9:30 ` Arnout Vandecappelle
2013-02-23 11:18 ` Stefan Fröberg
0 siblings, 1 reply; 15+ messages in thread
From: Arnout Vandecappelle @ 2013-02-23 9:30 UTC (permalink / raw)
To: buildroot
On 22/02/13 00:32, Stefan Fr?berg wrote:
> 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
--
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] editing device_table_dev.txt
2013-02-23 9:30 ` Arnout Vandecappelle
@ 2013-02-23 11:18 ` Stefan Fröberg
0 siblings, 0 replies; 15+ messages in thread
From: Stefan Fröberg @ 2013-02-23 11:18 UTC (permalink / raw)
To: buildroot
23.2.2013 11:30, Arnout Vandecappelle kirjoitti:
> On 22/02/13 00:32, Stefan Fr?berg wrote:
>> 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.
>
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.
> 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.
> Regards,
> Arnout
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] editing device_table_dev.txt
2013-02-21 10:32 ` Stefan Fröberg
2013-02-21 22:57 ` Arnout Vandecappelle
@ 2013-02-24 17:24 ` Thomas Petazzoni
1 sibling, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2013-02-24 17:24 UTC (permalink / raw)
To: buildroot
Dear Stefan Fr?berg,
On Thu, 21 Feb 2013 12:32:27 +0200, Stefan Fr?berg wrote:
> >>> 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
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] editing device_table_dev.txt
2013-02-21 23:24 ` Arnout Vandecappelle
2013-02-21 23:32 ` Stefan Fröberg
@ 2013-02-24 17:26 ` Thomas Petazzoni
2013-02-24 18:11 ` Peter Korsgaard
1 sibling, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2013-02-24 17:26 UTC (permalink / raw)
To: buildroot
Dear Arnout Vandecappelle,
On Fri, 22 Feb 2013 00:24:11 +0100, Arnout Vandecappelle wrote:
> > 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).
> >> 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
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] editing device_table_dev.txt
2013-02-24 17:26 ` Thomas Petazzoni
@ 2013-02-24 18:11 ` Peter Korsgaard
0 siblings, 0 replies; 15+ messages in thread
From: Peter Korsgaard @ 2013-02-24 18:11 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 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).
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2013-02-24 18:11 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-20 23:37 [Buildroot] editing device_table_dev.txt John Stile
2013-02-21 10:14 ` Stefan Fröberg
2013-02-21 10:21 ` Stefan Fröberg
2013-02-21 10:23 ` Baruch Siach
2013-02-21 10:32 ` Stefan Fröberg
2013-02-21 22:57 ` Arnout Vandecappelle
2013-02-21 23:07 ` Stefan Fröberg
2013-02-21 23:24 ` Arnout Vandecappelle
2013-02-21 23:32 ` Stefan Fröberg
2013-02-23 9:30 ` Arnout Vandecappelle
2013-02-23 11:18 ` Stefan Fröberg
2013-02-24 17:26 ` Thomas Petazzoni
2013-02-24 18:11 ` Peter Korsgaard
2013-02-24 17:24 ` Thomas Petazzoni
2013-02-21 23:14 ` Arnout Vandecappelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox