编译bcache
编译环境准备
- 确保环境使用CentOS-7-aarch64-Everything-1810.iso镜像安装。
- 确认操作系统版本。
uname -a
操作系统显示版本如下所示。Linux localhost.localdomain 4.14.0-115.10.1.el7a.aarch64 #1 SMP Thu Nov 26 14:15:20 CST 2020 aarch64 aarch64 aarch64 GNU/Linux
- 确认GCC版本。
gcc -v
建议使用GCC 4.8.5(CentOS 7.6默认配套版本)进行编译。
GCC版本信息显示如下。Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-redhat-linux/4.8.5/lto-wrapper Target: aarch64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-aarch64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-aarch64-redhat-linux/cloog-install --enable-gnu-indirect-function --build=aarch64-redhat-linux Thread model: posix gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)
- 确认内核头文件已安装。
ls /usr/src/kernels/$(uname -r)
安装情况如下所示。arch block certs crypto drivers firmware fs include init ipc Kconfig kernel lib Makefile mm Module.symvers net samples scripts security sound System.map tools usr virt
父主题: 软件编译和安装