随笔分类 - Linux
摘要:1. 安装必须软件sudo apt-get install -y xinetd tftp-hpa2. 修改配置文件vi /etc/default/tftpd-hpa# /etc/default/tftpd-hpaTFTP_USERNAME="tftp"TFTP_DIRECTORY="/media/Study/tftpserver"TFTP_ADDRESS="0.0.0.0:69"#TFTP_OPTIONS="--secure"TFTP_OPTIONS="-l -c -s"3. 打开tftpsud
阅读全文
摘要:/* * ===================================================================================== * * Filename: multi.c * * Description: * * Version: 1.0 * Created: Wednesday, July 17, 2013 02:26:11 HKT * Revision: none * Compiler: gcc * * Author: linkscue...
阅读全文
摘要:#include #include #include int string2int(char *arg){ char c; int i,j,tmp=0,tmpc=0; for (i = 0; i < strlen(arg); i++) { c=(*(arg+i)); tmp=tmp*10+(int)c-48; } return tmp;}使用语言,C/C++;
阅读全文
摘要:1. 查询版本aptitude show [软件]2. 查询路径dpkg -L [软件]whereis [软件]which [软件]
阅读全文
摘要:scue@Link:/home/work/ltib$ ./ltib --helpThis script is used to manage the building of BSPs with common targetroot filesystems.Normally the system default are what you need. However, if you need to finetune some of the setup parameters, edit the file .ltibrc in this directory,alternatively you may us
阅读全文
摘要:报错内容:scue@Link:/home/work/ltib$ ./ltib Processing platform: Phytec 3250 board with the NXP LPC32XX SoC=================================================================using config/platform/phy3250/.config/opt/ltib/usr/bin/rpm: error while loading shared libraries: libbz2.so.1: cannot open shared obj
阅读全文
摘要:1. 首先应当使CM代码成功编译过一次;cd /path/to/cm. build/envsetuplunch full-engmka2. 配置eclipse开发的基本环境cd /path/to/cmcp development/ide/eclipse/.classpath .chmod u+w .classpath打开eclipse:window->preferences->java->Code style->Formatter中导入development/ide/eclipse/android-formatting.xml ,配置eclipse编辑器的代码风格win
阅读全文
摘要:切换至eclipse目录:viplugins/org.eclipse.platform_4.2.*/css/e4_default_gtk.css找到.MPartStack,替换成如下代码:.MPartStack { font-size: 9; font-family: Liberation Sa...
阅读全文
摘要:方法1:使用脚本#!/bin/bash - #===============================================================================## FILE: gvi# # USAGE: ./gvi # # DESCRIPTION: # # OPTIONS: ---# REQUIREMENTS: ---# BUGS: ---# NOTES: ---# AUTHOR: linkscue (scue), linkscue@gmail.co...
阅读全文
摘要:1. install chinese fonts sudo apt-get install ttf-wqy-microhei ttf-wqy-zenhei2. set language vi /etc/defaults/locale3. install ia32-libs dpkg --add-architecture i386 apt-get update apt-get install ia32-libs4. sudo E: is not in the sudoers file. This incident will be reported. ...
阅读全文
摘要:scue@Link:~$ cat ~/bin/ipclientstart#!/bin/bash - #===============================================================================## FILE: ipclientstart# # USAGE: ./ipclientstart # # DESCRIPTION: # # OPTIONS: ---# REQUIREMENTS: ---# BUGS: ---# NOTES: ---# ...
阅读全文
摘要:1. for ext2/ext3/ext4e2label device [newlabel]2. for dos(vfat, fat16, fat32, etc.)dosfslabel device [label]3. for swapswaplabel -L [label] dev4. for ntfsntfslabel [options] device [label]
阅读全文
摘要:1. 安装Qt4 sudo apt-get install libqt4-dev libqt4-dbg libqt4-gui libqt4-sql qt4-dev-tools qt4-doc qt4-designer qt4-qtconfig2. 安装QScintilla2下载地址:http://www.riverbankcomputing.co.uk/software/qscintilla/downloadtar zxvf ~/Downloads/QScintilla-gpl-2.7.1.tar.gz -C .cd QScintilla-gpl-2.7.1/Qt4Qt5/qmake qsci
阅读全文
摘要:#!/bin/bash - #===============================================================================## FILE: hosts_update.sh# # USAGE: ./hosts_update.sh # # DESCRIPTION: # # OPTIONS: ---# REQUIREMENTS: ---# BUGS: ---# NOTES: ---# AUTHOR: linkscue (scue), l...
阅读全文
摘要:# 下载dnw与驱动文件cd ~mkdir -p tmp 2>/dev/nullcd tmp/git clone git://github.com/Qunero/dnw4linux.git# 编译驱动文件与dnwunset ARCHunset SUBARCHunset CROSS_COMPILEcd dnw4linux/make install# 安装dnw文件mkdir -p ~/bin 2>/dev/nullcp dnw ~/bin/dnwchmod 755 ~/bin/dnwsudo mkdir -p /opt/dnw_linux/secbulkcp secbulk.ko /
阅读全文
摘要:/* * ===================================================================================== * * Filename: msq.c * * Description: * * Version: 1.0 * Created: 2013年05月03日 00时20分50秒 * Revision: none * Compiler: gcc * * Author: linkscue (scue), * Orga...
阅读全文
摘要:make configure -e CC=${CROSS_COMPILE}gcc LDFLAGS+=-static./configure --prefix=/data/local/usr/share --host=arm-none-linux-gnueabi ac_cv_c_c99_format=yes ac_cv_fread_reads_directories=no ac_cv_snprintf_returns_bogus=no CC=${CROSS_COMPILE}gcc LDFLAGS=-staticmake -e CC=${CROSS_COMPILE}gcc LDFLAGS+=-s..
阅读全文
摘要:#!/bin/bash - #===============================================================================## FILE: apk_rename.sh# # USAGE: ./apk_rename.sh # # DESCRIPTION: # # OPTIONS: ---# REQUIREMENTS: ---# BUGS: ---# NOTES: ---# AUTHOR: linkscue (scue), links...
阅读全文
摘要:fseek( fd, 8192 , SEEK_SET); /* 跳转至数据段 */ //开始解压数据; int size,n; char image_name[32]=""; for( i=0; i < imagecount ; i++ ){ size = images[i].imagesize; /* 获取镜像的大小 */ unsigned char buffer[size]; /* 创建缓冲区 */ strncpy(image_name,i...
阅读全文
摘要:struct tm *ptr; time_t lt; unsigned int times=<秒数时间变量>; char str[80]; lt=times; ptr=localtime(<); strftime(str,100,"%F %X",ptr);摘抄来的,来源忘记了。。。
阅读全文
浙公网安备 33010602011771号