Installation issue in u500 tool chain


#1

enthu.bee@CI7W10P041803 ~/freedom/dtc-1.4.7
$ HOME=/usr make install
CHK version_gen.h
CHK version_gen.h
PYMOD pylibfdt/_libfdt.so
mv: cannot stat ‘_libfdt.so’: No such file or directory
make[1]: *** [pylibfdt/Makefile.pylibfdt:17: pylibfdt/_libfdt.so] Error 1
make: *** [Makefile:149: maybe_pylibfdt] Error 2
[1]+ Done tar xzf dtc-1.4.7.tar.gz (wd: ~/freedom)
(wd now: ~/freedom/dtc-1.4.7)

Above is my log of the installation
Installation procedure: Build Sifive freedom in Windows 10 64bit + cygwin
please guide.


(Jim Wilson) #2

We use cross compilers to build the windows toolchain on Ubuntu. I don’t have a windows development machine, so I can’t easily support windows native builds.

We have toolchain binaries on our web site, visit https://www.sifive.com/boards and then scroll down to the software section. We have Freedom Studio if you want a GUI (ecplise) based toolchain, or GNU Embedded Toolchain if you want a command line toolchain.

However, you said “u500 tool chain” in the title which implies that you want a linux toolchain, and freedom-tools is our embedded toolchain. If you want a linux compiler, and have a Freeom Unleashed board, then you want to put a real OS on the board, and then use “sudo apt install gcc” or equivalent depending on which OS you use. Linux cross compilers are tricky, you need to use the same glibc version configured the same way, or the code produced by the cross compiler won’t run on the target.
The system that ships with the board is a minimal buildroot based system which isn’t useful for much. This was built from the legacy v1_0 branch of sifive/freedom-u-sdk. You can get a cross compiler that matches the target if you build this. But it is really best if you replace the system with something more useful. Current master sifive/freedom-u-sdk is a much more useful system with u-boot support that allows you to boot into different rootfs on different partitions. This includes a debian rootfs that you can install on the second SDcard partition and boot into, and that will give you a native compiler which is easier to use than a cross compiler. You may need to edit the uEnv.txt file on the first SDcard partition to enable a debian boot, as it boots into the buildroot initramfs by default.

I don’t know if anyone has ever tried to build freedom-u-sdk on a windows machine. Probably not. And we don’t have convenient prebuilt copies of it. You could try using the Windows Subsystem for Linux (WSL) and installing Ubuntu 16.04 in it.