Skip to content

Commit

Permalink
Add package for unknown-linux-gnu RV64IMA.
Browse files Browse the repository at this point in the history
  • Loading branch information
darius-bluespec committed Nov 5, 2018
1 parent 84bf6c5 commit 451e9bd
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 28 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
riscv-tools (20180620+4) unstable; urgency=medium

* Add package for unknown-linux-gnu RV64IMA.

-- Darius Rad <[email protected]> Wed, 31 Oct 2018 14:51:45 -0400

riscv-tools (20180620+3) unstable; urgency=medium

* Add alternatives for /usr/bin/openocd.
Expand Down
15 changes: 15 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,18 @@ Description: Tools for the riscv64-unknown-elf target, rv64im variant
The hardware targeted by these tools is version 2.1 of the User Level
ISA, variant RV64IM. In addition, the Privileged Architecture
version 1.10 is supported.

Package: riscv64-unknown-linux-gnu-rv64ima
Architecture: any
Section: devel
Depends: ${shlibs:Depends}, ${misc:Depends}
#Suggests:
Conflicts: openocd
Description: Tools for the riscv64-unknown-elf target, rv64im variant
This package contains development tools for RISC-V. This package
contains the riscv64-unknown-linux-gnu toolchain, targeting
applications running under Linux with the GNU C library.
.
The hardware targeted by these tools is version 2.1 of the User Level
ISA, variant RV64IMA. In addition, the Privileged Architecture
version 1.10 is supported.
1 change: 1 addition & 0 deletions debian/riscv64-unknown-linux-gnu-rv64ima.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
opt/riscv64-unknown-linux-gnu-*/ opt
29 changes: 29 additions & 0 deletions debian/riscv64-unknown-linux-gnu-rv64ima.links
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-gprof usr/bin/riscv64-unknown-elf-gprof
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-gcov-dump usr/bin/riscv64-unknown-elf-gcov-dump
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-nm usr/bin/riscv64-unknown-elf-nm
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-as usr/bin/riscv64-unknown-elf-as
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-gcov usr/bin/riscv64-unknown-elf-gcov
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-c++ usr/bin/riscv64-unknown-elf-c++
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-ar usr/bin/riscv64-unknown-elf-ar
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-gcc usr/bin/riscv64-unknown-elf-gcc
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-elfedit usr/bin/riscv64-unknown-elf-elfedit
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-readelf usr/bin/riscv64-unknown-elf-readelf
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-ranlib usr/bin/riscv64-unknown-elf-ranlib
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-c++filt usr/bin/riscv64-unknown-elf-c++filt
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-strings usr/bin/riscv64-unknown-elf-strings
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-strip usr/bin/riscv64-unknown-elf-strip
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-addr2line usr/bin/riscv64-unknown-elf-addr2line
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-g++ usr/bin/riscv64-unknown-elf-g++
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-gcc-7.1.1 usr/bin/riscv64-unknown-elf-gcc-7.1.1
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-gcc-ar usr/bin/riscv64-unknown-elf-gcc-ar
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-cpp usr/bin/riscv64-unknown-elf-cpp
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-size usr/bin/riscv64-unknown-elf-size
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-gcc-nm usr/bin/riscv64-unknown-elf-gcc-nm
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-gdb usr/bin/riscv64-unknown-elf-gdb
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-gcc-ranlib usr/bin/riscv64-unknown-elf-gcc-ranlib
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-ld usr/bin/riscv64-unknown-elf-ld
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-objcopy usr/bin/riscv64-unknown-elf-objcopy
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-gcov-tool usr/bin/riscv64-unknown-elf-gcov-tool
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-run usr/bin/riscv64-unknown-elf-run
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-objdump usr/bin/riscv64-unknown-elf-objdump
opt/riscv64-unknown-linux-gnu-rv64ima/bin/riscv64-unknown-elf-ld.bfd usr/bin/riscv64-unknown-elf-ld.bfd
2 changes: 2 additions & 0 deletions debian/riscv64-unknown-linux-gnu-rv64ima.postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
update-alternatives --install /usr/bin/openocd openocd /opt/riscv64-unknown-linux-gnu-rv64ima/bin/openocd 100
2 changes: 2 additions & 0 deletions debian/riscv64-unknown-linux-gnu-rv64ima.prerm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
update-alternatives --remove openocd /opt/riscv64-unknown-linux-gnu-rv64ima/bin/openocd
8 changes: 7 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TOP=$(shell pwd)
PREFIX?=/opt
prefix=$(PREFIX)/riscv32-unknown-elf-rv32im
#PATH:=$(PATH):$(TOP)/debian/tmp/opt/riscv32-unknown-elf-rv32im/bin
PATH:=$(PATH):$(PREFIX)/riscv32-unknown-elf-rv32im/bin:$(PREFIX)/riscv64-unknown-elf-rv64im/bin
PATH:=$(PATH):$(PREFIX)/riscv32-unknown-elf-rv32im/bin:$(PREFIX)/riscv64-unknown-elf-rv64im/bin:$(PREFIX)/riscv64-unknown-linux-gnu-rv64ima/bin

