2014年1月8日

[quote] debugging mdev events

摘要: 1st step:# cat /usr/iw/printenv-hotplug#! /bin/shexec /bin/printenv > /tmp/hotplug-env#chmod 755 /usr/iw/printenv-hotplug#echo "cat /proc/sys/kernel/hotplug"#cat /proc/sys/kernel/hotplug#echo "/usr/iw/printenv-hotplug" > /proc/sys/kernel/hotplug2nd step:# cat /proc/sys/kern 阅读全文

posted @ 2014-01-08 09:49 Shawn X.Y. Bai 阅读(547) 评论(0) 推荐(0)

2014年1月7日

[quote] linux wireless

摘要: wireless extensionshttp://wireless.kernel.org/en/developers/Documentation/Wireless-Extensionshttp://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Linux.Wireless.Extensions.htmlhttp://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Linux.Wireless.html 阅读全文

posted @ 2014-01-07 15:10 Shawn X.Y. Bai 阅读(180) 评论(0) 推荐(0)

[quote] How to do arithmetic operation in makefile?

摘要: fromhttp://stackoverflow.com/questions/6593605/how-to-do-arithmetic-operation-in-makefilejcomeau@intrepid:/tmp$ cat Makefile START=3END=5DIFF_SUB=$(shell echo $(END)-$(START)| bc)test:@echo it took $(DIFF_SUB) secondsjcomeau@intrepid:/tmp$ makeit took 2 secondsIf you're doing these inside the ta 阅读全文

posted @ 2014-01-07 09:16 Shawn X.Y. Bai 阅读(420) 评论(0) 推荐(0)

[quote] How to read Perl command-line arguments.

摘要: fromhttp://alvinalexander.com/perl/perl-command-line-arguments-read-argsHow to read Perl command-line argumentsBy Alvin Alexander. Last updated: Aug 11, 2013Perl FAQ: How do I read command-line arguments in Perl?Note: If you want to handle simple Perl command line arguments, such as filenames and st 阅读全文

posted @ 2014-01-07 09:15 Shawn X.Y. Bai 阅读(327) 评论(0) 推荐(0)

2014年1月3日

Operator precedence rules in C

摘要: Operator precedence rulesOperatorsOrder of evaluationRemarks[] ( ) ->Left to rightArray subscript, function call− + sizeof( ) ! ++ −−& * ~ (cast)Right to leftUnary* / %Left to rightBinary Multiplicative+ -Left to rightBinary Additive>> >=Left to rightRelational operators== !=Left to 阅读全文

posted @ 2014-01-03 20:30 Shawn X.Y. Bai 阅读(250) 评论(0) 推荐(0)

2013年12月26日

system call - close calling path

摘要: close (user-space)-> syscall expcetion syscall ( linux2.6.29.4\arch\mips\kernel\scall32-o32.S) ---------> sys_exit(unsigned int fd) SYSCALL_DEFINE1(close, unsigned int, fd) (linux2.6.29.4\fs\open.c) ---------> int filp_close(struct file *filp, fl_owner_t id) retval = filp_close(filp, files) 阅读全文

posted @ 2013-12-26 18:45 Shawn X.Y. Bai 阅读(272) 评论(0) 推荐(0)

2013年12月20日

[quote] How to hg with english?

摘要: [xbai@cn0571soft01 montage-tech]$ LANG=en_US hg tipchangeset: 6550:3fd86b1549f9tag: tipparent: 6548:24c138637d84parent: 6549:15c997e301dcdate: Fri Dec 20 17:40:46 2013 +0800description:[xbai@cn0571soft01 montage-tech]$ hg tipÐ޸ļ¯: 6550:3fd86b1549f9±êÇ&# 阅读全文

posted @ 2013-12-20 18:23 Shawn X.Y. Bai 阅读(141) 评论(0) 推荐(0)

[quote] How to comment multi-lines in bash shell script.

摘要: Fromhttp://stackoverflow.com/questions/947897/block-comments-in-a-shell-scriptIn bash:#!/bin/bashecho before comment: <<'END'bla blablurflENDecho after commentThe ' and ' around the first END delimiter is important, otherwise things inside the block like for example $(command) 阅读全文

posted @ 2013-12-20 17:37 Shawn X.Y. Bai 阅读(358) 评论(0) 推荐(0)

[quote] How ot calculate date in linux cmd

摘要: Fromhttp://linuxconfig.org/addition-and-subtraction-arithmetics-with-linux-date-commandAddition and subtraction arithmetics with Linux date commandThis article features some simple examples on how to add or subtract a time from a current date. At first we use a native date sytax to do this trick and 阅读全文

posted @ 2013-12-20 15:05 Shawn X.Y. Bai 阅读(394) 评论(0) 推荐(0)

2013年12月18日

[quote]termcap for cross-building gdb

摘要: 1. configure../gdb-7.1/configure --host=mips-linux-gnu --prefix=~/packages/gdb/gdb-output/ --build=x86_64checking for long long support in compiler... yeschecking for long long support in printf... nochecking for long double support in compiler... yeschecking for long double support in printf... noc 阅读全文

posted @ 2013-12-18 10:45 Shawn X.Y. Bai 阅读(1123) 评论(0) 推荐(0)

2013年12月17日

[requote] How to solve - gdbserver readchar: Got EOF

摘要: When running gdbserver on the embedded board, use gdb on host PC to connect with the board, maybe some infos on the board will be displayed as follows.Listening on port 2345Remote debugging from host 192.168.1.1readchar: Got EOFRemote side has terminated connection. GDBserver will reopen the connect 阅读全文

posted @ 2013-12-17 13:17 Shawn X.Y. Bai 阅读(2456) 评论(0) 推荐(0)

2013年12月14日

infos about pstack

摘要: [glib-2.36.4]$ type pstackpstack is hashed (/usr/bin/pstack)[glib-2.36.4]$[glib-2.36.4]$ rpm -q -f /usr/bin/pstackpstack-1.2-7.2.2[glib-2.36.4]$ rpm -iq pstackName : pstack Relocations: (not relocatable)Version : 1.2 Vendor: CentOSRelease : 7.2.2 Build Date: 2007Äê01ÔÂ07È 阅读全文

posted @ 2013-12-14 18:17 Shawn X.Y. Bai 阅读(265) 评论(0) 推荐(0)

2013年12月12日

How to add a option in right-key short-cut.

摘要: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\notepad++HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\notepad++\Command"D:\software\npp.6.1.1.bin\unicode\notepad++.exe" "%1" 阅读全文

posted @ 2013-12-12 10:38 Shawn X.Y. Bai 阅读(161) 评论(0) 推荐(0)

2013年12月5日

[quote]HowTo Format Date For Display or Use In a Shell Script

摘要: From http://www.cyberciti.biz/faq/linux-unix-formatting-dates-for-display/SyntaxThe syntax is date +FORMATOR date +"%FORMAT"OR date +"%FORMAT%FORMAT"OR date +"%FORMAT-%FORMAT"Task: Display date in mm-dd-yy formatOpen a terminal and type the following date command: $ dat 阅读全文

posted @ 2013-12-05 21:08 Shawn X.Y. Bai 阅读(299) 评论(0) 推荐(0)

[quote] standard Input and Output Redirection

摘要: From http://sc.tamu.edu/help/general/unix/redirection.htmlStandard Input and Output RedirectionThe shell and many UNIX commands take their input from standard input (stdin), write output to standard output (stdout), and write error output to standard error (stderr). By default, standard input is con 阅读全文

posted @ 2013-12-05 21:05 Shawn X.Y. Bai 阅读(367) 评论(0) 推荐(0)

2013年12月2日

[quote] Re: [ECOS] printf and diag_printf go to nowhere 2

摘要: Skip to site navigation (Press enter)Re: [ECOS] printf and diag_printf go to nowhereSergei Gavrikov Sun, 12 Apr 2009 08:42:27 -0700On Sun, Apr 12, 2009 at 03:14:38PM +0200, Robert Brusa wrote:> On Sat, 11 Apr 2009 18:44:34 +0200, Sergei Gavrikov > wrote:>>> On Sat, Apr 11, 2009 at 06: 阅读全文

posted @ 2013-12-02 21:20 Shawn X.Y. Bai 阅读(607) 评论(0) 推荐(0)

[quote] Re: [ECOS] printf and diag_printf go to nowhere

摘要: Skip to site navigation (Press enter)Re: [ECOS] printf and diag_printf go to nowhereRobert Brusa Sun, 12 Apr 2009 06:15:18 -0700On Sat, 11 Apr 2009 18:44:34 +0200, Sergei Gavrikov wrote:On Sat, Apr 11, 2009 at 06:15:50PM +0300, Sergei Gavrikov wrote:On Sat, Apr 11, 2009 at 12:42:50PM +0200, Robert . 阅读全文

