最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】uboot make error -> arm-linux-ld: BFD 2.15 assertion fail + /bin/bash: line 1: 8974 段错误 + make: *** [u-boot] 错误 139

工作和技术 crifan 3735浏览 0评论

【已解决】uboot make error -> arm-linux-ld: BFD 2.15 assertion fail + /bin/bash: line 1:  8974 段错误 + make: *** [u-boot] 错误 139

【问题】
环境:uboot 2011.03,交叉编译,编译器是软浮点的3.4.5,版本信息为:
[email protected]:~/develop/tq2440/uboot/u-boot-2011.03-crl2440$ /opt/EmbedSky/crosstools_3.4.5_softfloat/gcc-3.4.5-glibc-2.3.6/arm-linux/bin/arm-linux-gcc -v
Reading specs from /opt/EmbedSky/crosstools_3.4.5_softfloat/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5/specs
Configured with: /opt/crosstool/crosstool-0.43/build/arm-linux/gcc-3.4.5-glibc-2.3.6/gcc-3.4.5/configure –target=arm-linux –host=i686-host_pc-linux-gnu –prefix=/opt/EmbedSky/crosstools_3.4.5_softfloat/gcc-3.4.5-glibc-2.3.6/arm-linux –with-float=soft –with-headers=/opt/EmbedSky/crosstools_3.4.5_softfloat/gcc-3.4.5-glibc-2.3.6/arm-linux/arm-linux/include –with-local-prefix=/opt/EmbedSky/crosstools_3.4.5_softfloat/gcc-3.4.5-glibc-2.3.6/arm-linux/arm-linux –disable-nls –enable-threads=posix –enable-symvers=gnu –enable-__cxa_atexit –enable-languages=c,c++ –enable-shared –enable-c99 –enable-long-long
Thread model: posix
gcc version 3.4.5


