システムに問題なく組み込み Linux 開発キット (Yocto プロジェクトに接続されている ELDK v5.5.3) をインストールしました。/opt/ARM/eldk-v553 にインストールされます。インストールの最後に、適切な環境変数を設定するために、次のスクリプトを入手する必要がありました。
export PATH=/opt/ARM/eldk-v553/eldk/armv5te/sysroots/i686-eldk-linux/usr/bin:/opt/ARM/eldk-v553/eldk/armv5te/sysroots/i686-eldk-linux/usr/bin/arm-linux-gnueabi:$PATH
export PKG_CONFIG_SYSROOT_DIR=/opt/ARM/eldk-v553/eldk/armv5te/sysroots/armv5te-linux-gnueabi
export PKG_CONFIG_PATH=/opt/ARM/eldk-v553/eldk/armv5te/sysroots/armv5te-linux-gnueabi/usr/lib/pkgconfig
export CONFIG_SITE=/opt/ARM/eldk-v553/eldk/armv5te/site-config-armv5te-linux-gnueabi
export CC="arm-linux-gnueabi-gcc -march=armv5te -marm -mthumb-interwork --sysroot=/opt/ARM/eldk-v553/eldk/armv5te/sysroots/armv5te-linux-gnueabi"
export CXX="arm-linux-gnueabi-g++ -march=armv5te -marm -mthumb-interwork --sysroot=/opt/ARM/eldk-v553/eldk/armv5te/sysroots/armv5te-linux-gnueabi"
export CPP="arm-linux-gnueabi-gcc -E -march=armv5te -marm -mthumb-interwork --sysroot=/opt/ARM/eldk-v553/eldk/armv5te/sysroots/armv5te-linux-gnueabi"
export AS="arm-linux-gnueabi-as "
export LD="arm-linux-gnueabi-ld --sysroot=/opt/ARM/eldk-v553/eldk/armv5te/sysroots/armv5te-linux-gnueabi"
export GDB=arm-linux-gnueabi-gdb
export STRIP=arm-linux-gnueabi-strip
export RANLIB=arm-linux-gnueabi-ranlib
export OBJCOPY=arm-linux-gnueabi-objcopy
export OBJDUMP=arm-linux-gnueabi-objdump
export AR=arm-linux-gnueabi-ar
export NM=arm-linux-gnueabi-nm
export M4=m4
export TARGET_PREFIX=arm-linux-gnueabi-
export CONFIGURE_FLAGS="--target=arm-linux-gnueabi --host=arm-linux-gnueabi --build=i686-linux --with-libtool-sysroot=/opt/ARM/eldk-v553/eldk/armv5te/sysroots/armv5te-linux-gnueabi"
export CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types"
export CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types -fpermissive"
export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
export CPPFLAGS=""
export OECORE_NATIVE_SYSROOT="/opt/ARM/eldk-v553/eldk/armv5te/sysroots/i686-eldk-linux"
export OECORE_TARGET_SYSROOT="/opt/ARM/eldk-v553/eldk/armv5te/sysroots/armv5te-linux-gnueabi"
export OECORE_ACLOCAL_OPTS="-I /opt/ARM/eldk-v553/eldk/armv5te/sysroots/i686-eldk-linux/usr/share/aclocal"
export OECORE_DISTRO_VERSION="5.5.3"
export OECORE_SDK_VERSION="5.5.3"
export PYTHONHOME=/opt/ARM/eldk-v553/eldk/armv5te/sysroots/i686-eldk-linux/usr
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabi-
終了後、GIT から U-boot ソースをダウンロードし、EA3141 ボードの構成を追加するために uboot にパッチを適用し、make を使用してクロスコンパイルを開始しました。エラーが発生しました:
make EA3131_config
Configuring for ea31xx board...
[ziga@Ziga-laptop u-boot]$ make
Generating include/autoconf.mk
Generating include/autoconf.mk.dep
for dir in tools examples/standalone examples/api ; do make -C $dir _depend ; done
make[1]: Entering directory '/opt/ARM/u-boot/tools'
make[1]: Nothing to be done for '_depend'.
make[1]: Leaving directory '/opt/ARM/u-boot/tools'
make[1]: Entering directory '/opt/ARM/u-boot/examples/standalone'
make[1]: Nothing to be done for '_depend'.
make[1]: Leaving directory '/opt/ARM/u-boot/examples/standalone'
make[1]: Entering directory '/opt/ARM/u-boot/examples/api'
make[1]: Nothing to be done for '_depend'.
make[1]: Leaving directory '/opt/ARM/u-boot/examples/api'
make -C tools all
make[1]: Entering directory '/opt/ARM/u-boot/tools'
gcc -g -Wall -idirafter /opt/ARM/u-boot/include -idirafter /opt/ARM/u-boot/include2 -idirafter /opt/ARM/u-boot/include -I /opt/ARM/u-boot/libfdt -I /opt/ARM/u-boot/tools -DTEXT_BASE=0x33600000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -c -o env_embedded.o /opt/ARM/u-boot/common/env_embedded.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /opt/ARM/u-boot/include -idirafter /opt/ARM/u-boot/include2 -idirafter /opt/ARM/u-boot/include -I /opt/ARM/u-boot/libfdt -I /opt/ARM/u-boot/tools -DTEXT_BASE=0x33600000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -o envcrc crc32.o env_embedded.o envcrc.o sha1.o
gcc -g -Wall -idirafter /opt/ARM/u-boot/include -idirafter /opt/ARM/u-boot/include2 -idirafter /opt/ARM/u-boot/include -I /opt/ARM/u-boot/libfdt -I /opt/ARM/u-boot/tools -DTEXT_BASE=0x33600000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -c -o default_image.o /opt/ARM/u-boot/tools/default_image.c
gcc -g -Wall -idirafter /opt/ARM/u-boot/include -idirafter /opt/ARM/u-boot/include2 -idirafter /opt/ARM/u-boot/include -I /opt/ARM/u-boot/libfdt -I /opt/ARM/u-boot/tools -DTEXT_BASE=0x33600000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -c -o fit_image.o /opt/ARM/u-boot/tools/fit_image.c
gcc -g -Wall -idirafter /opt/ARM/u-boot/include -idirafter /opt/ARM/u-boot/include2 -idirafter /opt/ARM/u-boot/include -I /opt/ARM/u-boot/libfdt -I /opt/ARM/u-boot/tools -DTEXT_BASE=0x33600000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -c -o image.o /opt/ARM/u-boot/common/image.c
gcc -g -Wall -idirafter /opt/ARM/u-boot/include -idirafter /opt/ARM/u-boot/include2 -idirafter /opt/ARM/u-boot/include -I /opt/ARM/u-boot/libfdt -I /opt/ARM/u-boot/tools -DTEXT_BASE=0x33600000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -c -o kwbimage.o /opt/ARM/u-boot/tools/kwbimage.c
/opt/ARM/u-boot/tools/kwbimage.c: In function ‘kwbimage_verify_header’:
/opt/ARM/u-boot/tools/kwbimage.c:350:10: warning: variable ‘calc_exthdrcsum’ set but not used [-Wunused-but-set-variable]
uint8_t calc_exthdrcsum;
^
gcc -g -Wall -idirafter /opt/ARM/u-boot/include -idirafter /opt/ARM/u-boot/include2 -idirafter /opt/ARM/u-boot/include -I /opt/ARM/u-boot/libfdt -I /opt/ARM/u-boot/tools -DTEXT_BASE=0x33600000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -c -o mkimage.o /opt/ARM/u-boot/tools/mkimage.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /opt/ARM/u-boot/include -idirafter /opt/ARM/u-boot/include2 -idirafter /opt/ARM/u-boot/include -I /opt/ARM/u-boot/libfdt -I /opt/ARM/u-boot/tools -DTEXT_BASE=0x33600000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -o mkimage crc32.o default_image.o fit_image.o image.o kwbimage.o md5.o mkimage.o os_support.o sha1.o fdt.o fdt_ro.o fdt_rw.o fdt_strerror.o fdt_wip.o
strip mkimage
make[1]: Leaving directory '/opt/ARM/u-boot/tools'
make -C examples/standalone all
make[1]: Entering directory '/opt/ARM/u-boot/examples/standalone'
arm-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x33600000 -I/opt/ARM/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/ARM/eldk-v553/eldk/armv5te/sysroots/i686-eldk-linux/usr/bin/arm-linux-gnueabi/../../lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.8.1/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5te -Wall -Wstrict-prototypes -fno-stack-protector -o hello_world.o hello_world.c -c
arm-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x33600000 -I/opt/ARM/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/ARM/eldk-v553/eldk/armv5te/sysroots/i686-eldk-linux/usr/bin/arm-linux-gnueabi/../../lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.8.1/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5te -Wall -Wstrict-prototypes -fno-stack-protector -o atmel_df_pow2.o atmel_df_pow2.c -c
arm-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x33600000 -I/opt/ARM/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/ARM/eldk-v553/eldk/armv5te/sysroots/i686-eldk-linux/usr/bin/arm-linux-gnueabi/../../lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.8.1/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5te -Wall -Wstrict-prototypes -fno-stack-protector -o stubs.o stubs.c -c
arm-linux-gnueabi-ar crv libstubs.a stubs.o
r - stubs.o
arm-linux-gnueabi-ld -g -Ttext 0xc100000 \
-o hello_world -e hello_world hello_world.o libstubs.a \
-L. -lgcc
arm-linux-gnueabi-ld: cannot find -lgcc
Makefile:83: recipe for target 'hello_world' failed
make[1]: *** [hello_world] Error 1
make[1]: Leaving directory '/opt/ARM/u-boot/examples/standalone'
Makefile:364: recipe for target 'examples/standalone' failed
make: *** [examples/standalone] Error 2
-L
問題は、値を持つパラメーターにあり.
、現在のフォルダーに gcc がないと仮定します。-L
ライブラリが U-boot 内のどこに保存されているかを誰かが知っている場合の値は何ですか? どのメイクファイルでこの L パラメータを修正する必要がありますか? たくさんあります...