Commit 7c8c55d0 authored by Guillaume REMBERT's avatar Guillaume REMBERT

Add debian support + idempotence to install tools

parent f4b2a414
Pipeline #8 failed
......@@ -166,3 +166,10 @@ FIXME: TBD / variables / functions / comments / ...
-------------------------------
FIXME: TBD / HW and SW requirements, OS setup, build, install, test
-------------------------------
1. Development environment setup
1.1 Get sources
git clone https://sources.euryecetelecom.com/euryspace/euryspace.git
1.2 Install development tools
cd euryspace
bash euryspace -a install -e dev -o centos7 | bash euryspace -a install -e dev -o debian9
-------------------------------
......@@ -5,8 +5,7 @@
# Version: 1.0.0
# Description:
# EurySPACE management tool
# Validated on CentOS 7
# TODO: Ubuntu 16 LTS
# Validated on CentOS 7 and Debian 9
################################
# Author(s):
# Guillaume REMBERT
......@@ -14,9 +13,6 @@
# Licence:
# MIT
################################
# Changes list:
# 2017/09/04: initial release
################################
#Conf for sources / builds
#Install environment (dev / prod) + all / only sub-parts
......@@ -32,23 +28,27 @@ function show_help {
echo "ACTION: install"
echo "DESTINATION: destination folder (default: /home/euryspace)"
echo "ENVIRONMENT: dev|development, prod|production (default value)"
echo "OPERATING_SYSTEM: centos7 (default value), ubuntu16"
echo "OPERATING_SYSTEM: centos7 (default value), debian9"
echo "TARGET: all (default value), space|space_segment, ground|ground_segment, user|user_segment"
echo "USER: user used to start (default: astronaut)"
}
START_TIME=$(date +%s)
####################
# SCRIPT VARIABLES #
####################
#####################################
# SCRIPT VARIABLES + DEFAULT VALUES #
#####################################
EURYSPACE_PRODUCTION=true
EURYSPACE_OPERATING_SYSTEM="centos7"
EURYSPACE_USER="astronaut"
EURYSPACE_DESTINATION="/home/euryspace"
EURYSPACE_BUILD_PARALLELISM=2
#########################
# SCRIPT INITIALISATION #
#########################
#Check script is run as root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
......@@ -60,7 +60,7 @@ SCRIPT_PATH=$(dirname "$SCRIPT_COMMAND")
#Should not be changed except if you changed sw folder layout
SCRIPT_CONF_PATH=$SCRIPT_PATH/cfg/sw/euryspace.conf
#Get input parameters
while getopts :a:e:ht: ARGUMENT
while getopts :a:e:ho:t: ARGUMENT
do
case "${ARGUMENT}" in
a) SCRIPT_ACTION=${OPTARG}
......@@ -97,7 +97,7 @@ do
;;
o) EURYSPACE_OPERATING_SYSTEM=${OPTARG}
case "${EURYSPACE_OPERATING_SYSTEM}" in
ubuntu16|centos7)
debian9|centos7)
;;
*)
echo "Unmanaged operating system: ${EURYSPACE_OPERATING_SYSTEM}" 1>&2
......@@ -116,10 +116,18 @@ do
;;
esac
done
if [ $OPTIND -eq 1 ]; then
show_help
exit 1
fi
####################
# SCRIPT EXECUTION #
####################
case "${SCRIPT_ACTION}" in
install)
$SCRIPT_PATH/sw/src/tools/euryspace_install.sh ${EURYSPACE_OPERATING_SYSTEM} ${EURYSPACE_PRODUCTION} ${EURYSPACE_USER} ${EURYSPACE_DESTINATION}
$SCRIPT_PATH/sw/src/tools/euryspace_install.sh ${EURYSPACE_OPERATING_SYSTEM} ${EURYSPACE_PRODUCTION} ${EURYSPACE_USER} ${EURYSPACE_DESTINATION} ${EURYSPACE_BUILD_PARALLELISM}
;;
esac
......@@ -11,9 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2015/11/17: initial release
-------------------------------
-- libraries used
library ieee;
......
......@@ -11,9 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2015/11/17: initial release
-------------------------------
-- libraries used
library ieee;
......
......@@ -11,9 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2015/11/17: initial release
-------------------------------
-- libraries used
library ieee;
......
......@@ -17,20 +17,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2015/11/18: initial release
---- 2015/12/28: adding random stimuli generation
---- 2016/10/19: adding sub-components (CRC + buffer) test ressources
---- 2016/10/25: adding framer sub-component test ressources + CRC checks
---- 2016/10/27: adding serdes sub-component test ressources
---- 2016/10/30: framer tests improvements
---- 2016/11/04: adding lfsr sub-component test ressources
---- 2016/11/05: adding mapper sub-component test ressources
---- 2016/11/08: adding srrc + filter sub-components test ressources
---- 2016/11/18: adding differential coder + symbols to samples mapper sub-components test ressources
---- 2016/11/20: adding files output for samples to allow external software analysis
---- 2017/15/01: adding convolutional coder
-------------------------------
--TODO: functions for sub-components interactions and checks (wb_read, wb_write, buffer_read, ...)
-- To convert hexa ASCII encoded output files (hex) to binary files (raw wav) : xxd -r -p samples.hex > samples.wav
......
......@@ -15,10 +15,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/02/27: initial release
---- 2016/10/20: major corrections and optimizations
-------------------------------
-- libraries used
library ieee;
......
......@@ -11,9 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/11/05: initial release
-------------------------------
-- libraries used
library ieee;
......
......@@ -11,9 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2015/11/17: initial release
-------------------------------
package ccsds_rxtx_constants is
constant RXTX_CST: integer := 1; -- DUMMY USELESS CONSTANT
......
......@@ -16,11 +16,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/10/18: initial release
---- 2016/10/25: external padding data mode
---- 2016/10/30: ressources usage optimization
-------------------------------
--TODO: Implement DIRECT computation?
--TODO: CRC LENGTH not being multiple of Byte
......
......@@ -11,12 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2015/12/28: initial release
---- 2016/10/20: added reverse_std_logic_vector function + rework sim_generate_random_std_logic_vector for > 32 bits vectors
---- 2016/11/17: added convert_boolean_to_std_logic function
---- 2017/01/15: added convert_std_logic_vector_array_to_std_logic_vector
-------------------------------
-- libraries used
library ieee;
......
......@@ -15,9 +15,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/11/05: initial release
-------------------------------
-- Test ressources:
-- GNURADIO GLFSR block
......
......@@ -11,9 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/11/06: initial release
-------------------------------
-- libraries used
library ieee;
......
......@@ -11,10 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2015/11/17: initial release
---- 2016/10/20: rework / remove non-systems parameters / each component has his own parameters set at proper level
-------------------------------
-- libraries used
library ieee;
......
......@@ -15,11 +15,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2015/11/18: initial release
---- 2016/10/27: review + add ser2par
-------------------------------
--TODO: change data pointer use to shift register and counter
-- libraries used
......
......@@ -15,9 +15,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/11/06: initial release
-------------------------------
-- Filter impulse response - SRRC(t):
-- t = 0 => SRRC(0) = (1-B + 4*B/PI)
-- t = +/-Ts/(4*B) => SRRC(+/-Ts/(4*B)) = (B/racine(2) * (1+2/PI) * sin(PI/(4*B)) + (1-2/PI) * cos(PI/(4*B)))
......
......@@ -15,10 +15,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/02/26: initial release - only basic RX-TX capabilities through direct R/W on WB Bus / no dynamic configuration capabilities
---- 2016/10/18: major rework / implementation of new architecture
-------------------------------
-- TODO: additionnal modulations: ASK, FSK, GMSK, OFDM, CDMA
-- TODO: dynamic modulation and coding
......
......@@ -11,9 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2017/01/15: initial release
-------------------------------
-- libraries used
library ieee;
......
......@@ -11,10 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2015/11/17: initial release
---- 2016/10/19: rework
-------------------------------
-- libraries used
library ieee;
......
......@@ -11,9 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/11/05: initial release
-------------------------------
-- libraries used
library ieee;
......
......@@ -9,9 +9,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2017/01/15: initial release
-------------------------------
-- TODO: puncturation + input rate /= 1
-- libraries used
......
......@@ -9,9 +9,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/11/18: initial release
-------------------------------
-- libraries used
library ieee;
......
......@@ -11,10 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2015/11/17: initial release
---- 2016/10/21: rework based on TX final architecture
-------------------------------
-- libraries used
library ieee;
......
......@@ -11,9 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/11/06: initial release
-------------------------------
-- libraries used
library ieee;
......
......@@ -11,10 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/02/28: initial release
---- 2016/10/21: rework
-------------------------------
--TODO: operationnal control field
--TODO: security trailer
--[OPT] SECURITY TRAILER
......
......@@ -11,13 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/02/27: initial release
---- 2016/10/20: rework
---- 2016/10/24: multiple footers generation to ensure higher speed than input max data rate (CCSDS_TX_FRAMER_DATA_BUS_SIZE*CLK_FREQ bits/sec)
---- 2016/10/31: ressources optimization
---- 2016/11/03: add only idle data insertion
-------------------------------
--TODO: trailer as option
--HEADER (6 up to 70 bytes) / before data / f(idle)
--TRANSFER FRAME DATA FIELD => Variable
......
......@@ -11,11 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/02/28: initial release
---- 2016/10/21: rework
---- 2016/11/03: add idle data flag
-------------------------------
--TODO: static fixed virtual channel now - implement virtual channel service
--TODO: secondary header
--TODO: security header
......
......@@ -11,11 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/10/16: initial release
---- 2016/10/31: add serdes sub-component
---- 2016/11/05: add clock generator sub-component
-------------------------------
-- libraries used
library ieee;
......
......@@ -11,9 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/11/05: initial release
-------------------------------
-- libraries used
library ieee;
......
......@@ -11,9 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/11/18: initial release
-------------------------------
-- libraries used
library ieee;
......
......@@ -11,9 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2015/11/17: initial release
-------------------------------
--TODO: Gray coder
-- libraries used
......
......@@ -11,9 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/11/05: initial release
-------------------------------
-- libraries used
library ieee;
......
......@@ -11,9 +11,6 @@
---- Licence:
---- MIT
-------------------------------
---- Changes list:
---- 2016/11/05: initial release
-------------------------------
-- libraries used
library ieee;
......
//Checks/example of LED on/off + various TX/RX basic configuration and transmission tests
#include <stdio.h>
#include <or1k-support.h>
......@@ -10,19 +12,17 @@ const unsigned int tx_rand_seed = 0;
char* leds_gpio0_addr = (char*) 0x91000000;
int* ccsds_rxtx0_rxtx_addr = (int*) 0xc0000000;
// char* ccsds_rxtx0_rxtx_addr = (char*) 0xc0000000;
//char* ccsds_rxtx0_rxtx_addr = (char*) 0xc0000000;
//int* ccsds_rxtx0_rx_conf_addr = (int*) 0xc0000001;
//int* ccsds_rxtx0_tx_conf_addr = (int*) 0xc0000002;
int init_random(unsigned int seed)
{
int init_random(unsigned int seed){
srand (seed);
return 0;
}
int sleep(int cycle_num)
{
int sleep(int cycle_num){
int count = 0;
while (count < cycle_num)
{
......@@ -31,12 +31,10 @@ int sleep(int cycle_num)
return 0;
}
int visual_control_seq(int type)
{
int visual_control_seq(int type){
//set to write IO
*(leds_gpio0_addr+1) = 0xff;
switch (type)
{
switch (type){
//init sequence
case 0:
//ON
......@@ -79,12 +77,10 @@ int visual_control_seq(int type)
return 0;
}
int receive_data(int type)
{
int receive_data(int type){
int rx_data;
rx_data = *(ccsds_rxtx0_rxtx_addr);
switch (type)
{
switch (type){
//default value
case 0:
if (rx_data == default_rx_value)
......@@ -105,11 +101,9 @@ int receive_data(int type)
}
int send_data(int type)
{
int send_data(int type){
int tx_data;
switch (type)
{
switch (type){
//all 0 datagram
case 0:
tx_data = 0x00000000;
......@@ -129,8 +123,7 @@ int send_data(int type)
return 0;
}
int main(void)
{
int main(void){
unsigned int loop_counter = 0;
printf("_______________________________________\n\n");
......@@ -138,67 +131,51 @@ int main(void)
printf("_______________________________________\n\n");
printf("START: visual control sequence - init sequence\n");
if (visual_control_seq(0) == 0)
{
if (visual_control_seq(0) == 0){
printf("OK: visual control sequence - init sequence\n");
}
else
{
} else {
printf("KO: visual control sequence - error - init sequence\n");
}
printf("DONE: visual control sequence - init sequence\n");
printf("START: RX/TX control sequence - default init parameters\n");
if (receive_data(0) == 0)
{
if (receive_data(0) == 0){
printf("OK: RX/TX control sequence - default init parameters\n");
}
else
{
} else {
printf("KO: RX/TX control sequence - error - default init parameters\n");
}
printf("DONE: RX/TX control sequence - default init parameters\n");
printf("START: RX/TX control sequence - tx data transmission\n");
if (send_data(0) == 0)
{
if (send_data(0) == 0){
printf("OK: RX/TX control sequence - time domain analysis - tx data changed to all 0\n");
printf("CHECK: RX/TX control sequence - time domain analysis - TX data are all 0 - inspect signal level\n");
sleep(sleep_count);
}
else
{
} else {
printf("KO: RX/TX control sequence - time domain analysis - error - tx data not changed to all 0\n");
}
if (send_data(1) == 0)
{
if (send_data(1) == 0){
printf("OK: RX/TX control sequence - time domain analysis - tx data changed to all 1\n");
printf("CHECK: RX/TX control sequence - time domain analysis - TX data are all 1 - inspect signal level\n");
sleep(sleep_count);
}
else
{
} else {
printf("KO: RX/TX control sequence - time domain analysis - error - tx data not changed to all 1\n");
}
printf("CHECK: RX/TX control sequence - frequency domain analysis - changing TX data alternation - inspect signal spectrum\n");
loop_counter = 0;
while (send_data(0) == 0 && send_data(1) == 0 && loop_counter < 10000000)
{
while (send_data(0) == 0 && send_data(1) == 0 && loop_counter < 10000000){
loop_counter++;
// sleep(1);
}
printf("CHECK: RX/TX control sequence - frequency domain analysis - changing TX data randomly - inspect signal spectrum\n");
init_random(tx_rand_seed);
while (send_data(2) == 0)
{
while (send_data(2) == 0){
// sleep(1);
}
// sleep(sleep_count);
// printf("Bad RX read: %h\n", *(ccsds_rxtx0_rxtx_addr+1));
......@@ -255,7 +232,6 @@ int main(void)
// wait some time
*/
printf("START: visual control sequence - stop sequence\n");
visual_control_seq(1);
printf("END: visual control sequence - stop sequence\n");
......
This diff is collapsed.
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