Table of Contents
由于busybox中提供的mkfs.vfat无法格式化超过2G的分区,提示:
1 2 3 |
mkfs.vfat: lseek: Value too large for defined data type |
所以需要单独编译mkfs.fat以支持2G以上的分区
1 2 3 4 5 |
$ git clone https://github.com/dosfstools/dosfstools.git dosfstools.git $ cd dosfstools.git $ git checkout v4.1 |
首先产生configure文件,执行autoconf后报错:
1 2 3 4 5 6 7 8 |
$ autoconf configure.ac:19: error: possibly undefined macro: AM_INIT_AUTOMAKE If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure.ac:30: error: possibly undefined macro: AM_CONDITIONAL configure.ac:58: error: possibly undefined macro: AC_DEFINE |
经查需要先执行aclocal
1 2 3 4 |
$ aclocal $ autoconf |
产生configure后进行自动配置产生Makefile:
1 2 3 4 5 |
$ ./configure --host=arm-linux configure: loading site script /data/toolchain/imx-a7/site-config-cortexa7hf-vfp-neon-poky-linux-gnueabi configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.." |
查了一下需要先执行autoconf –install产生install-sh脚本
1 2 3 4 5 6 7 |
$ autoreconf --install $ ./configure --host=arm-linux $ make $ file src/mkfs.fat src/mkfs.fat: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=9ae7350e4d6a124867e762b8d019b5a881a8ca97, not stripped |