![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Linux 技术相关
stevenliyong
关注
C/C /JAVA
UML/RUP.
Linux.
Android.
Network/Bluetooth/WiFi.
展开
-
windows 环境下 scons 交叉编译 (RVCT4.1)
1. Install python2.7 和 scons将环境变量 c:/Python2.7 和 c:/python2.7/scripts 加到 PATH2. sconstruct 文件 显示继承 所有windows 环境变量Or you may expl原创 2011-09-20 10:06:27 · 3991 阅读 · 2 评论 -
Linux kmalloc
<br /><br />http://www.fiveanddime.net/man-pages/kmalloc.9.html<br /> <br />GFP_ATOMICtries to allocate the memory immediately. The task will not sleep if the memory isn't available. There is a number of reserved pages for GFP_ATOMIC. For allocating memory转载 2010-11-08 09:54:00 · 616 阅读 · 0 评论 -
Netconsole to capture the log
<br />1. Netconsole Server Machine <br />#export TARGET_IP_ADDR=XX:XX:XX:XX<br />#export TARGET_MAC_ADDR=XX:XX:XX:XX<br />#modprobe netconsole netconsole=@/eth0,9999@$IP_ADDR/$MAC_ADDR<br />#nc -l -p 6777 -c "hcidump -i hci0 -X" &<br />#nc -l -p 6888 -c "h原创 2010-12-28 14:52:00 · 687 阅读 · 0 评论 -
Linux Kernel Makefiles
http://www.ravnborg.org/kbuild/makefiles.html转载 2010-11-04 16:19:00 · 393 阅读 · 0 评论 -
Upstream src code to Android
For example:#cd $(YOUR_ANDROID_DIR)/system/bluetooth#repo status .#repo start mybranch .#repo branches .#git branch#git log * Edit your files.#git commit -a#repo upload .#repo abandon mybranch原创 2010-12-02 14:06:00 · 638 阅读 · 0 评论 -
can't boot the kernel , if the server side is tftpd32.exe
<br />The reason is that, the tftpd32.exe does not enable PXE(Preboot Execution Environment) as default,<br />So we need to enable PXE in the setting of tftpd32 first.<br /> <br /> <br />原创 2010-11-30 09:59:00 · 677 阅读 · 0 评论 -
Including driver firmware on Linux kernel image
<br /><br /> <br />http://acassis.wordpress.com/2010/03/17/including-driver-firmware-on-linux-kernel-image/<br /> <br />Driver’s binary firmware is a dedicated issue to Linux. In fact even open source drivers usually load its firmware to internal chip and转载 2010-11-29 13:56:00 · 1153 阅读 · 0 评论 -
About QEMU
<br /> <br />QEMU is a generic and open source machine emulator and virtualizer.<br /> <br />http://www.qemu.org原创 2010-06-04 17:39:00 · 526 阅读 · 0 评论 -
编写一个最有代表意义的qt程序
假设您一切都安装好了.现在我们打开 QT Designer 吧. 打开後,选择 New -> Dialog这时侯,您的 QT Designer 中就会出现一个 From1 来. 更改右下角那个窗口里的 caption ,原内容 "Form1"改为 "一个小计算", name , 原内容 "Form1"改为 "form_main"现在我们点击一下上面转载 2010-05-28 10:30:00 · 467 阅读 · 0 评论 -
du df 命令
#du -sh * 看整个当前目录的详细各个子目录的大小 #df -h 看硬盘上各个分区的使用的大小。原创 2010-01-08 13:00:00 · 480 阅读 · 0 评论 -
Android 下使用wpa_cli 连接 wifi
# cp /media/sd8686.bin /lib/firmware/sd8686.bin# cp /media/sd8686_helper.bin /lib/firmware/sd8686_helper.bin# dpkg -i kernel-smartq5-modules_2.6.24.7-smartq5-050509_all.deb # insmod sd8686.ko原创 2010-03-19 14:26:00 · 8075 阅读 · 0 评论 -
Linux 文件特殊权限 Sticky Bit
http://content.hccfl.edu/pollock/AUnix1/FilePermissions.htm http://en.wikipedia.org/wiki/Sticky_bithttp://www.anqn.com/os/linux/2009-03-01/a09108173.shtml 7.4.3 文件特殊权限:SUID/SGID/Sticky B转载 2010-03-04 17:32:00 · 1061 阅读 · 0 评论 -
Playing with ptrace (GDB Debugger 原理)
About the linux system call : ptrace, wait, wait_pid, WIFSTOPPED , WSTOPSIG and etc 1. Part I http://www.linuxjournal.com/article/6100 2. Part II http://www.linuxjournal.com/articl转载 2009-12-22 10:45:00 · 1211 阅读 · 0 评论 -
UNIX Domain Sockets
socket API原本是为网络通讯设计的,但后来在socket的框架上发展出一种IPC机制,就是UNIX Domain Socket。虽然网络socket也可用于同一台主机的进程间通讯(通过loopback地址127.0.0.1),但是UNIX Domain Socket用于IPC更有效率:不需要经过网络协议栈,不需要打包拆包、计算校验和、维护序号和应答等,只是将应用层数据从一个进程拷贝到另一个转载 2010-02-10 15:09:00 · 7088 阅读 · 0 评论 -
使用既有内核 配置 文件 编译Linux
假定存在 linux kernel 的配置文件 arch/arm/configs/smartq7_android_nfs_defconfig 现在编译内核 #make smartq7_android_nfs_defconfig #make ARCH=arm CROSS_COMPILE=/usr/local/bin/arm-eabi-devel-原创 2010-02-03 20:02:00 · 954 阅读 · 0 评论 -
Boot my smartq7 from nfs filesystem
1. Configure nfs server on host http://blog.csdn.net/stevenliyong/archive/2009/12/01/4914673.aspx 2. Configure dhcp server on host修改 /etc/dhcp3/dhcpd.conf ddns-update-style ad-hoc;defaul原创 2009-12-02 17:44:00 · 574 阅读 · 0 评论 -
How SKBs work
<br /><br />skb - Linux network buffers.<br /> <br />http://vger.kernel.org/~davem/skb.html转载 2010-11-08 09:56:00 · 576 阅读 · 0 评论 -
Preparing Files for TFTP Net Booting
https://help.ubuntu.com/7.04/installation-guide/i386/install-tftp.htmlIf your machine is connected to a local area network, you may be able to boot it over the network from another machine, using TFTP. If you intend to boot the installation system from ano转载 2010-11-08 17:43:00 · 949 阅读 · 0 评论 -
dash 和 bash
1.Bash is the shell, or command language interpreter, that will appear in the GNU operating system. Bash is an sh-compatible shell that in原创 2011-08-18 10:55:49 · 1503 阅读 · 0 评论 -
RTS/CTS协议 (Both wlan and com are using it)
RTS/CTS协议(Request To Send/Clear To Send)即请求发送/允许发送协议,相当于一种握手协议,主要用来解决"隐藏终端"问题。"隐藏终端"(Hidden Stations)是指,基站A向基站B发送信息,基站C未侦测到A也向B发送,故A和C同时将信号发送至B,引起信号冲突,最终导致发送至B的信号都丢失了。"隐藏终端"多发生在大型单元中(一般在室外环境),这将原创 2011-06-22 15:13:00 · 1580 阅读 · 0 评论 -
Wireless Operating Modes
http://linuxwireless.org/en/users/Documentation/modes A wireless interface always operates in one of the following operating modes. The mode sets the main functionality of the wireless link.转载 2011-06-20 10:55:00 · 1082 阅读 · 0 评论 -
Open System authentication
Open System authenticationOpen System authentication is a null authentication algorithm. Any STA requesting Open Systemauthentication may be authenticated if dot11AuthenticationAlgorithm at the转载 2011-06-15 18:08:00 · 1402 阅读 · 0 评论 -
802.11 Authentication and Association
The 802.11 standard provides a method for supplying different levels of access to different nodes in a wireless local area network (WLAN). This is handled through authentication and association. Eac转载 2011-06-15 17:16:00 · 1159 阅读 · 0 评论 -
Detecting Memory Leaks in Kernel
<br /> <br />This doc is from<br />http://psankar.blogspot.com/2010/11/detecting-memory-leaks-in-kernel.html<br /> <br /> <br />A memory leak is a behavior of a program when it consumes memory but never releases it. In user-space, these days, new applicati转载 2011-03-03 15:11:00 · 1976 阅读 · 0 评论 -
Linux Spin lock.
<br /> <br /><br />1. Symmetric MultiMulti-Processing multi processor (core) architecurure<br />It is in include/linux/spinlock_api_smp.h<br /> <br />static inline void __spin_lock(spinlock_t *lock)<br /> <br />{<br />preempt_disable();<br />spin_acquire(原创 2010-11-25 10:14:00 · 834 阅读 · 0 评论 -
There is no ~/.bashrc to setup user $PATH
After add user in Ubuntu, there is not ~/.bashrc under user home for me to setup my own user $PATH.1. man bashWhen bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands原创 2010-11-22 16:32:00 · 560 阅读 · 0 评论 -
内核定时器(2.6.23)
<br />http://blog.chinaunix.net/u2/73528/showart_1131053.html转载 2010-11-11 13:29:00 · 383 阅读 · 0 评论 -
Linux内核中的jiffies
http://blog.chinaunix.net/u/18846/showart_267864.html硬件给内核提供一个系统定时器用以计算和管理时间,内核通过编程预设系统定时器的频率,即节拍率(tick rate),每一个周期称作一个tick(节拍)。Linux内核从2.5版内核开始把频率从100调高到1000(当然带来了很多优点,也有一些缺点). jiffies是内核中的一个全局变量,用来记录自系统启动一来产生的节拍数。譬如,如果计算系统运行了多长时间,可以用 jiffies/tick rate转载 2010-11-11 13:34:00 · 516 阅读 · 0 评论 -
nfs server problem in Linux 2.6.32
<br /> <br />1. <br /><br />#sudo /etc/init.d/nfs-kernel-server restart<br /> * Stopping NFS kernel daemon [ OK ]<br /> * Unexporting directories for NFS kernel daemon... [ OK ]<br /> * Not starti原创 2010-11-09 18:38:00 · 918 阅读 · 0 评论 -
Linux wget 命令
<br />支持http 下载,-c 代表断点续传<br /> <br />#wget -c http://10.21.0.59/Android/smdkc110_froyo/android_kernel_2.6.32_bt3.tar.bz2原创 2010-11-09 15:59:00 · 540 阅读 · 0 评论 -
配置网络
<br />开发环境, eth0 开发板相连, wlan0 公司内网,需要网关上网<br /> <br /># vim /etc/network/interface<br /> <br />auto lo<br />iface lo inet loopback<br /> <br />auto eth0<br />iface eth0 inet static<br />address 192.168.0.10<br />netmask 255.255.255.0<br />gateway原创 2010-11-09 15:54:00 · 457 阅读 · 0 评论 -
uboot中利用TFTP和NFS加载内核镜像和根文件系统
http://blog.chinaunix.net/u3/98913/showart_1978279.html转载 2010-11-09 13:46:00 · 939 阅读 · 0 评论 -
git format-patch origin 生成patch
是用git生成patch文件然后用email的方式提交$git-clone git://repo.or.cz/xylftp.git$ cd xylftp/client$vim TODO.txt$git-add TODO.txt$git-commit -m “Change Client-TODO.txt”$git-format-patch origin这时便在当前目录下生成补丁0001-Update-Client-TODO.txt.patch,然后用 git-send-email原创 2010-11-09 09:37:00 · 2084 阅读 · 0 评论 -
How to install wireless driver on Ubuntu9.10
re-marked from http://wiki.archlinux.org/index.php/Lenovo_ThinkPad_T400https://help.ubuntu.com/community/HardwareSupportComponentsWirelessNetworkCardsRealTek#PCI 1. IndentificationMy la转载 2009-12-01 20:34:00 · 2005 阅读 · 0 评论 -
Install nfs filesystem to Ubuntu 9.10
1.# sudo apt-get install nfs-kernel-server# vim /etc/exportsadd line/tftp/smartq7/ 192.168.0.0/255.255.255.0(rw,no_root_squash,no_all_squash) # sudo /etc/init.d/nfs-kernel-server restart原创 2009-12-01 14:51:00 · 664 阅读 · 0 评论 -
Install sun-java5-jdk to Ubuntu9.10
ReMark from http://www.zooyoo.org/?p=10442 修改source,将9.10的源改成9.04的源。deb http://run.hit.edu.cn/ubuntu/ jaunty main restricted universe multiversedeb-src http://run.hit.edu.cn/ubuntu/ jaunty mai转载 2009-11-30 22:02:00 · 1856 阅读 · 0 评论 -
关于__GNU_SOURCE 这个宏
今天发现一个奇怪的问题,即使#include sys/stat.h在使用 lstat 函数的时候还是会报warning: implicit declaration of function lstat另外同样的问题,即使include 了 sys/time.h还是会报warning: implicit declaration of function nanosleep同样,即使in原创 2009-05-08 11:22:00 · 14555 阅读 · 1 评论 -
pthread_cond_wait() 函数的使用
1. 首先pthread_cond_wait 的定义是这样的 The pthread_cond_wait() and pthread_cond_timedwait() functions are used to block on a condition variable. They are called with mutex locked by the calling thread or原创 2009-07-20 16:14:00 · 5645 阅读 · 0 评论 -
POSIX 线程取消点的 Linux 实现
原文链接:http://blog.solrex.cn/articles/linux-implementation-of-posix-thread-cancellation-points.html摘要:这篇文章主要从一个 Linux 下一个 pthread_cancel 函数引起的多线程死锁小例子出发来说明 Linux 系统对 POSIX 线程取消点的实现方式,以及如何避免因此产生的线程转载 2009-07-20 16:02:00 · 3775 阅读 · 3 评论 -
使用 pthread_testcancel 作为pthread_cancel 时 线程的退出点函数
pthread_testcancel()--Create Cancellation PointSyntax #include void pthread_testcancel(void);Threadsafe: YesSignal Safe: NoThe pthread_testcancel() function creates a ca转载 2009-07-20 15:51:00 · 9347 阅读 · 1 评论