레이블이 kernel인 게시물을 표시합니다. 모든 게시물 표시
레이블이 kernel인 게시물을 표시합니다. 모든 게시물 표시

2012년 8월 4일 토요일

exporting kernel headers- headers_install


  • command for exporting kernel headers in user space
make headers_install ARCH=arm INSTALL_HDR_PATH=/usr/include

  • how to include headers for headers_install
Add headers in Kbuild under {kernel_source_dir}/include/
header-y += {header_file_name.h}

For more detail, refer to headers_install.txt





2012년 6월 5일 화요일

DMA related kernel APIs

dma_map_single
  ==> map DMA address for virtual memory,
  ==>use kmalloc if continuous memory is not enough, it returens fail
dma_unmap_single
  ==> free memory by allocating dma_map_single
dma_alloc_cohernet
  ==> allocate coherent memory for DMA
  ==> it allocates memory in conherent area,
  ==> refer to memory.h in architecture
  ==> it can be decided by CONSISTENT_DMA_SIZE

other APIs
  ==> dma_pool_create
  ==> dma_pool_alloc
  ==> dma_pool_free
  ==> dma_pool_destory
  ==> dma_alloc_writecombine

Also you can decide dma memory attributes by using kernel APIs

For more detail,  refer to dma-api.txt in kernel doc

condiserations when you alloc DMA memory

1. allocate meory in coherent area ?
2. use memory as like pool?
3. how mush you are using coherent memory
4. swap area is used or not

But everytime you can not have enough memory......if you have, it's not real

2011년 8월 27일 토요일

getting kernel cmdline in kernel

using the macro as below

__setup("console=", console_setup);
it means
if meet "console=" in cmd line call  console_setup

2011년 4월 7일 목요일

Unhandled fault: external abort on non-linefetch

I found this error message when access memory io

"Unhandled fault: external abort on non-linefetch"

if the device is not powered properly this message shows
It means Memory io address is assigned by kernel but io does not work.
check the device power stastus.

I power up the device in u-boot , then I could aceesse it