使用cscope+ctags+global 查看uboot及linux kernel 代码脚本

2820阅读 0评论2013-06-28 M_O_Bz
分类:LINUX

cscope+ctags+global 的使用见下:
 
http://blog.chinaunix.net/u/22968/showart_432334.html
 
查看uboot代码:
以DSPG pnx8181芯片的u-boot的为例:
详细操作见下脚本:
 

#!/bin/bash

UBOOT=$PWD
#generate the cscope.files
find $UBOOT \
        -path "$UBOOT/board/*" ! -path "$UBOOT/board/firetux*" -prune -o \
        -path "$UBOOT/lib_*" ! \( -path "$UBOOT/lib_arm*" -o -path "$UBOOT/lib_generic*" \) -prune -o \
        -path "$UBOOT/cpu/*" ! -path "$UBOOT/cpu/arm926ejs*" -prune -o \
        -path "$UBOOT/include/asm-*" ! -path "$UBOOT/include/asm-arm*" -prune -o \
        -path "$UBOOT/include/asm-arm/arch-*" ! -path "$UBOOT/include/asm-arm/arch-arm926*" -prune -o \
        -path "$UBOOT/include/configs*" -prune -o \
        -name "*.[chsS]" -print > $UBOOT/cscope.files

find $UBOOT/include/configs/ -name firetux.h >> $UBOOT/cscope.files
cscope -bkq -i $UBOOT/cscope.files

#generate the cppcomplete
ctags -n -f cppcomplete.tags --fields=+ai --C++-types=+p * -L $UBOOT/cscope.files
#Try setting the $CSCOPE_DB environment variable to point to a Cscope database you create, so you won

文件: uboot.rar
大小: 0KB
下载: 下载

在linux下

source uboot文件即可在任意目录查看u-boot源码。

 

查看kernel代码脚本:
 
文件: kernel.tar.bz2
大小: 0KB
下载: 下载


 

上一篇:Uncompressing Linux... done, booting the kernel
下一篇:用ccache加速编译内核