#export DESTDIR=$(TOP)/debian/tmp

Expand All @@ -19,19 +19,25 @@ override_dh_auto_configure:
# cd $(TOP)/riscv-openocd && ./bootstrap
dh_auto_configure -D$(TOP)/riscv-gnu-toolchain -B debian/tmp/riscv32-unknown-elf-rv32im/riscv-gnu-toolchain -- --with-arch=rv32im --prefix=$(PREFIX)/riscv32-unknown-elf-rv32im
dh_auto_configure -D$(TOP)/riscv-gnu-toolchain -B debian/tmp/riscv64-unknown-elf-rv64im/riscv-gnu-toolchain -- --with-arch=rv64im --prefix=$(PREFIX)/riscv64-unknown-elf-rv64im --with-cmodel=medany
dh_auto_configure -D$(TOP)/riscv-gnu-toolchain -B debian/tmp/riscv64-unknown-linux-gnu-rv64ima/riscv-gnu-toolchain -- --with-arch=rv64ima --prefix=$(PREFIX)/riscv64-unknown-linux-gnu-rv64ima --with-cmodel=medany
dh_auto_configure -D$(TOP)/riscv-openocd -B debian/tmp/riscv32-unknown-elf-rv32im/riscv-openocd -- --prefix=$(PREFIX)/riscv32-unknown-elf-rv32im --enable-remote-bitbang --enable-jtag_vpi --disable-werror
dh_auto_configure -D$(TOP)/riscv-openocd -B debian/tmp/riscv64-unknown-elf-rv64im/riscv-openocd -- --prefix=$(PREFIX)/riscv64-unknown-elf-rv64im --enable-remote-bitbang --enable-jtag_vpi --disable-werror
dh_auto_configure -D$(TOP)/riscv-openocd -B debian/tmp/riscv64-unknown-linux-gnu-rv64ima/riscv-openocd -- --prefix=$(PREFIX)/riscv64-unknown-linux-gnu-rv64ima --enable-remote-bitbang --enable-jtag_vpi --disable-werror

override_dh_auto_build:
dh_auto_build -B debian/tmp/riscv32-unknown-elf-rv32im/riscv-gnu-toolchain
dh_auto_build -B debian/tmp/riscv64-unknown-elf-rv64im/riscv-gnu-toolchain
dh_auto_build -B debian/tmp/riscv64-unknown-linux-gnu-rv64ima/riscv-gnu-toolchain
dh_auto_build -B debian/tmp/riscv32-unknown-elf-rv32im/riscv-openocd
$(MAKE) -C debian/tmp/riscv32-unknown-elf-rv32im/riscv-openocd install
dh_auto_build -B debian/tmp/riscv64-unknown-elf-rv64im/riscv-openocd
$(MAKE) -C debian/tmp/riscv64-unknown-elf-rv64im/riscv-openocd install
dh_auto_build -B debian/tmp/riscv64-unknown-linux-gnu-rv64ima/riscv-openocd
$(MAKE) -C debian/tmp/riscv64-unknown-linux-gnu-rv64ima/riscv-openocd install

override_dh_install:
mkdir -p debian/tmp/opt
cp -a $(PREFIX)/riscv32-unknown-elf-rv32im debian/tmp/opt/
cp -a $(PREFIX)/riscv64-unknown-elf-rv64im debian/tmp/opt/
cp -a $(PREFIX)/riscv64-unknown-linux-gnu-rv64ima debian/tmp/opt/
dh_install
64 changes: 37 additions & 27 deletions riscv-tools.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
% GNU Tools for RISC-V RV32IM
% Bluespec, Inc. <[email protected]>
% 2018-08-28
% 2018-10-31

