ARMv7ネオン用CLFS

ARMv7ネオン用CLFS

私はフォローしていますCLFSブック(GIT-20140613-armバージョン)、armv7とネオンの組み合わせでGCCを構築する際に問題があります。対象情報はこちら

私のホストは、gawk、build-essential、texinfo、libncurses5-devパッケージを含むきれいなDebian 8です。詳細を確認できます。ここで見つけることができます

私はそうだった今回のパッチgcc-4.9を使用してbinutilを構築します。

ガイダンスに従ってGCCが初めてコンパイルされたとき、これらのアームの組み合わせでは動作が不可能であると主張します。

checking for suffix of object files... configure: error: in `/mnt/clfs/sources/gcc-build/arm-linux-musleabihf/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

上記ではconfig.log、以下を見ることができます:

conftest.c:1:0: error: target CPU does not support ARM mode

私は接続しましたここで完全に間違っています。

私の研究で私は見つけました。この問題--with-mode=thumb同じように聞こえますが、OPは非常に古いバージョンのCLFSブックに従い、追加してこのエラーを克服しましたが、./configuremuslは失敗します。

arm-linux-musleabihf-gcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -D_XOPEN_SOURCE=700 -I./arch/arm -I./src/internal -I./include -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -fno-stack-protector -c -o crt/crt1.o crt/arm/crt1.s
crt/arm/crt1.s: Assembler messages:
crt/arm/crt1.s:6: Error: only lo regs allowed with immediate -- `mov fp,#0'
crt/arm/crt1.s:7: Error: only lo regs allowed with immediate -- `mov lr,#0'
crt/arm/crt1.s:8: Error: Thumb does not support this addressing mode -- `ldr a2,[sp],#4'
crt/arm/crt1.s:11: Error: lo register required -- `str fp,[sp,#-4]!'
crt/arm/crt1.s:12: Error: Thumb does not support this addressing mode -- `str a1,[sp,#-4]!'
crt/arm/crt1.s:13: Error: Thumb does not support this addressing mode -- `str a4,[sp,#-4]!'
Makefile:112: recipe for target 'crt/crt1.o' failed
make: *** [crt/crt1.o] Error 1

私も持っている試してvfpvfpv3てください、そして私もいます。Linaro GCCをお試しください変えるGNUワン、まったく運がありません。

ある時点では、Raspberry Pi One(ハード、vfp、およびarmv6)を使用して本を正常に完了しましたが、Beagleboneコンボに問題があります。

私は何を見逃していますか?私の環境は正しいですか?それでは、この問題を克服するために何ができますか?

ベストアンサー1

BeagleBone Blackの場合、正しい設定はarmv7-a次のとおりです。ここそしてここ、次からカーネル設定を取得する必要があります。ここを使用しbb.org_defconfig、次のヘッダーを使用します。ここgccパッチここを使用して最終gccバージョンを構築するために使用することを忘れないでください--disable-libsanitizer

ビルドする前に、次のコマンドを使用しましたmusl

sed -i 's/\/dev\/null\/utmp/\/var\/run\/utmp/g;s/\/dev\/null\/wtmp/\/var\/log\/wtmp/g' include/paths.h include/utmp.h

そして問題をbusybox解決するには、ビルドする前に次の手順を実行します。wtmp

sed -i 's/\(CONFIG_\)\(.*\)\(INETD\)\(.*\)=y/# \1\2\3\4 is not set/g;s/\(CONFIG_IFPLUGD\|CONFIG_ASH_HELP\|CONFIG_FEATURE_VERBOSE\|CONFIG_UEVENT\)=y/# \1 is not set/' .config
sed -i '/utmpx\.h/,/endif/s/__UCLIBC__/LIBBB_H/' include/libbb.h

完全な包装リスト:

wget -cO bootscripts-embedded-HEAD.tar.gz -c 'http://git.clfs.org/?p=bootscripts-embedded.git;a=snapshot;h=HEAD;sf=tgz'
wget -cO gcc-5.2.0-musl-1.patch 'https://raw.githubusercontent.com/GregorR/musl-cross/master/patches/gcc-5.2.0-musl.diff'
wget -c \
    'http://ftp.gnu.org/gnu/binutils/binutils-2.25.1.tar.bz2' \
    'http://busybox.net/downloads/busybox-1.24.0.tar.bz2' \
    'ftp://gcc.gnu.org/pub/gcc/releases/gcc-5.2.0/gcc-5.2.0.tar.bz2' \
    'http://ftp.gnu.org/gnu/gmp/gmp-5.1.3.tar.xz' \
    'http://sethwklein.net/iana-etc-2.30.tar.bz2' \
    'http://ftp.barfooze.de/pub/sabotage/tarballs/kernel-headers-3.12.6-5.tar.xz' \
    'https://github.com/beagleboard/linux/archive/4.1.tar.gz' \
    'ftp://ftp.denx.de/pub/u-boot/u-boot-2015.10.tar.bz2' \
    'ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz' \
    'ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.3.tar.xz' \
    'http://www.musl-libc.org/releases/musl-1.1.9.tar.gz' \
    'https://matt.ucc.asn.au/dropbear/releases/dropbear-2015.68.tar.bz2' \
    'http://www.red-bean.com/~bos/netplug/netplug-1.2.9.2.tar.bz2' \
    'http://downloads.sourceforge.net/libpng/zlib-1.2.9.tar.gz' \
    'http://patches.clfs.org/embedded-dev/iana-etc-2.30-update-2.patch' \
    'http://patches.clfs.org/embedded-dev/netplug-1.2.9.2-fixes-1.patch' \
    'http://downloads.sourceforge.net/libpng/zlib-1.2.8.tar.gz'

これにより、すべての問題が解決されました。

おすすめ記事