Where the machine id is defined in Linux kernel?

Posted 2009/07/09 21:45 by kdsoo

Yep, I know you are devastated by machine ID mismatching therefore the target board shows nothing after the “starting kernel” banner.

When you face this weird situation, first you need to check the machine ID which u-boot is expecting and the one in the linux kernel are well matched each other.

You can find machine ID defined in following file in Linux kernel

arch/arm/tools/mach-types

You can check for the number of MACH_”YOURBOARD” has been assigned.

Cheers

크리에이티브 커먼즈 라이선스
Creative Commons License

Tag : arch/arm/tools/mach-types, Linux Kernel, machine ID, uboot

Winmerge filter for Linux kernel

Posted 2009/04/29 17:24 by kdsoo

## This is a directory/file filter template for WinMerge
name: kernel
desc: linux kernel excluding files

## Select if filter is inclusive or exclusive
## Inclusive (loose) filter lets through all items not matching rules
## Exclusive filter lets through only items that match to rule
## include or exclude
def: include

## Filters for filenames begin with f:
## Filters for directories begin with d:
## (Inline comments begin with " ##" and extend to the end of the line)

f: \.ext$ ## Filter for filename

d: \\subdir$ ## Filter for directory

f: \.o.cmd$
f: \.o$
f: \.swp$
저작자 표시 비영리 동일 조건 변경 허락
크리에이티브 커먼즈 라이선스
Creative Commons License

Tag : Linux Kernel, WinMerge

omap3430 camera subsystem FPS check feature design

Posted 2009/02/25 15:04 by kdsoo

(Following works are dependent to omap3 camera subsystem driver from OMAPZOOM GIT which is worked by TI and Nokia.)

 

When we are doing camera job, frame rate checking is being required all the time. (besides when you are not interrested in performance issue)

 

To be precise, we need to check two seperated sections in kernel space.

 

Image sensor (or external ISP) <—(*here)—> OMAP3 camera interface <—(**here)—> videobuf module

 

* here : We can check how many frames per sencond are comming from image sensor to OMAP3 camera interface.

** here : We can check how many frames per second are being transfered to user space.

 

 

To check fps between sensor and OMAP3 camera interface, we should look into omap3_isp_isr which is responding to every interrupts from camera subsystem. Especially we need to focus on HS_VS_IRQ which we can programme detecting sync signal and detecting edge state with SYNC_DETECT bits in ISP_CTRL register. We can make the start of frame countable with detecting VSYNC signal.

So in this case we should check whether the SYNC_DETECT bits are programmed as VS falling or VS rising.

With SYNC_DETECT bits programmed as VS rising or falling, then we could face HS_VS_IRQ with every start of image frame. That makes us available to check how many frames are comming from image sensor to OMAP3 camera interface. Only left job is to check number of HS_VS interrupts happening in a quantitative time.

 

Now we have to figure out how to check frame rate between OMAP3 camera interface and videobuf module.

=== TBD ===

크리에이티브 커먼즈 라이선스
Creative Commons License

Tag : FPS checking, Linux Kernel, OMAP3 camera interface

cscope with linux kernel source code

Posted 2009/02/10 09:17 by kdsoo

cscope 를 사용하시면 커널소스안에서 파일 위치나 함수 위치 같은걸 기억하지 않아도 금방 찾을수 있습니다.

심볼 싱크하는 시간도 IDE 들에 비해 훨씬 빨라서 좋습니다.(아무리 늦어도 30초 이내에 전체 프로젝트가 싱크됨)

 

0. cscope 설치.

ubuntu 기준으로

sudo apt-get install cscope

 

1. vim에 cscope 인식

우선 자신의 계정에 .vimrc 를 열어서 편집합니다.

set csprg=/usr/bin/cscope

......

if filereadable("./cscope.out")

        cs add cscope.out

else

        cs add /home/share/linux/cscope.out

endif

set csverb

이걸 추가 해주시구요.

 

2. cscope 싱크

커널 소스의 최상위 디렉토리에서

kdsoo@chromatix:/home/share/GIT/OMAP3430/linux-2.6.29-rc3-omap$ make cscope

합니다.

그럼 cscope index 를 만들기 시작합니다.

 

3. 기본적인 사용법

kdsoo@chromatix:/home/share/GIT/OMAP3430/linux-2.6.29-rc3-omap$ vi .

위와 같이 커널소스 최상위 디렉토리에서 "vi ." 이라고 치시면 vim 이 cscope 가 생성한 db와 연동하여 open 됩니다.

 

4. cscope 기본 명령어

vi 의 command mode (: 를 누르면 들어감) 에서

    - 파일 찾기: cs find f 파일명

    - 심볼 찾기 : cs find s 심볼

    - 함수등의 원형 찾기 : cs find g 심볼

    - 해당함수를 호출하는 함수 찾기 : cs find c 심볼

    - 해당함수가 호출하는 함수 찾기 : cs find d 심볼

더 있는데 저는 대충 이거만 써서...

사용법은 vim의 command mode 에서

:cs

라고 치시면 나오니 참고하세요.

 

5. 단축키 만들기

단축키 만들어 두면 편합니다.

.vimrc에 다음을 구미에 맞게 추가하세요. (F 키는 키보드의 펑션키를 말함..취향에 맞게 변경해 쓰세요)

    - cscope db 빌드 단축키 (F8)

    nnoremap <silent> <F8> :make cscope ARCH=arm<CR> :cs kill 0<CR> :cs add cscope.out<CR>

    - 파일찾기 단축키

    nnoremap <silent> <F5> :cs find f

 

6. vim visual mode 에서 cscope 연동

vim 의 visual mode (마우스로 해당 심볼을 선택가능한 모드)에서

해당 심볼을 마우스로 선택하고(그냥 원클릭)

ctrl + [ 를 누른후 s g c t e 등의 cscope 커맨드 옵션을 입력하면

cs find "옵션" 심볼

과 같은 효과를 낼수 있습니다.

다음을 .vimrc에 추가하세요.

nmap <C-[>s :cs find s <C-R>=expand("<cword>")<CR><CR>

nmap <C-[>g :cs find g <C-R>=expand("<cword>")<CR><CR>

nmap <C-[>c :cs find c <C-R>=expand("<cword>")<CR><CR>

nmap <C-[>t :cs find t <C-R>=expand("<cword>")<CR><CR>

nmap <C-[>e :cs find e <C-R>=expand("<cword>")<CR><CR>

nmap <C-[>f :cs find f <C-R>=expand("<cfile>")<CR><CR>

nmap <C-[>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>

nmap <C-[>d :cs find d <C-R>=expand("<cword>")<CR><CR>

위 옵션들을 추가하면 vim 에서 원하는 심볼을 선택하고 해당 심볼을 call 하는 심볼을 찾는 작업등을 할수 있습니다.

그럼 즐거운 vi 생활 되세요.

추가로... 지금 열고있는 소스파일의 심볼 목록을 쉽게 보고 싶으신 경우를 위해 다음 단축키도 편하게 사용하실수 있습니다.

nnoremap <silent> <F7> :Tlist<CR>

크리에이티브 커먼즈 라이선스
Creative Commons License

'[3] My specialty' 카테고리의 다른 글

Hello San Francisco.  (0) 2009/02/13
vi 와 Linux programmer&rsquo;s manual 연동  (0) 2009/02/12
cscope with linux kernel source code  (0) 2009/02/10
Firefox url bar problem on Ubuntu 8.04  (0) 2009/02/02
V4L2 개발 관련 정리.  (0) 2009/01/21
Diff tools  (0) 2009/01/16

Tag : cscope, Linux Kernel, vi, vim