Skip to content
Snippets Groups Projects
Commit 7c472106 authored by dam1n19's avatar dam1n19
Browse files

Changed set_env flow to source script in soctools and breadcrumb left in...

Changed set_env flow to source script in soctools and breadcrumb left in project repo to show it is a project
parent 9363b2ef
No related branches found
No related tags found
1 merge request!1Changed set_env flow to source script in soctools and breadcrumb left in...
#-----------------------------------------------------------------------------
# SoC Labs Project Root Marker
# - This file tells environment setter that this is root of a SoC Labs Project
# A joint work commissioned on behalf of SoC Labs, under Arm Academic Access license.
#
# Contributors
#
# David Mapstone (d.a.mapstone@soton.ac.uk)
#
# Copyright 2023, SoC Labs (www.soclabs.org)
#-----------------------------------------------------------------------------
\ No newline at end of file
......@@ -10,62 +10,5 @@
#-----------------------------------------------------------------------------
#!/bin/bash
# Get Root Location of Design Structure
if [ -z $SOCLABS_DESIGN_ROOT ]; then
# If $SOCLABS_DESIGN_ROOT hasn't been set yet
SOCLABS_DESIGN_ROOT=`git rev-parse --show-superproject-working-tree`
if [ -z $SOCLABS_DESIGN_ROOT ]; then
# If not in a submodule - at root
SOCLABS_DESIGN_ROOT=`git rev-parse --show-toplevel`
fi
# Source Top-Level Sourceme
source $SOCLABS_DESIGN_ROOT/set_env.sh
else
# Set Environment Variable for this Repository
export SOCLABS_PROJECT_DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# If this Repo is root of workspace
if [ $SOCLABS_PROJECT_DIR = $SOCLABS_DESIGN_ROOT ]; then
echo "Design Workspace: $SOCLABS_DESIGN_ROOT"
export SOCLABS_DESIGN_ROOT
fi
# Add in location for socsim scripts
export SOCLABS_SOCSIM_PATH=$SOCLABS_PROJECT_DIR/simulate/socsim
# Source dependency environment variable script
source $SOCLABS_PROJECT_DIR/env/dependency_env.sh
# Add Scripts to Path
# "TECH_DIR"
while read line; do
eval PATH="$PATH:\$${line}/flow"
done <<< "$(awk 'BEGIN{for(v in ENVIRON) print v}' | grep TECH_DIR)"
# "FLOW_DIR"
while read line; do
eval PATH="$PATH:\$${line}/tools"
done <<< "$(awk 'BEGIN{for(v in ENVIRON) print v}' | grep FLOW_DIR)"
# "SOCLABS_PROJECT_DIR"
while read line; do
eval PATH="$PATH:\$${line}/flow"
done <<< "$(awk 'BEGIN{for(v in ENVIRON) print v}' | grep SOCLABS_PROJECT_DIR)"
export PATH
fi
# Check cloned repository has been initialised
if [ ! -f $SOCLABS_PROJECT_DIR/.socinit ]; then
echo "Running First Time Repository Initialisation"
# Source environment variables for all submodules
cd $SOCLABS_DESIGN_ROOT
echo $SOCLABS_DESIGN_ROOT
git submodule update --recursive
python3 $SOCLABS_SOCTOOLS_FLOW_DIR/bin/subrepo_checkout.py -b projbranch -t $SOCLABS_DESIGN_ROOT
git restore $SOCLABS_DESIGN_ROOT/.gitmodules
touch $SOCLABS_PROJECT_DIR/.socinit
fi
# Source set_env script from soctools_flow
source soctools_flow/bin/project_setup.sh
Subproject commit 8ac6b154a6a8f98a5b0fe314182aaaddce1cd0f9
Subproject commit 5a4de6fe3de512ad3092e28c6eef5721acc804ed
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment