# nanddump -b -o -f ddd -l 2097152 /dev/mtd3
# nandwrite /dev/mtd3 ddd 0 (I have not test it yet)
Monday, December 15, 2008
nanddump
Here is the command to dump linux kernel, suppose "ddd" is the image name, "2097152" is the digit number of 0x200000 in hex, may not be exactly the same of the actual length, but it works.
Friday, November 21, 2008
Knuth
I was shocked that Knuth was diagnosed with prostate cancel. It is not a news, but I just got know today from this interview.
I like the words "If I should unexpectedly die tomorrow, I’ll have no reason to complain, because my life has been incredibly blessed. ", very inspiring.
Andrew: In late 2006, you were diagnosed with prostate cancer. How is your health today?
Donald: Naturally, the cancer will be a serious concern. I have superb doctors. At the moment I feel as healthy as ever, modulo being 70 years old. Words flow freely as I write TAOCP and as I write the literate programs that precede drafts of TAOCP. I wake up in the morning with ideas that please me, and some of those ideas actually please me also later in the day when I’ve entered them into my computer.
On the other hand, I willingly put myself in God’s hands with respect to how much more I’ll be able to do before cancer or heart disease or senility or whatever strikes. If I should unexpectedly die tomorrow, I’ll have no reason to complain, because my life has been incredibly blessed. Conversely, as long as I’m able to write about computer science, I intend to do my best to organize and expound upon the tens of thousands of technical papers that I’ve collected and made notes on since 1962.
I like the words "If I should unexpectedly die tomorrow, I’ll have no reason to complain, because my life has been incredibly blessed. ", very inspiring.
flash jffs2
Use flash on a arm-linux board always requires jffs2.
Here is the command that do flash erase and copy rootfs to mtdblock4.
Here is the command that do flash erase and copy rootfs to mtdblock4.
# flash_eraseall -j /dev/mtd4
# dd if=rootfs.jffs2 of=/dev/mtd4 bs=4096
# mount -t jffs2 /dev/mtdblock4 /mnt/jffs2
Thursday, November 6, 2008
coding standard (GNU)
I feel I am quite like the coding standard with GNU by reading GTick.
1. variables and variable types are small characters. (add "_t" for types)
2. function names are small characters, and written in this way: (in function name: words are connected by "_", this is my favorite way)
3. comments in this layout.
4. CONSTANTS and MACROES are large characters.
1. variables and variable types are small characters. (add "_t" for types)
dsp_t* dsp;
2. function names are small characters, and written in this way: (in function name: words are connected by "_", this is my favorite way)
dsp_t* dsp_new(comm_t* comm);
3. comments in this layout.
/* headers*/
#include < stdio.h>
#include < stdlib.h>
/*
* brief.
*
* input: from: data source of input
* from_size: the number of frames in [from]
* output: to: the pointer to the allocated data.
*
* NOTE: here is the note. [to] should be free by the caller.
*/
static int foo(short* from, int from_size, unsigned char** to);
4. CONSTANTS and MACROES are large characters.
Wednesday, November 5, 2008
no writing permission on /tmp
I found myself has no writing permission on /tmp with FC5. It caused many troubles, firefox would not launch, because it creates temporary files when it starts... To solve it is quite simple:
$ cd /
$ sudo chmod 777 tmp
Friday, October 24, 2008
remove files in different directories
I used to know how to find files in different directories,
find . -name '*.raw' will list all the raw files, but how to delete them?
Here is the result:
Another usage: I want remove GNU assembly code which is generated by ADS and all the other object files.
or using "-ok" with control by the user (type 'y' or 'n' for each file).
find . -name '*.raw' will list all the raw files, but how to delete them?
Here is the result:
[root@QSLENG13_FC5 xxx]# find . -name '*.raw' -exec ls {} \;
./SP-MIDI/output_midi.raw
./SMAF_MA-5/output_midi.raw
./SMAF_MA-3/output_midi.raw
./SMAF_MA-2/output_midi.raw
./MXMF/output_midi.raw
./MIDI_RIFF_Format_1/output_midi.raw
./MIDI_RIFF_Format_0/output_midi.raw
./MIDI_Format_1/output_midi.raw
./MIDI_Format_0/output_midi.raw
./KAR/output_midi.raw
./JTS/output_midi.raw
./iMelody/output_midi.raw
[root@QSLENG13_FC5 xxx]# find . -name '*.raw' -exec rm {} \;
[root@QSLENG13_FC5 xxx]# find . -name '*.raw' -exec ls {} \;
Another usage: I want remove GNU assembly code which is generated by ADS and all the other object files.
# find . \( -name '*.o.s' -o -name '*.o' \) -exec rm {} \;
or using "-ok" with control by the user (type 'y' or 'n' for each file).
[root@QSLENG13_FC5 linux]# find . \( -name '*.a' -o -name '*.so' \) -ok rm {} \;
< rm ... ./libmqcore32.a > ? n
< rm ... ./libmqcore32.so > ? n
< rm ... ./libq3di32.so > ? n
< rm ... ./libq3di32.a > ? n
Thursday, October 23, 2008
use of scp
My memory is easy to forget, usually I am using tftp and nfs to share files, but I can not do it through ssh. When one door is close, there is another door open, I can use 'scp' from my Linux PC to transfer files.
Subscribe to:
Posts (Atom)