참고:
https://clfs.org/view/clfs-embedded/arm/
라즈베리파이 4의 CPU를 타겟으로 빌드할 수 있도록 최신 gcc로 대체한다.
패키지 다운로드:
http://busybox.net/downloads/busybox-1.24.2.tar.bz2
https://github.com/cross-lfs/bootscripts-embedded/archive/master.tar.gz
http://sethwklein.net/iana-etc-2.30.tar.bz2
http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.9.22.tar.xz
http://www.musl-libc.org/releases/musl-1.1.16.tar.gz
https://sourceware.org/pub/binutils/releases/binutils-2.40.tar.xz
https://ftp.gnu.org/gnu/gcc/gcc-12.2.0/gcc-12.2.0.tar.xz
https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz
MPC (1.3.1)
MPFR (4.2.0)
CLFS_TARGET=aarch64-linux-musleabihf
CLFS_ARCH=arm64
CLFS_ARM_ARCH=armv8-a
CLFS_FLOAT=hard
CLFS_FPU=vfpv4
Linux-Headers-4.9.22
make mrproper
make ARCH=${CLFS_ARCH} headers_check
make ARCH=${CLFS_ARCH} INSTALL_HDR_PATH=${CLFS}/cross-tools/${CLFS_TARGET} headers_install
Binutils-2.40
../binutils-2.27/configure \
--prefix=${CLFS}/cross-tools \
--target=${CLFS_TARGET} \
--with-sysroot=${CLFS}/cross-tools/${CLFS_TARGET} \
--disable-nls \
--disable-multilib
make configure-host
make
make install
GCC-12.2.0 - Pass 1
추측 : gcc 12.2.0에서 --target만 지정하면 충분하다. 옛 gcc는 --with-arch, --with-float, --with-fpu 지정이 필요했지만 이제 없어도 되겠다. 다만, 생성된 gcc를 사용해서 빌드할 때 arch, fpu 를 옵션에서 설정하여야 한다.
아래의 gcc 옵션을 참고.
https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html#AArch64-Options
tar -xf ../mpfr-4.2.0.tar.xz
mv -v mpfr-4.2.0 mpfr
tar -xf ../gmp-6.2.1.tar.xz
mv -v gmp-6.2.1 gmp
tar -xf ../mpc-1.3.1.tar.gz
mv -v mpc-1.3.1 mpc
../gcc-6.2.0/configure \
--prefix=${CLFS}/cross-tools \
--build=${CLFS_HOST} \
--host=${CLFS_HOST} \
--target=${CLFS_TARGET} \
--with-sysroot=${CLFS}/cross-tools/${CLFS_TARGET} \
--disable-nls \
--disable-shared \
--without-headers \
--with-newlib \
--disable-decimal-float \
--disable-libgomp \
--disable-libmudflap \
--disable-libssp \
--disable-libatomic \
--disable-libquadmath \
--disable-threads \
--enable-languages=c \
--disable-multilib \
musl-1.1.16
./configure \
CROSS_COMPILE=${CLFS_TARGET}- \
--prefix=/ \
--target=${CLFS_TARGET}
make
DESTDIR=${CLFS}/cross-tools/${CLFS_TARGET} make install
GCC-6.2.0 - Final
FAILED!!!!!!
'Cross Linux From Scratch' 카테고리의 다른 글
CLFS (0) | 2023.03.11 |
---|