<!--
generate html with:
pandoc -s -f markdown -t html -o riscv-tools.html riscv-tools.md
-->

This pages describes the OS packages of the GNU tools (binutils, gcc,
OpenOCD, etc.) targeting RISC-V RV32IM.
OpenOCD, etc.) targeting various RISC-V configurations.

# Determine Your Operating System

Expand Down Expand Up @@ -82,7 +82,7 @@ or `i686`, indicating 32-bit.

Note that this is the architecture of the host. There are packages
for both 32-bit and 64-bit target architectures (RV32IM and RV64IM,
respectively).
respectively), for bare metal and GNU/Linux.

# Download the Installation Package

Expand All @@ -91,36 +91,46 @@ download the package appropriate for your system from one of the links
below:

* Debian 9 (stretch)
* [rv32im target on amd64 host](stretch/riscv32-unknown-elf-rv32im_20180620+3_amd64.deb)
* [rv32im target on i386 host](stretch/riscv32-unknown-elf-rv32im_20180620+3_i386.deb)
* [rv64im target on amd64 host](stretch/riscv64-unknown-elf-rv64im_20180620+3_amd64.deb)
* [rv64im target on i386 host](stretch/riscv64-unknown-elf-rv64im_20180620+3_i386.deb)
* [rv32im bare metal target on amd64 host](stretch/riscv32-unknown-elf-rv32im_20180620+4_amd64.deb)
* [rv32im bare metal target on i386 host](stretch/riscv32-unknown-elf-rv32im_20180620+4_i386.deb)
* [rv64im bare metal target on amd64 host](stretch/riscv64-unknown-elf-rv64im_20180620+4_amd64.deb)
* [rv64im bare metal target on i386 host](stretch/riscv64-unknown-elf-rv64im_20180620+4_i386.deb)
* [rv64ima GNU/Linux target on amd64 host](stretch/riscv64-unknown-linux-gnu-rv64ima_20180620+4_amd64.deb)
* [rv64ima GNU/Linux target on i386 host](stretch/riscv64-unknown-linux-gnu-rv64ima_20180620+4_i386.deb)
* Debian 8 (jessie)
* [rv32im target on amd64 host](jessie/riscv32-unknown-elf-rv32im_20180620+3_amd64.deb)
* [rv32im target on i386 host](jessie/riscv32-unknown-elf-rv32im_20180620+3_i386.deb)
* [rv64im target on amd64 host](jessie/riscv64-unknown-elf-rv64im_20180620+3_amd64.deb)
* [rv64im target on i386 host](jessie/riscv64-unknown-elf-rv64im_20180620+3_i386.deb)
* [rv32im bare metal target on amd64 host](jessie/riscv32-unknown-elf-rv32im_20180620+4_amd64.deb)
* [rv32im bare metal target on i386 host](jessie/riscv32-unknown-elf-rv32im_20180620+4_i386.deb)
* [rv64im bare metal target on amd64 host](jessie/riscv64-unknown-elf-rv64im_20180620+4_amd64.deb)
* [rv64im bare metal target on i386 host](jessie/riscv64-unknown-elf-rv64im_20180620+4_i386.deb)
* [rv64ima GNU/Linux target on amd64 host](jessie/riscv64-unknown-linux-gnu-rv64ima_20180620+4_amd64.deb)
* [rv64ima GNU/Linux target on i386 host](jessie/riscv64-unknown-linux-gnu-rv64ima_20180620+4_i386.deb)
* Ubuntu 18.04 LTS (bionic)
* [rv32im target on amd64 host](bionic/riscv32-unknown-elf-rv32im_20180620+3_amd64.deb)
* [rv32im target on i386 host](bionic/riscv32-unknown-elf-rv32im_20180620+3_i386.deb)
* [rv64im target on amd64 host](bionic/riscv64-unknown-elf-rv64im_20180620+3_amd64.deb)
* [rv64im target on i386 host](bionic/riscv64-unknown-elf-rv64im_20180620+3_i386.deb)
* [rv32im bare metal target on amd64 host](bionic/riscv32-unknown-elf-rv32im_20180620+4_amd64.deb)
* [rv32im bare metal target on i386 host](bionic/riscv32-unknown-elf-rv32im_20180620+4_i386.deb)
* [rv64im bare metal target on amd64 host](bionic/riscv64-unknown-elf-rv64im_20180620+4_amd64.deb)
* [rv64im bare metal target on i386 host](bionic/riscv64-unknown-elf-rv64im_20180620+4_i386.deb)
* [rv64ima GNU/Linux target on amd64 host](bionic/riscv64-unknown-linux-gnu-rv64ima_20180620+4_amd64.deb)
* [rv64ima GNU/Linux target on i386 host](bionic/riscv64-unknown-linux-gnu-rv64ima_20180620+4_i386.deb)
* Ubuntu 16.04 LTS (xenial)
* [rv32im target on amd64 host](xenial/riscv32-unknown-elf-rv32im_20180620+3_amd64.deb)
* [rv32im target on i386 host](xenial/riscv32-unknown-elf-rv32im_20180620+3_i386.deb)
* [rv64im target on amd64 host](xenial/riscv64-unknown-elf-rv64im_20180620+3_amd64.deb)
* [rv64im target on i386 host](xenial/riscv64-unknown-elf-rv64im_20180620+3_i386.deb)
* [rv32im bare metal target on amd64 host](xenial/riscv32-unknown-elf-rv32im_20180620+4_amd64.deb)
* [rv32im bare metal target on i386 host](xenial/riscv32-unknown-elf-rv32im_20180620+4_i386.deb)
* [rv64im bare metal target on amd64 host](xenial/riscv64-unknown-elf-rv64im_20180620+4_amd64.deb)
* [rv64im bare metal target on i386 host](xenial/riscv64-unknown-elf-rv64im_20180620+4_i386.deb)
* [rv64ima GNU/Linux target on amd64 host](xenial/riscv64-unknown-linux-gnu-rv64ima_20180620+4_amd64.deb)
* [rv64ima GNU/Linux target on i386 host](xenial/riscv64-unknown-linux-gnu-rv64ima_20180620+4_i386.deb)
* Ubuntu 14.04 LTS (trusty)
* [rv32im target on amd64 host](trusty/riscv32-unknown-elf-rv32im_20180620+3_amd64.deb)
* [rv32im target on i386 host](trusty/riscv32-unknown-elf-rv32im_20180620+3_i386.deb)
* [rv64im target on amd64 host](trusty/riscv64-unknown-elf-rv64im_20180620+3_amd64.deb)
* [rv64im target on i386 host](trusty/riscv64-unknown-elf-rv64im_20180620+3_i386.deb)
* [rv32im bare metal target on amd64 host](trusty/riscv32-unknown-elf-rv32im_20180620+4_amd64.deb)
* [rv32im bare metal target on i386 host](trusty/riscv32-unknown-elf-rv32im_20180620+4_i386.deb)
* [rv64im bare metal target on amd64 host](trusty/riscv64-unknown-elf-rv64im_20180620+4_amd64.deb)
* [rv64im bare metal target on i386 host](trusty/riscv64-unknown-elf-rv64im_20180620+4_i386.deb)
* [rv64ima GNU/Linux target on amd64 host](trusty/riscv64-unknown-linux-gnu-rv64ima_20180620+4_amd64.deb)
* [rv64ima GNU/Linux target on i386 host](trusty/riscv64-unknown-linux-gnu-rv64ima_20180620+4_i386.deb)
* CentOS 7 / RedHat Enterprise Linux 7
* [rv32im and rv64im targets on amd64 host](centos/riscv-tools-20180620+3-1.el7.x86_64.rpm)
* [rv32im and rv64im targets on i386 host](centos/riscv-tools-20180620+3-1.el7.i686.rpm)
* [rv32im and rv64im bare metal targets on amd64 host](centos/riscv-tools-20180620+4-1.el7.x86_64.rpm)
* [rv32im and rv64im bare metal targets on i386 host](centos/riscv-tools-20180620+4-1.el7.i686.rpm)
* CentOS 6 / RedHat Enterprise Linux 6
* [rv32im and rv64im targets on amd64 host](centos/riscv-tools-20180620+3-1.el6.x86_64.rpm)
* [rv32im and rv64im targets on i386 host](centos/riscv-tools-20180620+3-1.el6.i686.rpm)
* [rv32im and rv64im bare metal targets on amd64 host](centos/riscv-tools-20180620+4-1.el6.x86_64.rpm)
* [rv32im and rv64im bare metal targets on i386 host](centos/riscv-tools-20180620+4-1.el6.i686.rpm)

# Install the Package

Expand Down

0 comments on commit 451e9bd

Please sign in to comment.