From 52d1132328e19357eef197e6eb2ab0975004cad2 Mon Sep 17 00:00:00 2001 From: Alessandro Capotondi Date: Thu, 18 Oct 2018 15:46:37 +0200 Subject: [PATCH] Release v1.1.1 scripts/*: now the directories environmental variables are based on absolute addresses. --- CHANGELOG.md | 6 ++++++ scripts/hero_arm_toolchain_env.sh | 8 ++++---- scripts/hero_riscv32_toolchain_env.sh | 8 ++++---- scripts/hero_toolchain_get_sources.sh | 4 ++-- scripts/install_toolchain.sh | 4 ++-- setup.sh | 8 ++++++-- 6 files changed, 24 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b19a5d..435f670 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/), and this project adheres to [Semantic Versioning](http://semver.org). +## v1.1.1 - 2018-10-18 + +### Fixed +- `scripts/*`: environmental variables are now based on absolute addresses. `setup.sh` can be called from any location. + + ## v1.1.0 - 2018-10-17 ### Added diff --git a/scripts/hero_arm_toolchain_env.sh b/scripts/hero_arm_toolchain_env.sh index 5bfde93..e96b789 100755 --- a/scripts/hero_arm_toolchain_env.sh +++ b/scripts/hero_arm_toolchain_env.sh @@ -29,22 +29,22 @@ if [[ ! ${HERO_TOOLCHAIN_DIR+x} ]]; then HERO_TOOLCHAIN_DIR=`readlink -f .` fi -HERO_GCC_INSTALL_DIR=`readlink -f install` +HERO_GCC_INSTALL_DIR=`readlink -f ${HERO_TOOLCHAIN_DIR}/install` if [ ! -d "${HERO_GCC_INSTALL_DIR}" ]; then mkdir -p ${HERO_GCC_INSTALL_DIR} fi -HERO_GCC_BUILD_DIR=`readlink -f build` +HERO_GCC_BUILD_DIR=`readlink -f ${HERO_TOOLCHAIN_DIR}/build` if [ ! -d "${HERO_GCC_BUILD_DIR}" ]; then mkdir -p ${HERO_GCC_BUILD_DIR} fi -HERO_HOST_SRC_DIR=`readlink -f src` +HERO_HOST_SRC_DIR=`readlink -f ${HERO_TOOLCHAIN_DIR}/src` if [ ! -d "${HERO_HOST_SRC_DIR}" ]; then mkdir -p ${HERO_HOST_SRC_DIR} fi -HERO_HOST_GCC_SRC_DIR=`readlink -f src/riscv-gcc` +HERO_HOST_GCC_SRC_DIR=`readlink -f ${HERO_TOOLCHAIN_DIR}/src/riscv-gcc` if [ ! -d "${HERO_HOST_GCC_SRC_DIR}" ]; then mkdir -p ${HERO_HOST_GCC_SRC_DIR} fi diff --git a/scripts/hero_riscv32_toolchain_env.sh b/scripts/hero_riscv32_toolchain_env.sh index 945ea7d..7b8446f 100755 --- a/scripts/hero_riscv32_toolchain_env.sh +++ b/scripts/hero_riscv32_toolchain_env.sh @@ -24,22 +24,22 @@ if [[ ! ${HERO_TOOLCHAIN_DIR+x} ]]; then HERO_TOOLCHAIN_DIR=`readlink -f .` fi -HERO_GCC_INSTALL_DIR=`readlink -f install` +HERO_GCC_INSTALL_DIR=`readlink -f ${HERO_TOOLCHAIN_DIR}/install` if [ ! -d "${HERO_GCC_INSTALL_DIR}" ]; then mkdir -p ${HERO_GCC_INSTALL_DIR} fi -HERO_GCC_BUILD_DIR=`readlink -f build` +HERO_GCC_BUILD_DIR=`readlink -f ${HERO_TOOLCHAIN_DIR}/build` if [ ! -d "${HERO_GCC_BUILD_DIR}" ]; then mkdir -p ${HERO_GCC_BUILD_DIR} fi -HERO_ACCEL_SRC_DIR=`readlink -f ./src` +HERO_ACCEL_SRC_DIR=`readlink -f ${HERO_TOOLCHAIN_DIR}/src` if [ ! -d "${HERO_ACCEL_SRC_DIR}" ]; then mkdir -p ${HERO_ACCEL_SRC_DIR} fi -HERO_ACCEL_GCC_SRC_DIR=`readlink -f ./src/riscv-gcc` +HERO_ACCEL_GCC_SRC_DIR=`readlink -f ${HERO_TOOLCHAIN_DIR}/src/riscv-gcc` if [ ! -d "${HERO_ACCEL_GCC_SRC_DIR}" ]; then mkdir -p ${HERO_ACCEL_GCC_SRC_DIR} fi diff --git a/scripts/hero_toolchain_get_sources.sh b/scripts/hero_toolchain_get_sources.sh index 5da843b..ee99015 100755 --- a/scripts/hero_toolchain_get_sources.sh +++ b/scripts/hero_toolchain_get_sources.sh @@ -15,8 +15,8 @@ # # Authors: Alessandro Capotondi, University of Bologna (alessandro.capotondi@unibo.it) -source scripts/hero_arm_toolchain_env.sh -source scripts/hero_riscv32_toolchain_env.sh +source ${HERO_TOOLCHAIN_DIR}/scripts/hero_arm_toolchain_env.sh +source ${HERO_TOOLCHAIN_DIR}/scripts/hero_riscv32_toolchain_env.sh get_submodules() { if [[ ! ${HERO_CI+x} ]]; then diff --git a/scripts/install_toolchain.sh b/scripts/install_toolchain.sh index 7461033..32432ee 100755 --- a/scripts/install_toolchain.sh +++ b/scripts/install_toolchain.sh @@ -15,8 +15,8 @@ # # Authors: Alessandro Capotondi, University of Bologna (alessandro.capotondi@unibo.it) -source scripts/hero_arm_toolchain_env.sh -source scripts/hero_riscv32_toolchain_env.sh +source ${HERO_TOOLCHAIN_DIR}/scripts/hero_arm_toolchain_env.sh +source ${HERO_TOOLCHAIN_DIR}/scripts/hero_riscv32_toolchain_env.sh RET=0 if [ -z "${HERO_TARGET_HOST}" ]; then diff --git a/setup.sh b/setup.sh index 45f5942..d1750fe 100755 --- a/setup.sh +++ b/setup.sh @@ -18,8 +18,12 @@ # This script build the GCC 7.1.1 toolchain for the HERO host # Setup the envioronmental variables -source scripts/hero_riscv32_toolchain_env.sh -source scripts/hero_arm_toolchain_env.sh +if [[ ! ${HERO_TOOLCHAIN_DIR+x} ]]; then + HERO_TOOLCHAIN_DIR=`readlink -f .` +fi + +source ${HERO_TOOLCHAIN_DIR}/scripts/hero_riscv32_toolchain_env.sh +source ${HERO_TOOLCHAIN_DIR}/scripts/hero_arm_toolchain_env.sh export HERO_GCC_INSTALL_DIR=$HERO_GCC_INSTALL_DIR export PATH=$PATH