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
2012년 6월 5일 화요일
2011년 12월 26일 월요일
inetutil cross compile - ( telnetd )
inetutil includes various network utils
such as telnet client, telnet daemon, tftp, and so on
download source code
http://ftp.gnu.org/gnu/inetutils/
untar inetutils-1.8.tar.gz
and configure
# ./configure --host=arm-none-linux-gnueabi --build=i686 --prefix=/usr/bin
# make
I have compile error while building ifconfig,
just disable ifconfig then succeeded
# ./configure --host=arm-none-linux-gnueabi --build=i686 --prefix=/usr/bin --disable-ifconfig
# make
if you want to find other tool that is not included in inetutils
try to find net-tools
http://sourceforge.net/projects/net-tools/
such as telnet client, telnet daemon, tftp, and so on
download source code
http://ftp.gnu.org/gnu/inetutils/
untar inetutils-1.8.tar.gz
and configure
# ./configure --host=arm-none-linux-gnueabi --build=i686 --prefix=/usr/bin
# make
I have compile error while building ifconfig,
just disable ifconfig then succeeded
# ./configure --host=arm-none-linux-gnueabi --build=i686 --prefix=/usr/bin --disable-ifconfig
# make
if you want to find other tool that is not included in inetutils
try to find net-tools
http://sourceforge.net/projects/net-tools/
2011년 9월 15일 목요일
pciutils build and install
Introduction
The PCI Utilities package contains a library for portable access to PCI bus configuration registers and several utilities based on this library.
- lspci: displays detailed information about all PCI buses and devices.
- setpci: allows to read from and write to PCI device configuration
registers. For example, you can adjust the latency timers with it.
CAUTION: There is a couple of dangerous points and caveats, please read
the manual page first!
- update-pciids: download the current version of the pci.ids file.
For more detail , refer to README file in this package
download
ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/
https://ftp.kernel.org/pub/software/utils/pciutils/
or git tree
git://git.kernel.org/pub/scm/utils/pciutils/pciutils.git
Configure and build for cross compile
pci-util does not support configure.
$ make CROSS_COMPILE=arm-none-linux-gnueabi- HOST=arm-none-linux PREFIX=/targetnfs/durota/rfs/user/local/pciutils all
$make install
strip option is defined as below inside of make file
STRIP=-s
and install includes below
$(INSTALL) -c -m 755 $(STRIP) lspci setpci $(DESTDIR)$(SBINDIR)
change makefile as below
STRIP=$(CROSS_COMPILE)strip
$(STRIP) lspci
$(STRIP) setpci
$(INSTALL) -c -m 755 lspci setpci $(DESTDIR)$(SBINDIR)
or just remove $(STRIP)
$(INSTALL) -c -m 755 lspci setpci $(DESTDIR)$(SBINDIR)
2011년 9월 9일 금요일
simple busybox build
just do it
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- CONFIG_PREFIX=../rootfs_skel_tmp/ install
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- CONFIG_PREFIX=../rootfs_skel_tmp/ install
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
"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
2011년 3월 27일 일요일
피드 구독하기:
글 (Atom)