posted @ 2013-12-02 21:13 Shawn X.Y. Bai 阅读(542) 评论(0) 推荐(0)

2013年11月30日

[quote] DMA engine in Linux Kernel

摘要: It's where the original changes were discussedhttps://lkml.org/lkml/2011/5/24/227It's where the specific questions were answered about tx_submit() and device_issue_pending()http://www.gossamer-threads.com/lists/linux/kernel/1408064?search_string=tx_submit;#1408064they were:tx_submit is not s 阅读全文

posted @ 2013-11-30 15:40 Shawn X.Y. Bai 阅读(423) 评论(0) 推荐(0)

2013年10月17日

[linux]How to set PATH in shell script, and keep it avaiable even after it exits

摘要: Now and then, maybe you want to use bash shell script to do things.There may be a while you want to set PATH, and even after exiting the shell script, you still want the PATH keep that value.Here, http://www.linuxquestions.org/questions/linux-newbie-8/write-shell-script-to-change-path-4175417178/and 阅读全文

posted @ 2013-10-17 15:14 Shawn X.Y. Bai 阅读(318) 评论(0) 推荐(0)

2013年8月22日

use AWK to extract some lines according to some patterns in file

摘要: A file named Demo.txt, is like this:@@@0x5100002c is 0 @@@0x51000018 is 1011110x5100001c is e000e0x51000020 is 1211110x51000024 is f000f0x51000024 is f000f0x51000028 is 00x51000030=0x000006060x51000034=0x004452210x51000038=0x02003faadly90_para_lock=0xf000fmax_begin is 0max_end is 23max_one is 24dqs_ 阅读全文

posted @ 2013-08-22 12:38 Shawn X.Y. Bai 阅读(324) 评论(2) 推荐(0)

2013年8月15日

[Reprinted] Howto Use Linux Watchdog

摘要: linux, watchdog 阅读全文

posted @ 2013-08-15 13:20 Shawn X.Y. Bai 阅读(389) 评论(0) 推荐(0)

2013年3月5日

[Linux cmd line] How to convert a binary file into output in C include file style.

摘要: Maybe, you are debugging a sub-function, which is in the form of an independent image file.But, it needs to be embedded in the product image file in charge of that target function.There are many different ways to embed that image.1. to write a program of your own, read file, transform the buffer, cr 阅读全文

posted @ 2013-03-05 15:09 Shawn X.Y. Bai 阅读(337) 评论(0) 推荐(0)

2012年12月25日

How To Use Proxy Server To Access Internet at Shell Prompt With http_proxy Variable. [reprint]

摘要: http://www.cyberciti.biz/faq/linux-unix-set-proxy-environment-variable/Set http_proxy shell variableType the following command to set proxy server:$ export http_proxy=http://server-ip:port/ $ export http_proxy=http://127.0.0.1:3128/ $ export http_proxy=http://proxy-server.mycorp.com:3128/How do I .. 阅读全文

posted @ 2012-12-25 11:29 Shawn X.Y. Bai 阅读(242) 评论(0) 推荐(0)

Under Fefora, how to solve hanging on Loaded plugins: refresh-packagekit while "yum -y install liblzo2-dev"

摘要: [root@fedora mtd-utils]# yum -y install liblzo2-devLoaded plugins: refresh-packagekit System Tools->KPackageKit->Settings->"Check for updates" : Never.. 阅读全文

posted @ 2012-12-25 11:05 Shawn X.Y. Bai 阅读(464) 评论(3) 推荐(0)

2012年9月13日

How to use variables in sed Unix utility

摘要: how to use variables in Unix sed utility. 阅读全文

posted @ 2012-09-13 10:34 Shawn X.Y. Bai 阅读(239) 评论(1) 推荐(0)

2012年8月11日

[U-Boot] How make xxx_config works?

摘要: A talk about how "make xxx_config" runs in U-Boot. It must be very interesting, isn't it? Join me. 阅读全文

posted @ 2012-08-11 16:37 Shawn X.Y. Bai 阅读(839) 评论(0) 推荐(1)

Perl script to check the length of a file

摘要: A perl script file to check the length of a file, whether or not its size has been beyond the range specified. 阅读全文

posted @ 2012-08-11 16:11 Shawn X.Y. Bai 阅读(291) 评论(0) 推荐(0)

Command for converting between ASCII text files and binary files

摘要: file format convertion between ASCII text files and binary files 阅读全文

posted @ 2012-08-11 15:47 Shawn X.Y. Bai 阅读(500) 评论(0) 推荐(0)

导航