编译uboot 2011.03的时候,最后一步出错:
UNDEF_SYM=`arm-linux-objdump -x board/samsung/crl2440/libcrl2440.o api/libapi.o arch/arm/cpu/arm920t/libarm920t.o arch/arm/cpu/arm920t/s3c24x0/libs3c24x0.o arch/arm/lib/libarm.o common/libcommon.o disk/libdisk.o drivers/bios_emulator/libatibiosemu.o drivers/block/libblock.o drivers/dma/libdma.o drivers/fpga/libfpga.o drivers/gpio/libgpio.o drivers/hwmon/libhwmon.o drivers/i2c/libi2c.o drivers/input/libinput.o drivers/misc/libmisc.o drivers/mmc/libmmc.o drivers/mtd/libmtd.o drivers/mtd/nand/libnand.o drivers/mtd/onenand/libonenand.o drivers/mtd/spi/libspi_flash.o drivers/mtd/ubi/libubi.o drivers/net/libnet.o drivers/net/phy/libphy.o drivers/pci/libpci.o drivers/pcmcia/libpcmcia.o drivers/power/libpower.o drivers/rtc/librtc.o drivers/serial/libserial.o drivers/spi/libspi.o drivers/twserial/libtws.o drivers/usb/eth/libusb_eth.a drivers/usb/gadget/libusb_gadget.o drivers/usb/host/libusb_host.o drivers/usb/musb/libusb_musb.o drivers/usb/phy/libusb_phy.o drivers/video/libvideo.o drivers/watchdog/libwatchdog.o fs/cramfs/libcramfs.o fs/ext2/libext2fs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o fs/reiserfs/libreiserfs.o fs/ubifs/libubifs.o fs/yaffs2/libyaffs2.o lib/libfdt/libfdt.o lib/libgeneric.o lib/lzma/liblzma.o lib/lzo/liblzo.o net/libnet.o post/libpost.o | sed  -n -e ‘s/.*(__u_boot_cmd_.*)/-u1/p’|sort|uniq`; cd /home/crifan/develop/tq2440/uboot/u-boot-2011.03-crl2440 && arm-linux-ld  -pie -T u-boot.lds -Bstatic -Ttext 0x33F80000 $UNDEF_SYM arch/arm/cpu/arm920t/start.o –start-group api/libapi.o arch/arm/cpu/arm920t/libarm920t.o arch/arm/cpu/arm920t/s3c24x0/libs3c24x0.o arch/arm/lib/libarm.o common/libcommon.o disk/libdisk.o drivers/bios_emulator/libatibiosemu.o drivers/block/libblock.o drivers/dma/libdma.o drivers/fpga/libfpga.o drivers/gpio/libgpio.o drivers/hwmon/libhwmon.o drivers/i2c/libi2c.o drivers/input/libinput.o drivers/misc/libmisc.o drivers/mmc/libmmc.o drivers/mtd/libmtd.o drivers/mtd/nand/libnand.o drivers/mtd/onenand/libonenand.o drivers/mtd/spi/libspi_flash.o drivers/mtd/ubi/libubi.o drivers/net/libnet.o drivers/net/phy/libphy.o drivers/pci/libpci.o drivers/pcmcia/libpcmcia.o drivers/power/libpower.o drivers/rtc/librtc.o drivers/serial/libserial.o drivers/spi/libspi.o drivers/twserial/libtws.o drivers/usb/eth/libusb_eth.a drivers/usb/gadget/libusb_gadget.o drivers/usb/host/libusb_host.o drivers/usb/musb/libusb_musb.o drivers/usb/phy/libusb_phy.o drivers/video/libvideo.o drivers/watchdog/libwatchdog.o fs/cramfs/libcramfs.o fs/ext2/libext2fs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o fs/reiserfs/libreiserfs.o fs/ubifs/libubifs.o fs/yaffs2/libyaffs2.o lib/libfdt/libfdt.o lib/libgeneric.o lib/lzma/liblzma.o lib/lzo/liblzo.o net/libnet.o post/libpost.o board/samsung/crl2440/libcrl2440.o –end-group -L /opt/EmbedSky/crosstools_3.4.5_softfloat/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5 -lgcc -Map u-boot.map -o u-boot
/bin/bash: line 1:  8974 段错误               arm-linux-ld -pie -T u-boot.lds -Bstatic -Ttext 0x33F80000 $UNDEF_SYM arch/arm/cpu/arm920t/start.o –start-group api/libapi.o arch/arm/cpu/arm920t/libarm920t.o arch/arm/cpu/arm920t/s3c24x0/libs3c24x0.o arch/arm/lib/libarm.o common/libcommon.o disk/libdisk.o drivers/bios_emulator/libatibiosemu.o drivers/block/libblock.o drivers/dma/libdma.o drivers/fpga/libfpga.o drivers/gpio/libgpio.o drivers/hwmon/libhwmon.o drivers/i2c/libi2c.o drivers/input/libinput.o drivers/misc/libmisc.o drivers/mmc/libmmc.o drivers/mtd/libmtd.o drivers/mtd/nand/libnand.o drivers/mtd/onenand/libonenand.o drivers/mtd/spi/libspi_flash.o drivers/mtd/ubi/libubi.o drivers/net/libnet.o drivers/net/phy/libphy.o drivers/pci/libpci.o drivers/pcmcia/libpcmcia.o drivers/power/libpower.o drivers/rtc/librtc.o drivers/serial/libserial.o drivers/spi/libspi.o drivers/twserial/libtws.o drivers/usb/eth/libusb_eth.a drivers/usb/gadget/libusb_gadget.o drivers/usb/host/libusb_host.o drivers/usb/musb/libusb_musb.o drivers/usb/phy/libusb_phy.o drivers/video/libvideo.o drivers/watchdog/libwatchdog.o fs/cramfs/libcramfs.o fs/ext2/libext2fs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o fs/reiserfs/libreiserfs.o fs/ubifs/libubifs.o fs/yaffs2/libyaffs2.o lib/libfdt/libfdt.o lib/libgeneric.o lib/lzma/liblzma.o lib/lzo/liblzo.o net/libnet.o post/libpost.o board/samsung/crl2440/libcrl2440.o –end-group -L /opt/EmbedSky/crosstools_3.4.5_softfloat/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5 -lgcc -Map u-boot.map -o u-boot
make: *** [u-boot] 错误 139

除此之前,其中编译过程中,前面还遇到arm-linux-ld: BFD 2.15 assertion fail的问题。

