rcS中启动udevd

在目标板的/etc/init.d/rcS文件中以如下命令启动udevd:

# start udevd.
/sbin/udevd -d
/sbin/udevtrigger
下面是启动过程,从 网络配置开始:

IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
     device=eth0, addr=192.168.37.244, mask=255.255.255.0, gw=255.255.255.255,
     host=192.168.37.244, domain=, nis-domain=(none),
     bootserver=255.255.255.255, rootserver=192.168.37.200, rootpath=
Looking up port of RPC 100003/2 on 192.168.37.200
eth0: link up (10/Half)
eth0: link down
eth0: link up (10/Half)
Looking up port of RPC 100005/1 on 192.168.37.200
VFS: Mounted root (nfs filesystem) on device 0:12.
Freeing init memory: 120K
rm: /tmp: is a directory
rm: /var: is a directory
udevd[859]: udev: missing sysfs features; please update the kernel or disable the kernel's CONFIG_SYSFS_DEPRECATED option; udev may fy

the program '/bin/busybox' called '/sbin/udevtrigger', it should use 'udevadm trigger <options>', this will stop working in a future e
udevadm[860]: the program '/bin/busybox' called '/sbin/udevtrigger', it should use 'udevadm trigger <options>', this will stop workine

/ #
最后能顺利进入shell界面,但是提示了udevd与内核的一个选项CONFIG_SYSFS_DEPRECATED似乎不兼容。

因为嵌入式系统的内核可以很方便地更改,重新编译内核:

make ARCH=arm CROSS_COMPILE=arm-linux- menuconfig
使用/操作符搜索一下 CONFIG_SYSFS_DEPRECATED,发现原来在General setup下确实被设定为y,

进入General setup选项,将Create deprecated sysfs layout for older userspace tools前面的*取消,保存退出。

重新编译生成uImage U-Boot中专用的二进制压缩文件,在U-Boot命令行界面将新编译生成的uImage烧写到Flash中,reset重启目标板。

重启完成,看到如下结果:

IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
     device=eth0, addr=192.168.37.244, mask=255.255.255.0, gw=255.255.255.255,
     host=192.168.37.244, domain=, nis-domain=(none),
     bootserver=255.255.255.255, rootserver=192.168.37.200, rootpath=
Looking up port of RPC 100003/2 on 192.168.37.200
eth0: link up (10/Half)
eth0: link down
eth0: link up (10/Half)
Looking up port of RPC 100005/1 on 192.168.37.200
VFS: Mounted root (nfs filesystem) on device 0:12.
Freeing init memory: 120K
rm: /tmp: is a directory
rm: /var: is a directory
the program '/bin/busybox' called '/sbin/udevtrigger', it should use 'udevadm trigger <options>', this will stop working in a future e
udevadm[861]: the program '/bin/busybox' called '/sbin/udevtrigger', it should use 'udevadm trigger <options>', this will stop workine

/ #
可以看到,原来的关于udev的missing sysfs features已经消失。只是使用上用法有所不同了。


转载于:https://www.cnblogs.com/java20130726/archive/2012/06/25/3218566.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值