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

2012년 7월 11일 수요일

zlib cross compile

  • official home

 http://zlib.net/

  • download

http://zlib.net/
or
http://sourceforge.net/projects/libpng/files/zlib/1.2.7/zlib-1.2.7.tar.gz/download

  •   build and install ( cross compile )

configure command does not include CC configuration.
You must put CC and others directly

$ CC=arm-none-linux-gnueabi-gcc AR=arm-none-linux-gnueabi-ar RANLIB=arm-none-linux-gnueabi-ranlib ./configure --shared --prefix=$PWD/build

make
make install


2012년 7월 4일 수요일

mtd-utils build and install


  • officail homepage


http://www.linux-mtd.infradead.org/index.html

  • download


ftp://ftp.infradead.org/pub/mtd-utils/
or
git clone git://git.infradead.org/mtd-utils.git mtd-utils

  • configure and build for cross compile


mtd-utils does not supprot configure.
You must modify Makefile of commom.mk directlry

In common.mk defines CC

CC := $(CROSS)gcc
AR := $(CROSS)ar
RANLIB := $(CROSS)ranlib


just add variable CROSS on top of common.mk for example

CROSS :=arm-none-linux-gnueabi-

  • Install


In Makefile instill DIR defined as DESTDIR

install:: $(addprefix $(BUILDDIR)/,${BINS}) ${SCRIPTS}
        mkdir -p ${DESTDIR}/${SBINDIR}
        install -m 0755 $^ ${DESTDIR}/${SBINDIR}/
        mkdir -p ${DESTDIR}/${MANDIR}/man1
        install -m 0644 mkfs.jffs2.1 ${DESTDIR}/${MANDIR}/man1/
        -gzip -9f ${DESTDIR}/${MANDIR}/man1/*.1


Do below commnad

$ make install  DESTDIR=/home/user/mtd/install

finally you can do as below

$ make CROSS=arm-none-linux-gnueabi- DESTDIR=/home/user/mtd/install all install

  • build error handling


sometimes it can return errors, because of cross compiler restriction

$ error: sys/acl.h: No such file or directory

It means your cross toolchanin does not support ACL.
mtd-util has build option for this

$ make CROSS=arm-none-linux-gnueabi- WITHOUT_XATTR=1

The access control list(ACL) enables higher flexible access control based on UNIX users and groups than traditional user/group/others model. '--with-xattr' or '--with-posix-acl' options on mkfs.jffs2 enables to
copy the ACLs associated with any files in host environment into jffs2 image file. The purpose of this feature is improvement of security in embedded region.

refer to http://lists.infradead.org/pipermail/linux-mtd/2006-November/016814.html

error: lzo/lzo1x.h: No such file or directory

There is an option build without LZO
But it does not works properly, also LZO must be needed because ubifs includes LZO

$make CROSS=arm-none-linux-gnueabi- WITHOUT_XATTR=1 WITHOUT_LZO=1

It will cause build error also in ubifs related package
Refer to http://dokyunblog.blogspot.kr/2012/07/introduction-lzo-is-data-compression.html
Contain LZO lib in toolchain.


2011년 3월 22일 화요일

Making simple rootfs using ELDK

ELDK ramdisk is really small and the ELDK pacakages includes almost all of the utils.
You do not need to navigate web and try to searching source code for SW pacakges
Basically root file system packages are included in PSP but that also includes something that we do not need and it makes increase flash image size and sometime it spends useless time for boot.

If you are using ELDK rootfs and just exchange libs and binaries, you can get optimized filesystem for your own. Then add packages what you need.

Offcial homepage : http://www.denx.de/wiki/DULG/ELDK

References :
http://www.denx.de/wiki/view/DULG/ELDKInitialInstallation
http://www.denx.de/wiki/view/DULG/RootFileSystemDesignAndBuilding

Env : I did under Fedora12

1. ELDK package download
http://ftp.denx.de/pub/eldk/4.2/arm-linux-x86/iso/arm-2008-11-24.iso

2. mount iso image.
 Make directory for mount point
 For mounting iso image, log-in as root
 mounting iso image

 [dokyun@kalimdor ELDK]$ mkdir armiso
 [dokyun@kalimdor ELDK]$ su
 [root@kalimdor ELDK]# mount -t iso9660 -o loop ./arm-2008-11-24.iso armiso

3. Install ELDK

TBD