Skip to content
Antony Pavlov edited this page Mar 30, 2020 · 4 revisions

BUILD HOWTO

On Debian 10 Linux:

$ sudo apt-get install -y make gcc flex bison gcc-riscv64-linux-gnu
$ git clone -b 20200330.litex-vexriscv-linux https://github.com/litex-hub/barebox
$ cd barebox
$ make ARCH=riscv litex_linux_defconfig
$ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-

You can use compiler recommended by litex:

$ wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-linux-ubuntu14.tar.gz
$ tar -xvf riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-linux-ubuntu14.tar.gz
$ make ARCH=riscv CROSS_COMPILE=$PWD/riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-

As a result barebox.bin file will be obtained.

Copy barebox.bin into boot.bin file in the root directory of your tftp server.

Build bitstream file for ARTY board:

cd litex/litex/boards/targets/
./arty.py --with-ethernet --cpu-type vexriscv --cpu-variant linux

Load bitstream file into board and see this boot log:

--============== Boot ==================--
Booting from serial...
Press Q or ESC to abort boot completely
sL5DdSMmkekro
             Timeout
Booting from network...
Local IP : 192.168.1.50
Remote IP: 192.168.1.100
Fetching from: UDP/69
Downloaded 9700 bytes from Image over TFTP to 0xc0000000
Unable to download rootfs.cpio over TFTP
No rootfs.cpio found
Unable to download Linux images, falling back to boot.bin
Downloaded 288620 bytes from boot.bin over TFTP to 0xc0000000
Executing booted program at 0xc0000000

--============= Liftoff! ===============--
main_entry()
main_entry1()
main_entry2()
Switch to console [cs0]


barebox 2020.03.0-00248-g03b7b8e23 #2 Mon Mar 30 16:56:38 UTC 2020


Board: LiteX VexRiscV-SoC-Linux
eth0: got preset MAC address: 00:f0:ff:ff:20:71
liteeth f0004000.mac@f0003800.of: liteeth driver registered
netconsole: registered as netconsole-1
Warning: Using dummy clocksource
malloc space: 0xc4100000 -> 0xc4ffffff (size 15 MiB)

Hit any to stop autoboot:    0
Clone this wiki locally