Skip to content

Instantly share code, notes, and snippets.

@pcotret
Last active March 11, 2024 06:42
Show Gist options
  • Save pcotret/11afe52a1834172981c1e371b8bdcf03 to your computer and use it in GitHub Desktop.
Save pcotret/11afe52a1834172981c1e371b8bdcf03 to your computer and use it in GitHub Desktop.
git clone https://github.com/chipsalliance/rocket-tools
cd rocket-tools
# Hash given in the rocket-chip repository (1.6 release)
git checkout e2c6d1577a75f506fe992c3eb20a75174504476e
# Replace git repo with https alternative
git submodule set-url fsf-binutils-gdb https://sourceware.org/git/binutils-gdb.git
git submodule sync
# Update GNU toolchain
git submodule update --init riscv-gnu-toolchain
cd riscv-gnu-toolchain
# Replace git repo with https alternative
git submodule set-url riscv-qemu https://github.com/riscv/riscv-qemu.git
git submodule sync
git submodule update --init riscv-qemu
cd riscv-qemu
# Replace git repos with https alternatives
git submodule set-url roms/vgabios https://git.qemu.org/git/vgabios.git
git submodule set-url roms/seabios https://git.qemu.org/git/seabios.git
git submodule set-url roms/SLOF https://git.qemu.org/git/SLOF.git
git submodule set-url roms/ipxe https://git.qemu.org/git/ipxe.git
git submodule set-url roms/openbios https://git.qemu.org/git/openbios.git
git submodule set-url roms/openhackware https://git.qemu.org/git/openhackware.git
git submodule set-url roms/qemu-palcode https://github.com/rth7680/qemu-palcode.git
git submodule set-url roms/sgabios https://git.qemu.org/git/sgabios.git
git submodule set-url pixman https://gitlab.freedesktop.org/pixman/pixman
git submodule set-url dtc https://git.qemu.org/git/dtc.git
git submodule set-url roms/u-boot https://git.qemu.org/git/u-boot.git
git submodule sync
cd ../..
git submodule update --init --recursive --progress
export RISCV=/path/to/install/riscv/toolchain
./build.sh
@pcotret
Copy link
Author

pcotret commented Jan 16, 2023

From my experiments, a software setup working to compile the Rocket Chip, 1.6 release (everything by default in a Ubuntu 20.04LTS) :

@KyleJeong
Copy link

I tried in Ubuntu 22.04LTS. I didn't tried to change the version of bison/gcc/python. They are newer version than @pcotret mentioned.
And I failed

Starting RISC-V Toolchain build process

autoreconf: error: configure.ac: AC_INIT not found; not an autoconf script?

I met this error message. I just share the information for other users.

@pcotret
Copy link
Author

pcotret commented Apr 6, 2023

Hi @KyleJeong !
It seems to be an autoconf error, don't you think?
Which version do you use ? (autoconf 2.69 in my case)

@KyleJeong
Copy link

I agree with you. I used this version.

autoconf (GNU Autoconf) 2.71

@KyleJeong
Copy link

I tried latest rocket-tools in the same environment (Ubuntu 22.04LTS). It compiled successfully.
My conclusion is that we have to use Ubuntu 20.04 for rocket-tool 1.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment