RT5350-Shell指令相关操作
1.
mount -o rw,nolock 10.10.10.102:/root/sharednfs /mnt
ifconfig br0 192.168.1.57
find ./ -name autoconf.h //查找当前目录下的autoconf.h文件
2.
任务:查找进程
使用pgrep命令。pgrep能查找当前正在运行的进程并列出符合条件的进程ID。例如显示firefox的进程ID:
$ pgrep firefox
下面命令将显示进程名为sshd、所有者为root的进程。
$ pgrep -u root sshd
3.
PC:10.10.10.234
VM:10.10.10.102
RT:10.10.10.57
mount -o rw,nolock 10.10.10.102:/root/sharednfs /mnt
./product 10.10.10.234 8080 10.10.1057 8000
4. $:cd /work/system/linux-2.6.22.6/
$:grep "request_irq" * -R 查找当前目录下的所有文件目录,-R标示递归查找子目录,内核目录下包含"reques_irq"字样的文件
$:cd /work/system/linux-2.6.22.6/
$:grep "request_irq" kernel -R 查找kernel子目录下包含"reques_irq"字样的文件
$:find -name "*fb*" 先cd打开,查找包含fb字样的文件
$:find drivers/net -name "*fb*"
5. 后台转前台关闭
ctrl+z 暂停 同时屏幕上会出现一个数字
jobs 查询暂停的进程
fg %x x为jobs【】中的内容 将进城放到前台
bg%x x为出现的数字 将进城放到后台 试用于你忘了将&加入的情况
6. 库连接的建立
ps:特别注意
cat /etc/ld.so.conf
gedit /etc/ld.so.conf-->添加路径/usr/local/lib
ldconfig(重新加载路径)
a. cd /usr/local/lib
b. ls
erlang liblzmadec.la liblzmadec.so.0 libpython2.7.a python2.7
liblzmadec.a liblzmadec.so liblzmadec.so.0.0.0 pkgconfig yaws
c. ls -l(查看库连接)
drwxr-xr-x 8 root root 4096 2013-01-09 16:51 erlang
-rw-r--r-- 1 root root 41096 2013-01-05 10:52 liblzmadec.a
-rwxr-xr-x 1 root root 813 2013-01-05 10:52 liblzmadec.la
lrwxrwxrwx 1 root root 19 2013-01-05 10:52 liblzmadec.so -> liblzmadec.so.0.0.0
lrwxrwxrwx 1 root root 19 2013-01-05 10:52 liblzmadec.so.0 -> liblzmadec.so.0.0.0
-rwxr-xr-x 1 root root 36223 2013-01-05 10:52 liblzmadec.so.0.0.0
-r-xr-xr-x 1 root root 6283744 2013-02-28 16:13 libpython2.7.a
drwxr-xr-x 2 root root 4096 2013-02-28 16:14 pkgconfig
drwxr-xr-x 27 root root 20480 2013-02-28 16:14 python2.7
drwxr-xr-x 6 root root 4096 2013-01-09 17:04 yaws
d. ln -s /root/workspace/upgrade2014-7-9/upgrade/libupgrade.so libupgrade.so
e. ls -l(libupgrade.so连接成功)
drwxr-xr-x 8 root root 4096 2013-01-09 16:51 erlang
-rw-r--r-- 1 root root 41096 2013-01-05 10:52 liblzmadec.a
-rwxr-xr-x 1 root root 813 2013-01-05 10:52 liblzmadec.la
lrwxrwxrwx 1 root root 19 2013-01-05 10:52 liblzmadec.so -> liblzmadec.so.0.0.0
lrwxrwxrwx 1 root root 19 2013-01-05 10:52 liblzmadec.so.0 -> liblzmadec.so.0.0.0
-rwxr-xr-x 1 root root 36223 2013-01-05 10:52 liblzmadec.so.0.0.0
-r-xr-xr-x 1 root root 6283744 2013-02-28 16:13 libpython2.7.a
lrwxrwxrwx 1 root root 53 2014-07-10 11:10 libupgrade.so -> /root/workspace/upgrade2014-7-9/upgrade/libupgrade.so
drwxr-xr-x 2 root root 4096 2013-02-28 16:14 pkgconfig
drwxr-xr-x 27 root root 20480 2013-02-28 16:14 python2.7
drwxr-xr-x 6 root root 4096 2013-01-09 17:04 yaws
7. /root/workspace/upgrade2014-7-9/upgrade(编译徐龙杰的工程)
x86:make clean
make
mip:make
make CROSS=mipsel-linux-
备注:需要再工程中添加一个makefile文件,内容如下:
all:
@cd ./upgrade; make all
clean:
@cd ./upgrade; make clean
mipsel:
@cd ./upgrade; make CROSS=mipsel-linux- all
备注1:或者在Eclipse中 C/C++Bulid->behavior->all/mipsel
编译即可all-x86 mipsel-mipsel