现在的位置: 首页 > 综合 > 正文

linux操作的一些小技巧

2013年12月03日 ⁄ 综合 ⁄ 共 923字 ⁄ 字号 评论关闭

1 将运行的程序改为后台操作。在文件后空格加&

例如:root@hao-desktop:/friendlyARM/u-boot-mini6410# gedit Makefile &

      [1] 7008

2 在linux终端上显示windows的共享文件夹(适用fedora和Ubuntu,其他没试过

#cd /root/.gvfs/192.168.1.101\ 上的\ share_linux/

路径为/root/.gvfs/192.168.1.101 上的 share_linux,运用TAB键操作是个好办法。

3 The specified system/compiler is not supported

在root目录下#gedit .bashrc将
QMAKESPEC注释掉,然后依次运行:

echo $QMAKESPEC

export QMAKESPEC=

echo $QMAKESPEC

将QMAKESPEC置空即可。

4 LINUX模块编译 bounds.h文件缺少问题 

做linux模块编译时 提示如下错误:
include/linux/mmzone.h:18:26: 错误:linux/bounds.h:没有那个文件或目录
include/linux/mmzone.h:290: 错误:‘MAX_NR_ZONES’ 未声明 (不在函数内)
出现这种错误的原因主要是由于linux内核做过 make clean 命令,把bounds.h 文件清除掉了(可以查看makefile 中的写法),因而需要重新生成这个头文件,使用命令 make prepare

执行结果如下:

CHK include/linux/version.h
CHK include/linux/utsrelease.h
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
CC kernel/bounds.s
GEN include/linux/bounds.h
CC arch/x86/kernel/asm-offsets.s
GEN include/asm/asm-offsets.h
CALL scripts/checksyscalls.sh

可以看到生成了bounds.h头文件。

再次编译顺利通过!

[待续......]

抱歉!评论已关闭.