A20 Lime - Installing toolchain in Fedora

Started by gburza, December 05, 2015, 11:49:35 PM

Previous topic - Next topic

gburza

Hello!
I'm trying to build bootable Debian SD card using my Fedora 23 (32-bit) and I have encountered a problem:
I did:
yum install gcc-4.7-arm-linux-gnueabihf ncurses-dev uboot-mkimage build-essential git
and it gave me:
No package gcc-4.7-arm-linux-gnueabihf available.
No package ncurses-dev available.
No package uboot-mkimage available.
No package build-essential available.
Package git-2.5.0-3.fc23.i686 is already installed, skipping


But I googled that toolchain can also be set up with:
yum install gcc-arm-linux-gnu
source

which actually doesn't solve my problem
as I try to build u-boot with:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
I get:
/bin/sh: arm-linux-gnueabihf-gcc: command not found
/home/gburza/a20-olimex/u-boot-sunxi/./Kbuild:34: recipe for target 'lib/asm-offsets.s' failed
make[1]: *** [lib/asm-offsets.s] Error 127
Makefile:1006: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2


I can't really find how to do this, so if there's anyone with knowledge, I will listen carefully!  :)


mMerlin

For Fedora 22 and later, you should use dnf instead of yum but the rest is the generally the same.
ncurses-devel
uboot-tools

Tab completion works pretty good.  Typing
yum install ncurses-d«tab»
will generally show available matches.  Works as long as the first part is valid.

More you may need later
libusb libusbx-devel libcurl-devel

You found the alternate toolchain information, but did not follow that through to the actual build.  You need to use

CROSS_COMPILE=CROSS_COMPILE=arm-linux-gnu-

at least for Fedora 21 and 22.  That got a working linux bootable sd card for me using Fedora 20.  From my related experience with (see https://www.olimex.com/forum/index.php?topic=4933.0), the legacy U-Boot and sunxi 3.4 kernel can not be compiled with anything newer than gcc4.x.  Fedora 22 has gcc5.  I assume Fedora 23 will be at least gcc5 as well.  You will need to get (download and build) a separate gcc4.x to do the build.  The mainline U-Boot and kernel compile fine with gcc5, but (as per referenced post) I have other issues apparently with the rootfs and/or config flags doing that.