Discussion:
BuildRoot not starting with Udev
Antoine Caurier
2012-10-15 08:55:00 UTC
Permalink
Hello,

I'm working on Buildroot-2012.08, with the at91sam9x5ek_defconfig.

It work perfectly fine with the default configuration. But I have a problem when
trying to activate udev.

With menuconfig, I set /dev management (Dynamic using udev), and then rebuild
the kernel and fs.

All is starting fine, except for buildroot. The board stop to display anything
just before the "Welcome to buildroot" prompt.

Here are the last traces:

UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size: 247603200 bytes (241800 KiB, 236 MiB, 1950 LEBs)
UBIFS: journal size: 9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:12.
Freeing init memory: 136K
Starting logging: OK
Populating /dev using udev: done
Starting portmap: portmap: fork: No such devicedone
ALSA: Restoring mixer settings...
Starting network...
/usr/sbin/alsactl: load_state:1686: No soundcards found...
Starting dropbear sshd: generating rsa key... generating dsa key... OK

Any ideas on what can causes my trouble?
Thx
Thomas Petazzoni
2012-10-16 17:41:17 UTC
Permalink
Dear Antoine Caurier,
Post by Antoine Caurier
Any ideas on what can causes my trouble?
Are letting Buildroot build your kernel, or are you building your
kernel outside of Buildroot? If you're building the kernel outside of
Buildroot, make sure that you have CONFIG_DEVTMPFS and
CONFIG_DEVTMPFS_MOUNT enabled in your kernel configuration/

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Antoine Caurier
2012-10-17 11:03:26 UTC
Permalink
Hello,

I found one of your previous post, where you said that if kernel was
build by buildroot, it should be ok. So I was thinking that it should
be ok just activating udev as I am building kernel with buildroot.

I tried to manually set DEVTMPFS in linux-menuconfig, and then
recompile the kernel (with buildroot), and it is now working.

Is it normal to have manualy to set DEVTMPFS in kernel configuration
in order to have udev working?

Thanks for your answer.



On Tue, Oct 16, 2012 at 7:41 PM, Thomas Petazzoni
Post by Thomas Petazzoni
Dear Antoine Caurier,
Post by Antoine Caurier
Any ideas on what can causes my trouble?
Are letting Buildroot build your kernel, or are you building your
kernel outside of Buildroot? If you're building the kernel outside of
Buildroot, make sure that you have CONFIG_DEVTMPFS and
CONFIG_DEVTMPFS_MOUNT enabled in your kernel configuration/
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Arnout Vandecappelle
2012-10-17 11:07:45 UTC
Permalink
Post by Antoine Caurier
I found one of your previous post, where you said that if kernel was
build by buildroot, it should be ok. So I was thinking that it should
be ok just activating udev as I am building kernel with buildroot.
I tried to manually set DEVTMPFS in linux-menuconfig, and then
recompile the kernel (with buildroot), and it is now working.
Is it normal to have manualy to set DEVTMPFS in kernel configuration
in order to have udev working?
The DEVTMPFS is set automatically by buildroot - but only when configuring
the kernel. Once your kernel is configured, it's not touched again.

So you'd have to run 'make linux-reconfigure' to get the devtmpfs (note that
you also loose your local modifications that way, unless you saved them to
a custom defconfig).

Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
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
Antoine Caurier
2012-10-17 11:15:00 UTC
Permalink
Ok! Thanks for the information!

Antoine
Post by Arnout Vandecappelle
Post by Antoine Caurier
I found one of your previous post, where you said that if kernel was
build by buildroot, it should be ok. So I was thinking that it should
be ok just activating udev as I am building kernel with buildroot.
I tried to manually set DEVTMPFS in linux-menuconfig, and then
recompile the kernel (with buildroot), and it is now working.
Is it normal to have manualy to set DEVTMPFS in kernel configuration
in order to have udev working?
The DEVTMPFS is set automatically by buildroot - but only when configuring
the kernel. Once your kernel is configured, it's not touched again.
So you'd have to run 'make linux-reconfigure' to get the devtmpfs (note that
you also loose your local modifications that way, unless you saved them to
a custom defconfig).
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
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
Thomas Petazzoni
2012-10-17 17:23:37 UTC
Permalink
Hello Antoine,
Post by Antoine Caurier
I found one of your previous post, where you said that if kernel was
build by buildroot, it should be ok. So I was thinking that it should
be ok just activating udev as I am building kernel with buildroot.
I tried to manually set DEVTMPFS in linux-menuconfig, and then
recompile the kernel (with buildroot), and it is now working.
Is it normal to have manualy to set DEVTMPFS in kernel configuration
in order to have udev working?
No, but it depends on what you did exactly.

If you did:

1) Configure /dev management as static
2) Configure your kernel
3) Build Buildroot
4) Reconfigure /dev management as udev
5) Build Buildroot

Then yes, it is normal: Buildroot doesn't try to be smart about
this kind of dependency. If you change the /dev management style, you
are responsible to restart the build of the kernel (make
linux-dirclean; make) so that it gets a configuration that is
compatible with a dynamic /dev management.

Best regards,

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Antoine Caurier
2012-10-18 07:38:52 UTC
Permalink
Yes, it is exactly what I did.
And yes it work after reconfiguring the kernel an compiling it!

Thanks

On Wed, Oct 17, 2012 at 7:23 PM, Thomas Petazzoni
Post by Thomas Petazzoni
Hello Antoine,
Post by Antoine Caurier
I found one of your previous post, where you said that if kernel was
build by buildroot, it should be ok. So I was thinking that it should
be ok just activating udev as I am building kernel with buildroot.
I tried to manually set DEVTMPFS in linux-menuconfig, and then
recompile the kernel (with buildroot), and it is now working.
Is it normal to have manualy to set DEVTMPFS in kernel configuration
in order to have udev working?
No, but it depends on what you did exactly.
1) Configure /dev management as static
2) Configure your kernel
3) Build Buildroot
4) Reconfigure /dev management as udev
5) Build Buildroot
Then yes, it is normal: Buildroot doesn't try to be smart about
this kind of dependency. If you change the /dev management style, you
are responsible to restart the build of the kernel (make
linux-dirclean; make) so that it gets a configuration that is
compatible with a dynamic /dev management.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Arnout Vandecappelle
2012-10-16 18:43:11 UTC
Permalink
Post by Antoine Caurier
Hello,
I'm working on Buildroot-2012.08, with the at91sam9x5ek_defconfig.
It work perfectly fine with the default configuration. But I have a problem when
trying to activate udev.
With menuconfig, I set /dev management (Dynamic using udev), and then rebuild
the kernel and fs.
All is starting fine, except for buildroot. The board stop to display anything
just before the "Welcome to buildroot" prompt.
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size: 247603200 bytes (241800 KiB, 236 MiB, 1950 LEBs)
UBIFS: journal size: 9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:12.
Freeing init memory: 136K
Starting logging: OK
Populating /dev using udev: done
So udev starts (or at least doesn't print an error to console).
Post by Antoine Caurier
Starting portmap: portmap: fork: No such devicedone
ALSA: Restoring mixer settings...
Starting network...
/usr/sbin/alsactl: load_state:1686: No soundcards found...
Starting dropbear sshd: generating rsa key... generating dsa key... OK
Since dropbear starts, can you log in with ssh? Then you can check if
getty is running on the (correct) serial port and if there's something
funny showing up in dmesg or /var/log/messages.

Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
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
Loading...