Linux
rag_doll
这个作者很懒,什么都没留下…
展开
-
Ubuntu 14.04 安装TFTP server
1. sudo apt-get install tftpd tftp openbsd-inetd2. sudo vi /etc/inetd.conf#:BOOT: TFTP service is provided primarily for booting. Most sites# run this only on machines acting as "boot ser转载 2015-11-03 16:01:33 · 1389 阅读 · 0 评论 -
a=a++?
有这样一段代码:int a = 2;a = a++;printf("%d\n", a);在Visual Studio2012里,输出的结果是3。而用gcc编译得到的结果是2。 为什么?出现2的原因是,gcc在做右边操作数为a++的赋值操作时,会将a的原值和++后的值放在两个寄存器内,然后按先给a新值、后给左值以原值的顺序来执行代码。可以参照b=a++的编译结果: movl $2,原创 2015-11-03 20:37:50 · 420 阅读 · 0 评论 -
ubuntu14.04使用root账户登录
14.04默认是没有root用户的。 1、先创建root账户密码sudo passwd root 2、gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf 加一句greeter-show-manual-login=true,保存关闭 3、重启原创 2015-11-05 19:43:46 · 1303 阅读 · 0 评论 -
自动登录root时Error found when loading /root/.profile stdin: is not a tty
在上文基础上增加autologin-user=root,企图自动登录root账户,结果报错Error found when loading /root/.profile stdin: is not a tty 更改/root/.profile文件 把mesg n 进行注释,增加一行 tty -s && mesg n 然后reboot原创 2015-11-05 19:50:52 · 8157 阅读 · 0 评论 -
编译busybox1.24.1
1、纯净的Ubuntu1404里面是没有curse5库的,必须先安装 apt-get install libncurses5-dev 2、make menuconfig Busybox Settings->Build Options-> Cross Compiler prefix填写编译器名称arm-linux-gnueabi- Installation Options->prefix 选.原创 2015-11-05 20:15:42 · 1788 阅读 · 0 评论 -
警告: 函数声明不是一个原型 [-Wstrict-prototypes]
static int hello_init(){ printk(KERN_EMERG "hello world!\n"); return 0;}内核模块里面这样写,就会报一个警告。虽然是警告,改掉也是好的。 这时要在参数里面加一个void。原创 2015-11-07 12:10:34 · 7940 阅读 · 0 评论 -
arm-linux3.0自定义系统调用
编译环境硬件:讯为4412核心板, OS:讯为linux3.0.15 编译环境:ubuntu1404 编译器:讯为提供的arm-2009q3-gcc交叉编译。 参考http://blog.chinaunix.net/uid-24782829-id-3211009.html一文。实验目的增加加减乘除等系统调用,并测试系统调用和用户调用的性能差异。实验步骤1、添加系统调用函数 在/kerne原创 2015-11-24 19:00:35 · 926 阅读 · 0 评论