原文:
移植mtd-utils-1.5.1到arm记录
参考:交叉编译mtd-utils工具链
mtd-utils依赖于zlib、lzo、e2fsprogs提供的库,所以编译mtd-utils之前,需要先编译zlib、lzo、e2fsprogs,并安装到编译工具相应目录下
zlib下载地址:
lzo下载地址:
e2fsprogs下载地址:
mtd-utils下载地址:ftp://ftp.infradead.org/pub/mtd-utils/
1、编译zlib
lingd@ubuntu14:~/arm$ tar -zxvf zlib-1.2.8.tar.gz
lingd@ubuntu14:~/arm$ cd zlib-1.2.8/
lingd@ubuntu14:~/arm/zlib-1.2.8$ CC=arm-linux-gcc ./configure --shared --prefix=/opt/crosstools/4.4.3/arm-none-linux-gnueabi
lingd@ubuntu14:~/arm/zlib-1.2.8$ make
lingd@ubuntu14:~/arm/zlib-1.2.8$ sudo make install
2、编译lzo
lingd@ubuntu14:~/arm/zlib-1.2.8$ cd ..
lingd@ubuntu14:~/arm$ tar -zxvf lzo-2.08.tar.gz
lingd@ubuntu14:~/arm$ cd lzo-2.08/
lingd@ubuntu14:~/arm/lzo-2.08$ CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/opt/crosstools/4.4.3/arm-none-linux-gnueabi
lingd@ubuntu14:~/arm/lzo-2.08$ make
lingd@ubuntu14:~/arm/lzo-2.08$ su
Password:
root@ubuntu14:/home/lingd/arm/lzo-2.08# PATH=/opt/crosstools/4.4.3/bin:$PATH
root@ubuntu14:/home/lingd/arm/lzo-2.08# make install
root@ubuntu14:/home/lingd/arm/lzo-2.08# exit
3、编译安装e2fsprogs
lingd@ubuntu14:~/arm/lzo-2.08$ cd ..
lingd@ubuntu14:~/arm$ tar -zxvf e2fsprogs-1.41.14.tar.gz
lingd@ubuntu14:~/arm$ cd e2fsprogs-1.41.14/
lingd@ubuntu14:~/arm/e2fsprogs-1.41.14$ ./configure --host=arm-linux --enable-elf-shlibs --prefix=/opt/crosstools/4.4.3/arm-none-linux-gnueabi
lingd@ubuntu14:~/arm/e2fsprogs-1.41.14$ make
lingd@ubuntu14:~/arm/e2fsprogs-1.41.14$ sudo make install
lingd@ubuntu14:~/arm/e2fsprogs-1.41.14$ mkdir /opt/crosstools/4.4.3/arm-none-linux-gnueabi/include/uuid
lingd@ubuntu14:~/arm/e2fsprogs-1.41.14$ sudo cp lib/uuid/uuid.h /opt/crosstools/4.4.3/arm-none-linux-gnueabi/include/uuid/
4、编译mtd-utils
lingd@ubuntu14:~/arm/e2fsprogs-1.41.14$ cd ..
lingd@ubuntu14:~/arm$ tar -jxvf mtd-utils-1.5.1.tar.bz2
lingd@ubuntu14:~/arm$ cd mtd-utils-1.5.1/
lingd@ubuntu14:~/arm/mtd-utils-1.5.1$ vim Makefile
在最上面添加如下2行
CROSS=arm-linux-
WITHOUT_XATTR=1
DESTDIR=/opt/crosstools/4.4.3/mtd-utils
lingd@ubuntu14:~/arm/mtd-utils-1.5.1$ make
lingd@ubuntu14:~/arm/mtd-utils-1.5.1$ make install
编译成功后,mtd-utilsg工具链将会在当前目录下arm-linux目录生成;install后,安装装到/opt/crosstools/4.4.3/mtd-utils目录下
移植mtd-utils-1.5.1到arm记录
阅读(3608) | 评论(0) | 转发(0) |