Рет қаралды 942
Environment variables
export TARGET=aarch64-unknown-linux-gnu
export PREFIX="/home/Nandu/sysroot/usr"
export sysroot="/home/Nandu/sysroot"
export PATH="/home/Nandu/sysroot/usr/bin:$PATH"
configure binutils
../configure --prefix=$sysroot/usr --with-sysroot=$sysroot --with-lib-path=$sysroot/usr/lib --target=$TARGET --disable-nls --disable-werror
configure gcc
../configure --target=$TARGET --prefix=$sysroot/usr --with-glibc-version=2.27 --with-sysroot=$sysroot --with-newlib --without-headers
--with-local-prefix=/usr --with-native-system-header-dir=/usr/include --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libatomic --disable-libgomp --disable-libquadmath
--disable-libssp --disable-libvtv --disable-libstdcxx --enable-languages=c,c++
configure linux
make headers_install CROSS_COMPILE=$TARGET INSTALL_HDR_PATH=$sysroot/usr ARCH=arm64
configure glibc
BUILD_CC=gcc CC=$sysroot/usr/bin/aarch64-unknown-linux-gnu-gcc AR=$sysroot/usr/bin/aarch64-unknown-linux-gnu-ar RANLIB=$sysroot/usr/bin/aarch64-unknown-linux-gnu-ranlib ../configure --prefix=/usr --host=aarch64-unknown-linux-gnu --build=x86_64-pc-linux-gnu --enable-kernel=4.19 --with-headers=$sysroot/usr/include