从0开玩lichee zero-3-rootfs编译

build

apt-get install linux-headers-$(uname -r)
wget https://buildroot.org/downloads/buildroot-2017.08.tar.gz
tar xvf buildroot-2017.08.tar.gz
cd buildroot-2017.08/
make menuconfig
make

troubleshoot

  • host-m4 版本问题:c-stack.c:55:26: error: missing binary operator before token "("
    解决: 由m4-1.4.18升级为m4-1.4.19。修改package/m4下的m4.mk和m4.hash
    m4.mk:

    M4_VERSION = 1.4.19

    m4.hash:

    sha256  63aede5c6d33b6d9b13511cd0be2cac046f2e70fd0a07aa9573a04a82783af96  m4-1.4.19.tar.xz
  • bison: Please port gnulib fseterr.c to your platform
    解决:cd output/build/host-bison-3.0.4

    sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
    echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h
  • libfakeroot.c:99:40: error: '_STAT_VER' undeclared
    #ifndef _STAT_VER
    #if defined (__aarch64__)
    #define _STAT_VER 0
    #elif defined (__x86_64__)
    #define _STAT_VER 1
    #else
    #define _STAT_VER 3
    #endif
    #endif