有用的命令

BASE_PATH=/root/coderoad
KERNEL_PATH=$BASE_PATH/linux-2.6.33.1
UBOOT_PATH=$BASE_PATH/u-boot-1.3.4
TFTP_PATH=/opt/eldk/arm/tftpboot
source /opt/eldk/eldk_init arm


kernel:

make s3c2410_defconfig
make menuconfig
make

$UBOOT_PATH/tools/mkimage -n 'linux-2.6.33.1' -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008040 -d $KERNEL_PATH/arch/arm/boot/zImage $TFTP_PATH/uImage


uboot:

make distclean
make smdk2410_config
make all

setenv bootargs console=ttySAC0,115200 mem=64M initrd=0x30800040
tftp 0x30008000 uImage
tftp 0x30800000 uInitramfs
bootm 0x30008000 0x30800000


busybox:

cd busybox-1.15.2/
mkdir build
make ARCH=arm O=./build defconfig
make ARCH=arm O=./build CONFIG_PREFIX=../initramfs menuconfig
make ARCH=arm V=1 O=./build CONFIG_PREFIX=../initramfs install
cd ../initramfs
file ./bin/busybox
find . | cpio -o -H newc | gzip > ../initramfs.cpio.gz

$UBOOT_PATH/tools/mkimage -n 'initramfs' -A arm -O linux -T ramdisk -C gzip -a 0x30800000 -e 0x30800040 -d $BASE_PATH/initramfs.cpio.gz $TFTP_PATH/uInitramfs


eldk:

mount -o loop arm-2008-11-24.iso /media/cdrom0
cd /media/cdrom0

./install -d /opt/eldk arm


来自http://blog.chinaunix.net/uid-20728880-id-1884711.html


Usage: grep [OPTION]... PATTERN [FILE]...
Search for PATTERN in each FILE or standard input.
PATTERN is, by default, a basic regular expression (BRE).
Example: grep -i 'hello world' menu.h main.c

 grep -nr 'ls'
 grep -nr 'ls' *

Regexp selection and interpretation:
  -E, --extended-regexp     PATTERN is an extended regular expression (ERE)
  -F, --fixed-strings       PATTERN is a set of newline-separated fixed strings
  -G, --basic-regexp        PATTERN is a basic regular expression (BRE)
  -P, --perl-regexp         PATTERN is a Perl regular expression
  -e, --regexp=PATTERN      use PATTERN for matching
  -f, --file=FILE           obtain PATTERN from FILE
  -i, --ignore-case         ignore case distinctions
  -w, --word-regexp         force PATTERN to match only whole words
  -x, --line-regexp         force PATTERN to match only whole lines
  -z, --null-data           a data line ends in 0 byte, not newline

Miscellaneous:
  -s, --no-messages         suppress error messages
  -v, --invert-match        select non-matching lines
  -V, --version             print version information and exit
      --help                display this help and exit
      --mmap                use memory-mapped input if possible

Output control:
  -m, --max-count=NUM       stop after NUM matches
  -b, --byte-offset         print the byte offset with output lines
  -n, --line-number         print line number with output lines
      --line-buffered       flush output on every line
  -H, --with-filename       print the filename for each match
  -h, --no-filename         suppress the prefixing filename on output
      --label=LABEL         print LABEL as filename for standard input
  -o, --only-matching       show only the part of a line matching PATTERN
  -q, --quiet, --silent     suppress all normal output
      --binary-files=TYPE   assume that binary files are TYPE;
                            TYPE is `binary', `text', or `without-match'
  -a, --text                equivalent to --binary-files=text
  -I                        equivalent to --binary-files=without-match
  -d, --directories=ACTION  how to handle directories;
                            ACTION is `read', `recurse', or `skip'
  -D, --devices=ACTION      how to handle devices, FIFOs and sockets;
                            ACTION is `read' or `skip'
  -R, -r, --recursive       equivalent to --directories=recurse
      --include=FILE_PATTERN  search only files that match FILE_PATTERN
      --exclude=FILE_PATTERN  skip files and directories matching FILE_PATTERN
      --exclude-from=FILE   skip files matching any file pattern from FILE
      --exclude-dir=PATTERN directories that match PATTERN will be skipped.
  -L, --files-without-match print only names of FILEs containing no match
  -l, --files-with-matches  print only names of FILEs containing matches
  -c, --count               print only a count of matching lines per FILE
  -T, --initial-tab         make tabs line up (if needed)
  -Z, --null                print 0 byte after FILE name

Context control:
  -B, --before-context=NUM  print NUM lines of leading context
  -A, --after-context=NUM   print NUM lines of trailing context
  -C, --context=NUM         print NUM lines of output context
  -NUM                      same as --context=NUM
      --color[=WHEN],
      --colour[=WHEN]       use markers to highlight the matching strings;
                            WHEN is `always', `never', or `auto'
  -U, --binary              do not strip CR characters at EOL (MSDOS)
  -u, --unix-byte-offsets   report offsets as if CRs were not there (MSDOS)

`egrep' means `grep -E'.  `fgrep' means `grep -F'.
Direct invocation as either `egrep' or `fgrep' is deprecated.
With no FILE, or when FILE is -, read standard input.  If less than two FILEs
are given, assume -h.  Exit status is 0 if any line was selected, 1 otherwise;
if any error occurs and -q was not given, the exit status is 2.

你可能感兴趣的:(c,linux,Path)