View previous topic :: View next topic |
Author |
Message |
mcc2 n00b
Joined: 06 Sep 2012 Posts: 25
|
Posted: Thu Sep 06, 2012 10:33 pm Post subject: Compiling U-Boot for beaglebone on Gentoo (arm7a) fails... |
|
|
Hi,
I am trying U-Boot from git by myself and followed this
http://dev.gentoo.org/~armin76/arm/beaglebone/install.xml
instructions.
The compilation fails with:
armv7a-unknown-linux-gnueabi-gcc -E -g -Os -fno-common -ffixed-r8
-msoft-float -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x80100000
-DCONFIG_SPL_TEXT_BASE=0x402F0400
-I/home/mccramer/data/pools/pool01/BEAGLEBONE-GENTOO/U-BOOT/u-boot-am33x/include
-fno-builtin -ffreestanding -nostdinc -isystem
/usr/lib/gcc/armv7a-unknown-linux-gnueabi/4.6.3/include -pipe -DCONFIG_ARM
-D__ARM__ -march=armv5 -include
/home/mccramer/data/pools/pool01/BEAGLEBONE-GENTOO/U-BOOT/u-boot-am33x/include/u-boot/u-boot.lds.h
-ansi -D__ASSEMBLY__ -P -
</home/mccramer/data/pools/pool01/BEAGLEBONE-GENTOO/U-BOOT/u-boot-am33x/arch/arm/cpu/armv7/u-boot.lds
>u-boot.lds
UNDEF_SYM=`armv7a-unknown-linux-gnueabi-objdump -x
board/ti/am335x/libam335x.o api/libapi.o arch/arm/cpu/armv7/libarmv7.o
arch/arm/cpu/armv7/omap-common/libomap-common.o
arch/arm/cpu/armv7/ti81xx/libti81xx.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.o
drivers/usb/gadget/libusb_gadget.o drivers/usb/host/libusb_host.o
drivers/usb/musb-new/libusb_musb-new.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
lib/zlib/libz.o net/libnet.o post/libpost.o | sed -n -e
's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`; cd
/home/mccramer/data/pools/pool01/BEAGLEBONE-GENTOO/U-BOOT/u-boot-am33x &&
armv7a-unknown-linux-gnueabi-ld -pie -T u-boot.lds -Bstatic -Ttext
0x80100000 $UNDEF_SYM arch/arm/cpu/armv7/start.o --start-group api/libapi.o
arch/arm/cpu/armv7/libarmv7.o
arch/arm/cpu/armv7/omap-common/libomap-common.o
arch/arm/cpu/armv7/ti81xx/libti81xx.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.o
drivers/usb/gadget/libusb_gadget.o drivers/usb/host/libusb_host.o
drivers/usb/musb-new/libusb_musb-new.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
lib/zlib/libz.o net/libnet.o post/libpost.o board/ti/am335x/libam335x.o
--end-group -L /usr/lib/gcc/armv7a-unknown-linux-gnueabi/4.6.3 -lgcc -Map
u-boot.map -o u-boot
/usr/lib/gcc/armv7a-unknown-linux-gnueabi/4.6.3/libgcc.a(_dvmd_lnx.o): In
function `__aeabi_ldiv0':
(.text+0x8): undefined reference to `raise'
armv7a-unknown-linux-gnueabi-ld: BFD (GNU Binutils) 2.22.90.20120727
assertion fail
/var/tmp/portage/cross-armv7a-unknown-linux-gnueabi/binutils-2.22.90/work/binutils-2.22.90/bfd/elf32-arm.c:7677
armv7a-unknown-linux-gnueabi-ld: error: required section '.rel.plt' not
found in the linker script
armv7a-unknown-linux-gnueabi-ld: final link failed: Invalid operation
make: *** [u-boot] Error 1
[1] 18806 exit 2 make -j1 ARCH=arm
CROSS_COMPILE=armv7a-unknown-linux-gnueabi-
...seems to be the final step.
If this is only a temporary bug cause the git conatins some buggy
code...no problem.
If I did something wrong or be able to fix it I would like to know,
what goes wrong...?!?
How can I get/create this ".rel.plt" file ?
Thank you very much in advance for any help !
Best regards,
mcc |
|
Back to top |
|
|
jlpoole Guru
Joined: 01 Nov 2005 Posts: 489 Location: Salem, OR
|
Posted: Fri Sep 07, 2012 2:25 am Post subject: |
|
|
What the hash of your pull? If it's not the same as below, then try the version below which I recently successfully cross compiled:
Code: | commit 5c0406ddff69cd0b3d5271ba5cd98b44eac39c6e
Author: Joel A Fernandes <[xxx]@ti.com>
Date: Thu Aug 9 10:45:09 2012 -0400
AM33XX: boot commands for booting from emmc on mmc1
Signed-off-by: Joel A Fernandes <[xxx]@ti.com>
|
Here's my version of crossdev:
Code: | [I] sys-devel/crossdev
Available versions: 20100814 20101011 20110310 20110705 20110819 ~20111011 20111018 20111118 20111221 ~20120214 ~20120227 ~20120228 ~20120229 ~20120301 20120305 ~20120529 20120531 20120721 **99999999
Installed versions: 20120721(10:20:55 08/24/12)
Homepage: http://www.gentoo.org/
Description: Gentoo Cross-toolchain generator
|
|
|
Back to top |
|
|
mcc2 n00b
Joined: 06 Sep 2012 Posts: 25
|
Posted: Fri Sep 07, 2012 2:47 am Post subject: |
|
|
Hi,
mine is:
[code][I] sys-devel/crossdev
Available versions: 20100814 20101011 20110310 20110705 20110819 ~20111011 20111018 20111118 20111221 ~20120214 ~20120227 ~20120228 ~20120229 ~20120301 20120305 ~20120529 20120531 20120721 **99999999
Installed versions: 20120721(17:01:24 08/20/12)
Homepage: http://www.gentoo.org/
Description: Gentoo Cross-toolchain generator[/code]
from eix point of view it is the same version...
Seems I am out of luck...what can I do next?
Best regards,
mcc |
|
Back to top |
|
|
jlpoole Guru
Joined: 01 Nov 2005 Posts: 489 Location: Salem, OR
|
Posted: Fri Sep 07, 2012 3:11 am Post subject: |
|
|
Just so where closer to apples to apples, would you post the results of:
Code: | .../u-boot-am33x $ git log -1
|
|
|
Back to top |
|
|
mcc2 n00b
Joined: 06 Sep 2012 Posts: 25
|
Posted: Fri Sep 07, 2012 3:54 pm Post subject: |
|
|
Hi jlpoole,
this is the output:
commit 00a64fc1dae7654dbba7c4b1cdba51b557f154fa
Author: Ilya Yanok <ilya.yanok@cogentembedded.com>
Date: Thu Aug 9 02:10:14 2012 +0400
usb-spl: add hack to load SPL via serial
Just for testing.
Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
(unfortunately I am no git-guru yet...)
Best regards,
mcc |
|
Back to top |
|
|
jlpoole Guru
Joined: 01 Nov 2005 Posts: 489 Location: Salem, OR
|
Posted: Fri Sep 07, 2012 4:04 pm Post subject: |
|
|
Try reverting to the version I used and then attempt to compile; the version you have may very well be broken especially since the author noted it was "testing". You'll have to read up on the basics of GIT. |
|
Back to top |
|
|
mcc2 n00b
Joined: 06 Sep 2012 Posts: 25
|
Posted: Fri Sep 07, 2012 4:20 pm Post subject: |
|
|
Hi jlpoole,
git log -1 now produces
commit 5c0406ddff69cd0b3d5271ba5cd98b44eac39c6e
Author: Joel A Fernandes <joelagnel@ti.com>
Date: Thu Aug 9 10:45:09 2012 -0400
AM33XX: boot commands for booting from emmc on mmc1
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
here, but unfortunately the error remains the same...
Any idea, what to try else...?
(with the toolchain I compiled a complete Angstrom image
(rootfs,xfree,windowmanager) so dont think, it is buggy...)
Best regards,
mcc |
|
Back to top |
|
|
jlpoole Guru
Joined: 01 Nov 2005 Posts: 489 Location: Salem, OR
|
Posted: Sat Sep 08, 2012 6:46 am Post subject: |
|
|
My ineptitude with git did not allow me to modify my existing tree, so I started anew and downloaded a fresh image and configured and cross compiled it. It did not appear that the compile successfully ended; however, the u-boot was generated so I'm not arguing with success.
The session (less the entire make.log) can be viewed for the next month at: http://pastebin.com/9P3m6S19
The salient points from my session are:
Code: | git clone git://arago-project.org/git/projects/u-boot-am33x.git
...
make ARCH=arm CROSS_COMPILE=armv7a-unknown-linux-gnueabi- am335x_evm_config
...
make ARCH=arm CROSS_COMPILE=armv7a-unknown-linux-gnueabi- >my_make.log
...
armv7a-unknown-linux-gnueabi-ld: u-boot-spl section `.data' will not fit in region `.sram'
armv7a-unknown-linux-gnueabi-ld: region `.sram' overflowed by 171 bytes
make[1]: *** [/usr/local/src/beagle/u-boot-am33x/spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl.bin] Error 2
...
hermes u-boot-am33x # ls -la
...
-rwxr-xr-x 1 root root 1147822 Sep 7 23:22 u-boot
|
The version I pulled this time (which differs from my previous one) is:
Quote: | commit 00a64fc1dae7654dbba7c4b1cdba51b557f154fa
Author: Ilya Yanok <ilya.yanok@cogentembedded.com>
Date: Thu Aug 9 02:10:14 2012 +0400
usb-spl: add hack to load SPL via serial
Just for testing.
Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com> |
It's possible that before I had errors, but that the u-boot had been built so I ran with it discarding any concern for the fact that the make may not have successfully finished. Sloppy, but I moved forward. |
|
Back to top |
|
|
jlpoole Guru
Joined: 01 Nov 2005 Posts: 489 Location: Salem, OR
|
Posted: Sat Sep 08, 2012 6:54 am Post subject: |
|
|
The error generated from my cross compile against the Yanok commit of Thu Aug 9 02:10:14 2012 differ than the errors at the start of this post.
Question: was u-boot built? My errors seem to appear after-the-build. I'm assuming yours were before u-boot was built.
At any rate, if you do not have u-boot, then kindly replicate what I just did using the Yanok version and paste-bin, then let's ask Mark Frysinger [Vapier] what he thinks we can do to ferret out the discrepancy. The cross compiler should give us the same error messages when run against the same source; that it does not merits investigation and possibly a bug. |
|
Back to top |
|
|
armin76 Retired Dev
Joined: 24 Apr 2006 Posts: 174
|
Posted: Fri Oct 12, 2012 5:12 pm Post subject: |
|
|
Hi all,
I've updated my guide for installing the beaglebone, with all the issues fixed like the u-boot build failures that like you, i also hit...
Hope it helps. |
|
Back to top |
|
|
|