【解决过程】
关于BFD 2.15 assertion fail的问题,网上找了一番,看到这个帖子里说的的:
http://topic.csdn.net/u/20090806/22/d88226a6-e6c9-49d9-802e-4ef19b4bf86f.html
提到说编译器太老,所以我这里去换另外一个4.3.3版本的编译器试试:
[email protected]:~/develop/tq2440/uboot/u-boot-2011.03-crl2440$ /opt/EmbedSky/4.3.3/bin/arm-linux-gcc -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /scratch/maxim/arm-lite/src-4.3-arm-none-linux-gnueabi-lite/gcc-4.3/configure –build=i686-pc-linux-gnu –host=i686-pc-linux-gnu –target=arm-none-linux-gnueabi –enable-threads –disable-libmudflap –disable-libssp –disable-libstdcxx-pch –with-gnu-as –with-gnu-ld –with-specs=’%{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables}’ –enable-languages=c,c++ –enable-shared –enable-symvers=gnu –enable-__cxa_atexit –with-pkgversion=’Sourcery G++ Lite 2009q1-176′ –with-bugurl=https://support.codesourcery.com/GNUToolchain/ –disable-nls –prefix=/opt/codesourcery –with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc –with-build-sysroot=/scratch/maxim/arm-lite/install-4.3-arm-none-linux-gnueabi-lite/arm-none-linux-gnueabi/libc –with-gmp=/scratch/maxim/arm-lite/obj-4.3-arm-none-linux-gnueabi-lite/host-libs-2009q1-176-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr –with-mpfr=/scratch/maxim/arm-lite/obj-4.3-arm-none-linux-gnueabi-lite/host-libs-2009q1-176-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr –disable-libgomp –enable-poison-system-directories –with-build-time-tools=/scratch/maxim/arm-lite/install-4.3-arm-none-linux-gnueabi-lite/arm-none-linux-gnueabi/bin –with-build-time-tools=/scratch/maxim/arm-lite/install-4.3-arm-none-linux-gnueabi-lite/arm-none-linux-gnueabi/bin
Thread model: posix
gcc version 4.3.3 (Sourcery G++ Lite 2009q1-176)

然后再编译,Uboot就可以正常编译通过了,看来的确是编译器方面的不兼容等问题。

转载请注明:在路上 » 【已解决】uboot make error -> arm-linux-ld: BFD 2.15 assertion fail + /bin/bash: line 1: 8974 段错误 + make: *** [u-boot] 错误 139

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (2)

  1. 请教下博主,关于这个网页https://github.com/ckuethe/usbarmory/wiki/QEMU-Virtual-Armory中编译uBoot的部分Compile uBoot中它需要以下配置 $vi include/configs/vexpress_common.h # add CONFIG_RSA, CONFIG_FIT_SIGNATURE, CONFIG_CMD_EXT2 # change the environment config to point to MMC # fix compiled-in config # maybe disable environment manipulation? # maybe change TEXT_BASE, or use mkimage to allow loading by "qemu -bios"? 这五项配置请问在哪里找啊,在include/configs/vexpress_common.h文件里没看见啊,在make menuconfig中也没找到相应的项
    Tgn7年前 (2015-07-19)回复
    • UBOOT中本来就没有menuconfig啊。而只有:自己修改对应的配置文件,一般就是include/configs/your_board_config_file.h,修改添加对应的配置选择即可。比如CONFIG_CMD_EXT2,就是添加对于EXT2文件系统的支持。 include/configs/vexpress_common.h中没有的话,(本来就)是正常的,就是需要你去添加这些配置的。 关于如何添加,以CONFIG_CMD_EXT2为例: 我去搜 CONFIG_CMD_EXT2 然后搜到: https://git.linaro.org/?p=boot/u-boot-linaro-stable.git;a=commitdiff_plain;h=9a63b7f4f8f3c99cf017e0d3d4a152dfcd913b5a https://github.com/jsoriano/beaglebone-tools/blob/master/patches/u-boot/0001-enable-bootz-and-generic-load-features.patch 等等。 就可以看到,是这样写的: #define CONFIG_CMD_EXT2 就可以了。 其他的选项,你自己照葫芦画瓢,好好研究研究即可。
      crifan7年前 (2015-07-20)回复
89 queries in 0.126 seconds, using 20.62MB memory