· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
이광우


1. Linux Kernel


1.1. Git


Git 서버 설정 및 사용하는 방법에 대한 끄적임.

1.2. Development


Reading list in the Documentation directory ARM Linux Developer

1.3. kmemleak


1.4. mmap


  • cache policy : arch/arm/mm/mmu.c

static struct cachepolicy cache_policies[] __initdata = {
        {
                .policy         = "uncached",
                .cr_mask        = CR_W|CR_C,
                .pmd            = PMD_SECT_UNCACHED,
                .pte            = 0,
        }, {
                .policy         = "buffered",
                .cr_mask        = CR_C,
                .pmd            = PMD_SECT_BUFFERED,
                .pte            = PTE_BUFFERABLE,
        }, {
                .policy         = "writethrough",
                .cr_mask        = 0,
                .pmd            = PMD_SECT_WT,
                .pte            = PTE_CACHEABLE,
        }, {
                .policy         = "writeback",
                .cr_mask        = 0,
                .pmd            = PMD_SECT_WB,
                .pte            = PTE_BUFFERABLE|PTE_CACHEABLE,
        }, {
                .policy         = "writealloc",
                .cr_mask        = 0,
                .pmd            = PMD_SECT_WBWA,
                .pte            = PTE_BUFFERABLE|PTE_CACHEABLE,
        }
};

dma_alloc_coherent()와 dma_alloc_writecombine() 차이는 내부적으로 __dma_alloc()을 호출할 때 마지막 인자인 pgprot_t 타입의 prot에 넘기는 값이 다르다. dma_alloc_coherent()는 pgprot_noncached() 매크로를 사용하고, dma_alloc_writecombine()은 pgprot_writecombine() 매크로를 사용한다.

  • include/asm-arm/pgtable.h

#define pgprot_noncached(prot)  __pgprot(pgprot_val(prot) & ~(L_PTE_CACHEABLE | L_PTE_BUFFERABLE))
#define pgprot_writecombine(prot) __pgprot(pgprot_val(prot) & ~L_PTE_CACHEABLE)

즉, cache를 사용하지 않도록 설정하는 것은 같지만, 내부적으로 cache와 main memory 사이의 write buffer의 사용 여부를 결정하는 것으로 생각된다.

dma_mmap_coherent()와 dma_mmap_writecombine()도 같은 맥락으로 보인다.

dma_free_writecombine()은 다른 함수들과는 다르게 dma_free_coherent()로 매크로를 사용해 정의되어 있다.

3. Flash File System

4. MPlayer Codec


MPlayer에 Codec을 추가하거나 수정하는 방법을 짬짬히 기술.

5. Google Android


Google Android 포팅 작업 및 관련 내용 정리한 문서.

7. Perl


7.1. Perl의 암호 같은 기본 변수


  • $_ - 디폴트 스칼라 변수
  • $: - 단어 구분자
  • $% - Top of page format 에서 Page 번호
  • $^ - 현재 선택된 파일핸들에 대한 Top of page format 이름
  • $~ - 현재 선택된 파일핸들에 대한 Format 이름
  • $= - 현재 선택된 파일핸들에 대한 페이지의 길이
  • $- - 현재 선택된 파일핸들에 대한 현재 페이지의 남은 행의 수
  • $/ - '\n'?
  • $^I - backup file extension on inplace editing

  • @ARGV - 말그대로 인자의 리스트 (인자만 포함됨)
  • %ENV - 현재 환경 변수 해시
  • %SIG - 시그널 해시 ($SIG{'INT'} = 'my_interrupt_signal_catcher';)

7.2. Pattern


  • $& - 정규표현식이 일치된 문자열 부분
  • $` - 정규표현식이 일치된 문자열의 앞 부분
  • $' - 정규표현식이 일치된 문자열의 뒷 부분

패턴 매치 후 \1, \2, \3과 같은 값을 $1, $2, $3 등에 설정한다. 이런 방법을 리스트 구문에 사용가능함.

  • /(\w)+\W+(\w)+/ - 패턴 매치 후 ($1, $2)와 같은 리스트로 사용 가능
  • /(\S+)\s+(\S+)\s+(.*)/ - ($1, $2, $3)의 리스트로 사용 가능

perl과 vi의 substitution은 약간 다름

  • s/(\S+)\s+(\S+)\s+(.*)/$1,$2,$3/ - perl의 경우 앞 패턴 내에서 \1 등을 사용
  • s/\(\S+\)\s+\(\S+\)\s+\(.*\)/\1,\2,\3/ - vi는 앞의 sub pattern 참조시 \를 사용

8. vi


8.1. vimdiff


  • vert diffsplit filename
  • diffthis
  • diffupdate

  • [c - jump backwards to the previous start of a change.
  • ]c - jump forwards to the next start of a change.

  • do - obtain
  • dp - put
  • 1,$+1diffget - gets all diffs from the other buffer

  • !cp % tempfile
  • vert diffsplit tempfile

8.2. buffer


  • bn - go to the next buffer in buffer list
  • bp - go to the previous buffer in buffer list

ID
Password
Join
The luck that is ordained for you will be coveted by others.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-04-16 13:47:24
Processing time 0.0095 sec