e2fsprogs 编译安装(x86/ARM)[2013-10-21更新]

本文介绍了如何在x86和ARM平台上编译安装e2fsprogs,该工具集用于维护ext2,ext3和ext4文件系统。详细步骤包括:解压源码、配置、编译和安装。对于ARM平台,需要使用交叉编译工具arm-linux-gcc。
e2fsprogs(又称为 e2fs programs)是用以维护ext2,ext3和ext4档案系统的工具程序集。由于ext2/3/4是绝大多数Linux发行版默认的文件系统,所以这套工具集也包含在众多Linux发行版内。



- install

- for PC

# tar -zxvf e2fsprogs-1.41.14.tar.gz
# cd e2fsprogs-1.41.14
# ./configure --prefix=$PWD/build
# make
# make install

-------------------------------------------------------------------------

- for ARM

make[3]: Entering directory '/home/wuyilun/Desktop/NVMP/NVMP/nvmp/tools/mtd-utils' make -C /home/wuyilun/Desktop/NVMP/NVMP/nvmp/build_dir/host/mtd-utils-1.4.5/lib CFLAGS="-O2 -I/home/wuyilun/Desktop/NVMP/NVMP/nvmp/staging_dir/host/include -I/home/wuyilun/Desktop/NVMP/NVMP/nvmp/staging_dir/host/include/e2fsprogs -fgnu89-inline -I/home/wuyilun/Desktop/NVMP/NVMP/nvmp/build_dir/host/mtd-utils-1.4.5/include -L/home/wuyilun/Desktop/NVMP/NVMP/nvmp/build_dir/host/mtd-utils-1.4.5 -L/home/wuyilun/Desktop/NVMP/NVMP/nvmp/staging_dir/host/lib -DNO_NATIVE_SUPPORT" LDFLAGS="-L/home/wuyilun/Desktop/NVMP/NVMP/nvmp/staging_dir/host/lib " WITHOUT_LZO=1 WITHOUT_XATTR=1 LZMA_STATIC_LIB="/home/wuyilun/Desktop/NVMP/NVMP/nvmp/staging_dir/host/lib/liblzma.a" SUBDIRS="" BUILDDIR="/home/wuyilun/Desktop/NVMP/NVMP/nvmp/build_dir/host/mtd-utils-1.4.5" TARGETS="libmtd.a libcrc32.a" LIBS="libmtd libcrc32" make[4]: Entering directory '/home/wuyilun/Desktop/NVMP/NVMP/nvmp/build_dir/host/mtd-utils-1.4.5/lib' mkdir -p /home/wuyilun/Desktop/NVMP/NVMP/nvmp/build_dir/host/mtd-utils-1.4.5/ gcc -I../include -D_FILE_OFFSET_BITS=64 -O2 -I/home/wuyilun/Desktop/NVMP/NVMP/nvmp/staging_dir/host/include -I/home/wuyilun/Desktop/NVMP/NVMP/nvmp/staging_dir/host/include/e2fsprogs -fgnu89-inline -I/home/wuyilun/Desktop/NVMP/NVMP/nvmp/build_dir/host/mtd-utils-1.4.5/include -L/home/wuyilun/Desktop/NVMP/NVMP/nvmp/build_dir/host/mtd-utils-1.4.5 -L/home/wuyilun/Desktop/NVMP/NVMP/nvmp/staging_dir/host/lib -DNO_NATIVE_SUPPORT -c -o /home/wuyilun/Desktop/NVMP/NVMP/nvmp/build_dir/host/mtd-utils-1.4.5/libmtd.o libmtd.c -g -Wp,-MD,/home/wuyilun/Desktop/NVMP/NVMP/nvmp/build_dir/host/mtd-utils-1.4.5/.libmtd.c.dep libmtd.c: In function 'dev_node2num': libmtd.c:444:10: error: called object 'major' is not a function or function pointer 444 | major = major(st.st_rdev); | ^~~~~ libmtd.c:432:9: note: declared here 432 | int i, major, minor; | ^~~~~ libmtd.c:445:10: error: called object 'minor' is not a function or function pointer 445 | minor = minor(st.st_rdev); | ^~~~~ libmtd.c:432:16: note: declared here 432 | int i, major, minor; | ^~~~~ libmtd.c: In function 'mtd_get_dev_info1': libmtd.c:741:46: warning: passing argument 3 of 'dev_read_data' discards 'const' qualifier from pointer target type [-Wdiscarded-array-qualifiers] 741 | ret = dev_read_data(lib->mtd_name, mtd_num, &mtd->name, | ^~~~~~~~~~ libmtd.c:182:63: note: expected 'void *' but argument is of type 'const char (*)[128]' 182 | static int dev_read_data(const char *patt, int mtd_num, void *buf, int buf_len) | ~~~~~~^~~ libmtd.c:747:46: warning: passing argument 3 of 'dev_read_data' discards 'const' qualifier from pointer target type [-Wdiscarded-array-qualifiers] 747 | ret = dev_read_data(lib->mtd_type, mtd_num, &mtd->type_str, | ^~~~~~~~~~~~~~ libmtd.c:182:63: note: expected 'void *' but argument is of type 'const char (*)[65]' 182 | static int dev_read_data(const char *patt, int mtd_num, void *buf, int buf_len) | ~~~~~~^~~ libmtd.c: In function 'mtd_probe_node': libmtd.c:1320:10: error: called object 'major' is not a function or function pointer 1320 | major = major(st.st_rdev); | ^~~~~ libmtd.c:1308:9: note: declared here 1308 | int i, major, minor; | ^~~~~ libmtd.c:1321:10: error: called object 'minor' is not a function or function pointer 1321 | minor = minor(st.st_rdev); | ^~~~~ libmtd.c:1308:16: note: declared here 1308 | int i, major, minor; | ^~~~~ make[4]: *** [../common.mk:63: /home/wuyilun/Desktop/NVMP/NVMP/nvmp/build_dir/host/mtd-utils-1.4.5/libmtd.o] Error 1 make[4]: Leaving directory '/home/wuyilun/Desktop/NVMP/NVMP/nvmp/build_dir/host/mtd-utils-1.4.5/lib' make[3]: *** [Makefile:69: /home/wuyilun/Desktop/NVMP/NVMP/nvmp/build_dir/host/mtd-utils-1.4.5/.built] Error 2 make[3]: Leaving directory '/home/wuyilun/Desktop/NVMP/NVMP/nvmp/tools/mtd-utils' make[2]: *** [tools/Makefile:237: tools/mtd-utils/compile] Error 2 make[2]: Leaving directory '/home/wuyilun/Desktop/NVMP/NVMP/nvmp' make[1]: *** [tools/Makefile:201: /home/wuyilun/Desktop/NVMP/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/stamp/.tools_install_nnnnn] Error 2 make[1]: Leaving directory '/home/wuyilun/Desktop/NVMP/NVMP/nvmp' make: *** [/home/wuyilun/Desktop/NVMP/NVMP/nvmp/include/toplevel.mk:279: world] Error 2
最新发布
08-19
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值