Commit 076fdd07 authored by Daniel Silveira's avatar Daniel Silveira Committed by Luca Giordano

Configure auto checkout supported RTEMS 5 release

refs #112269
parent 110d8601
......@@ -15,6 +15,7 @@ import utils.parser
import logging
import traceback
import utils.terminal as terminalutils
import subprocess
__OS_CONFIG_FILE__ = os.path.join(air.ROOT_DIRECTORY, '.air_config')
......@@ -385,6 +386,21 @@ class Configuration(object):
return input_file, output_file
##
# @brief Execute POS git checkout
# @param pos_name Name of the pos
# @return Path to the makefile template
def git_pos_checkout(self, pos_name, logger):
if self.supported_pos[pos_name].git_id is not "":
logger.information(1, 'Checking out ' + pos_name + ' from GIT')
FNULL = open(os.devnull, 'w')
subprocess.call(['git','checkout', self.supported_pos[pos_name].git_id], cwd="pos/" + pos_name+ "/" + pos_name, stdout=FNULL, stderr=subprocess.STDOUT)
# if self.supported_pos[pos_name].makefile is None:
# return os.path.join(air.AIR_TEMPLATES_DIRECTORY, 'pos_makefile.mako')
# return self.supported_pos[pos_name].makefile
##
# @brief Gets the Partition complete library list
# @param libraries List of libraries defined by user
......
......@@ -19,6 +19,9 @@ description = "Bare C support"
# @brief OS alias
alias = None
# @brief Supported git checkout id
git_id = ""
# @brief POS Source files
source_files = {
'arm': set(utils.flatten([
......
......@@ -19,6 +19,10 @@ description = "RTEMS-4.8-IMPR"
# @brief OS alias
alias = ['rtems48i']
# @brief Supported git checkout id
git_id = ""
# @brief POS Source files
source_files = {
'sparc': [], # empty, the magic happens in the makefile template
......
......@@ -19,6 +19,10 @@ description = "RTEMS-5"
# @brief OS alias
alias = ['rtems5']
# @brief Supported git checkout id
git_id = "2e2a41ecd99d17b379b2874cbd45d32b9430791e"
# @brief POS Source files
source_files = {
'sparc': [], # empty, the magic happens in the makefile template
......
......@@ -105,6 +105,9 @@ def Run(args, logger):
for pos_name in personalities:
pos = os_configuration.get_pos_config(pos_name)
#Git checkout of pos
os_configuration.git_pos_checkout(pos_name, logger)
# check if it is an alias
# if pos.alias is not None and pos_name in pos.alias:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment