天嵌 ARM开发社区

 找回密码
 注册
查看: 3142|回复: 9

lcd背光控制程序

[复制链接]
wangpeihui123 发表于 2010-10-12 14:32:46 | 显示全部楼层 |阅读模式
按照手册上说的做了,,,但是问什么一直说没有backlight这个命令呢
终端上打印如下信息
[root@EmbedSky/]#backlight on
-/bin/sh: backlight: not found
[root@EmbedSky/]#ls sbin
adjtimex           ifconfig           mkfs.ext2          setconsole
arp                ifdown             mkfs.minix         slattach
backlight          ifenslave          mkfs.vfat          start-stop-daemon
blkid              ifup               mkswap             sulogin
depmod             init               modprobe           swapoff
devmem             insmod             nameif             swapon
fbsplash           klogd              net_set            switch_root
fdisk              loadkmap           net_set~           sysctl
findfs             logread            pivot_root         syslogd
freeramdisk        losetup            poweroff           tunctl
fsck               lsmod              raidautorun        tune2fs
fsck.minix         makedevs           reboot             udhcpc
getty              man                rmmod              vconfig
halt               mdev               route              watchdog
hdparm             mkdosfs            runlevel           zcip
hwclock            mke2fs             serial_test

这是怎么回事
 楼主| wangpeihui123 发表于 2010-10-12 14:42:44 | 显示全部楼层
还有为什么/sbin这个文件夹下的文件基本上都是链接到busybox上的
[root@EmbedSky/sbin]#ls -l
lrwxrwxrwx    1 root     root            14 Sep  8  2010 adjtimex -> ../bin/busy
box
lrwxrwxrwx    1 root     root            14 Sep  8  2010 arp -> ../bin/busybox
-rwxr-xr-x    1 root     root          3788 Sep 18  2010 backlight
lrwxrwxrwx    1 root     root            14 Sep  8  2010 blkid -> ../bin/busybox

lrwxrwxrwx    1 root     root            14 Sep  8  2010 depmod -> ../bin/busybo
x
lrwxrwxrwx    1 root     root            14 Sep  8  2010 devmem -> ../bin/busybo
x
lrwxrwxrwx    1 root     root            14 Sep  8  2010 fbsplash -> ../bin/busy
box
lrwxrwxrwx    1 root     root            14 Sep  8  2010 fdisk -> ../bin/busybox

lrwxrwxrwx    1 root     root            14 Sep  8  2010 findfs -> ../bin/busybo
x
lrwxrwxrwx    1 root     root            14 Sep  8  2010 freeramdisk -> ../bin/b
usybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 fsck -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 fsck.minix -> ../bin/bu
sybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 getty -> ../bin/busybox

lrwxrwxrwx    1 root     root            14 Sep  8  2010 halt -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 hdparm -> ../bin/busybo
x
lrwxrwxrwx    1 root     root            14 Sep  8  2010 hwclock -> ../bin/busyb
ox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 ifconfig -> ../bin/busy
box
lrwxrwxrwx    1 root     root            14 Sep  8  2010 ifdown -> ../bin/busybo
x
lrwxrwxrwx    1 root     root            14 Sep  8  2010 ifenslave -> ../bin/bus
ybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 ifup -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 init -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 insmod -> ../bin/busybo
x
lrwxrwxrwx    1 root     root            14 Sep  8  2010 klogd -> ../bin/busybox

lrwxrwxrwx    1 root     root            14 Sep  8  2010 loadkmap -> ../bin/busy
box
lrwxrwxrwx    1 root     root            14 Sep  8  2010 logread -> ../bin/busyb
ox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 losetup -> ../bin/busyb
ox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 lsmod -> ../bin/busybox

lrwxrwxrwx    1 root     root            14 Sep  8  2010 makedevs -> ../bin/busy
box
lrwxrwxrwx    1 root     root            14 Sep  8  2010 man -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 mdev -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 mkdosfs -> ../bin/busyb
ox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 mke2fs -> ../bin/busybo
x
lrwxrwxrwx    1 root     root            14 Sep  8  2010 mkfs.ext2 -> ../bin/bus
ybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 mkfs.minix -> ../bin/bu
sybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 mkfs.vfat -> ../bin/bus
ybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 mkswap -> ../bin/busybo
x
lrwxrwxrwx    1 root     root            14 Sep  8  2010 modprobe -> ../bin/busy
box
lrwxrwxrwx    1 root     root            14 Sep  8  2010 nameif -> ../bin/busybo
x
-rwxrwxrwx    1 root     root           787 Sep  9  2010 net_set
-rw-rw-rw-    1 root     root           790 Sep  9  2010 net_set~
lrwxrwxrwx    1 root     root            14 Sep  8  2010 pivot_root -> ../bin/bu
sybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 poweroff -> ../bin/busy
box
lrwxrwxrwx    1 root     root            14 Sep  8  2010 raidautorun -> ../bin/b
usybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 reboot -> ../bin/busybo
x
lrwxrwxrwx    1 root     root            14 Sep  8  2010 rmmod -> ../bin/busybox

lrwxrwxrwx    1 root     root            14 Sep  8  2010 route -> ../bin/busybox

lrwxrwxrwx    1 root     root            14 Sep  8  2010 runlevel -> ../bin/busy
box
-rwxr-xr-x    1 root     root         11286 Sep  8  2010 serial_test
lrwxrwxrwx    1 root     root            14 Sep  8  2010 setconsole -> ../bin/bu
sybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 slattach -> ../bin/busy
box
lrwxrwxrwx    1 root     root            14 Sep  8  2010 start-stop-daemon -> ..
/bin/busybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 sulogin -> ../bin/busyb
ox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 swapoff -> ../bin/busyb
ox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 swapon -> ../bin/busybo
x
lrwxrwxrwx    1 root     root            14 Sep  8  2010 switch_root -> ../bin/b
usybox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 sysctl -> ../bin/busybo
x
lrwxrwxrwx    1 root     root            14 Sep  8  2010 syslogd -> ../bin/busyb
ox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 tunctl -> ../bin/busybo
x
lrwxrwxrwx    1 root     root            14 Sep  8  2010 tune2fs -> ../bin/busyb
ox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 udhcpc -> ../bin/busybo
x
lrwxrwxrwx    1 root     root            14 Sep  8  2010 vconfig -> ../bin/busyb
ox
lrwxrwxrwx    1 root     root            14 Sep  8  2010 watchdog -> ../bin/busy
box
lrwxrwxrwx    1 root     root            14 Sep  8  2010 zcip -> ../bin/busybox
这写文件是不是就是可以直接执行的命令?????????????
天嵌_support1 发表于 2010-10-12 15:16:25 | 显示全部楼层
1# wangpeihui123

文件系统是自己弄的么?
天嵌_support1 发表于 2010-10-12 15:17:28 | 显示全部楼层
2# wangpeihui123


busybox 提供了所有工具命令,这是正常的
 楼主| wangpeihui123 发表于 2010-10-13 10:44:13 | 显示全部楼层
文件系统是自己做的,,,但是backlight这个命令怎么不能执行
天嵌_support1 发表于 2010-10-13 11:18:53 | 显示全部楼层
5# wangpeihui123


你的文件系统是那什么编译器弄的呢?
有可能是编译起版本引起无法识别
ydh1988 发表于 2010-10-20 10:55:25 | 显示全部楼层
这个问题我也遇到,现在已经解决。是这样的:
在busybox 的配置菜单中有这样一个选项:
Build Options->
Build BusyBox as a static binary (no shared libs)
如果选择 Build BusyBox as a static binary (no shared libs) 方式进行编译时,所需的库已经与程序静态地链接在一起,这些程序不需要额外的库就可以单独运行,但是自己编写的程序在文件系统上运行必须采用静态编译,否则会报诸如:bin/sh: backlight :not found的错误。

解决办法就是  把backlight的Makefile 文件
$(CROSS)gcc    -o backlight backlight.c   这一句 添加一个static 参数,如下:
$(CROSS)gcc  -static  -o backlight backlight.c
不言DXH 发表于 2011-11-3 17:44:26 | 显示全部楼层
个人觉得应该是编译 backlight的版本与busybox、kernel用的编译器版本不一样。
不言DXH 发表于 2011-11-3 18:02:57 | 显示全部楼层
你用自己的编译器从新编译backlight.c,然后在拷贝到sbin/下面
亚瑟王 发表于 2011-11-14 19:01:51 | 显示全部楼层
很可能压根都没有拷贝backlight程序到文件系统中。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-7-5 05:38 , Processed in 1.031250 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表