From 451e9bd04301111b9aece1e5b306a7e6f06ea68c Mon Sep 17 00:00:00 2001 From: Darius Rad Date: Wed, 31 Oct 2018 14:55:01 -0400 Subject: [PATCH] Add package for unknown-linux-gnu RV64IMA. --- debian/changelog | 6 ++ debian/control | 15 +++++ .../riscv64-unknown-linux-gnu-rv64ima.install | 1 + .../riscv64-unknown-linux-gnu-rv64ima.links | 29 +++++++++ ...riscv64-unknown-linux-gnu-rv64ima.postinst | 2 + .../riscv64-unknown-linux-gnu-rv64ima.prerm | 2 + debian/rules | 8 ++- riscv-tools.md | 64 +++++++++++-------- 8 files changed, 99 insertions(+), 28 deletions(-) create mode 100644 debian/riscv64-unknown-linux-gnu-rv64ima.install create mode 100644 debian/riscv64-unknown-linux-gnu-rv64ima.links create mode 100755 debian/riscv64-unknown-linux-gnu-rv64ima.postinst create mode 100755 debian/riscv64-unknown-linux-gnu-rv64ima.prerm diff --git a/debian/changelog b/debian/changelog index 599159d..db92d34 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +riscv-tools (20180620+4) unstable; urgency=medium + + * Add package for unknown-linux-gnu RV64IMA. + + -- Darius Rad Wed, 31 Oct 2018 14:51:45 -0400 + riscv-tools (20180620+3) unstable; urgency=medium * Add alternatives for /usr/bin/openocd. diff --git a/debian/control b/debian/control index b2b29de..72e8626 100644 --- a/debian/control +++ b/debian/control @@ -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. diff --git a/debian/riscv64-unknown-linux-gnu-rv64ima.install b/debian/riscv64-unknown-linux-gnu-rv64ima.install new file mode 100644 index 0000000..b9bd0a2 --- /dev/null +++ b/debian/riscv64-unknown-linux-gnu-rv64ima.install @@ -0,0 +1 @@ +opt/riscv64-unknown-linux-gnu-*/ opt diff --git a/debian/riscv64-unknown-linux-gnu-rv64ima.links b/debian/riscv64-unknown-linux-gnu-rv64ima.links new file mode 100644 index 0000000..e509299 --- /dev/null +++ b/debian/riscv64-unknown-linux-gnu-rv64ima.links @@ -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 diff --git a/debian/riscv64-unknown-linux-gnu-rv64ima.postinst b/debian/riscv64-unknown-linux-gnu-rv64ima.postinst new file mode 100755 index 0000000..d01d47e --- /dev/null +++ b/debian/riscv64-unknown-linux-gnu-rv64ima.postinst @@ -0,0 +1,2 @@ +#!/bin/sh +update-alternatives --install /usr/bin/openocd openocd /opt/riscv64-unknown-linux-gnu-rv64ima/bin/openocd 100 diff --git a/debian/riscv64-unknown-linux-gnu-rv64ima.prerm b/debian/riscv64-unknown-linux-gnu-rv64ima.prerm new file mode 100755 index 0000000..84d3157 --- /dev/null +++ b/debian/riscv64-unknown-linux-gnu-rv64ima.prerm @@ -0,0 +1,2 @@ +#!/bin/sh +update-alternatives --remove openocd /opt/riscv64-unknown-linux-gnu-rv64ima/bin/openocd diff --git a/debian/rules b/debian/rules index 041c791..c2c5080 100755 --- a/debian/rules +++ b/debian/rules @@ -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 @@ -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 diff --git a/riscv-tools.md b/riscv-tools.md index 4688792..e00cb55 100644 --- a/riscv-tools.md +++ b/riscv-tools.md @@ -1,6 +1,6 @@ % GNU Tools for RISC-V RV32IM % Bluespec, Inc. -% 2018-08-28 +% 2018-10-31 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 @@ -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 @@ -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