交叉編譯mtd-utils

busybox中沒有flash_erase,在線升級不方便,因此打算從源碼交叉編譯mtd-utilslinux

【1】下載源碼包ui

http://download.savannah.gnu.org/releases/acl/
http://download.savannah.gnu.org/releases/attr/
http://www.zlib.net/
http://www.oberhumer.com/opensource/lzo/download/
http://sourceforge.net/projects/libuuid/
ftp://ftp.infradead.org/pub/mtd-utils/
【2】交叉編譯
【2.1】準備編譯目錄。全部的庫編譯完成後都將安裝到該路徑下,以後的庫也將從該路徑中尋找頭文件的庫文件spa

sudo mkdir /opt/omapl138_root
sudo chown user:user /opt/omapl138_root

【2.2】attr.net

tar xf attr-2.4.47.src.tar.gz
cd attr-2.4.47
./configure --host=arm-none-linux-gnueabi --prefix=/opt/omapl138_root/
make
make install-dev
make install-lib
make install

【2.3】aclcode

tar xf acl-2.2.52.src.tar.gz
cd acl-2.2.52
./configure --host=arm-none-linux-gnueabi --prefix=/opt/omapl138_root/  
CFLAGS="-I/opt/omapl138_root/include" LDFLAGS="-L/opt/omapl138_root/lib" make
make install
make install-lib
make install-dev

【2.4】zlibblog

tar xf zlib-1.2.8.tar.xz
cd zlib-1.2.8
CC=arm-none-linux-gnueabi-gcc ./configure --prefix=/opt/omapl138_root/
CC=arm-none-linux-gnueabi-gcc make
make install

【2.5】lzo源碼

tar xf lzo-2.09.tar.gz
cd lzo-2.09/
./configure --host=arm-none-linux-gnueabi --prefix=/opt/omapl138_root/
make
make install

【2.6】libuuidflash

tar xf libuuid-1.0.3.tar.gz
cd libuuid-1.0.3/
./configure --host=arm-none-linux-gnueabi --prefix=/opt/omapl138_root/
make
make install

【2.7】mtd-utils編譯

tar xf mtd-utils-1.5.2.tar.bz2
cd mtd-utils-1.5.2/
CFLAGS="-I/opt/omapl138_root/include" LDFLAGS="-L/opt/omapl138_root/lib" make install CROSS=arm-none-linux-gnueabi- DESTDIR=/opt/omapl138_root 
相關文章
相關標籤/搜索