-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.docker.env
83 lines (75 loc) · 2.91 KB
/
.docker.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Copyright (c) 2021-2022 Microchip Technology Inc. and its subsidiaries.
#
# Unpublished rights reserved under the copyright laws of the United States
# of America, other countries and international treaties. Permission to use,
# copy, store and modify, the software and its source code is granted but
# only in connection with products utilizing the Microsemi switch and PHY
# products. Permission is also granted for you to integrate into other
# products, disclose, transmit and distribute the software only in an
# absolute machine readable format (e.g. HEX file) and only in or with
# products utilizing the Microsemi switch and PHY products. The source code
# of the software may not be disclosed, transmitted or distributed without
# the prior written permission of Microsemi.
#
# This copyright notice must appear in any copy, modification, disclosure,
# transmission or distribution of the software. Microsemi retains all
# ownership, copyright, trade secret and proprietary rights in the software
# and its source code, including all modifications thereto.
#
# THIS SOFTWARE HAS BEEN PROVIDED "AS IS". MICROSEMI HEREBY DISCLAIMS ALL
# WARRANTIES OF ANY KIND WITH RESPECT TO THE SOFTWARE, WHETHER SUCH
# WARRANTIES ARE EXPRESS, IMPLIED, STATUTORY OR OTHERWISE INCLUDING, WITHOUT
# LIMITATION, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR USE OR
# PURPOSE AND NON-INFRINGEMENT.
MCHP_DOCKER_TAG="1"
MCHP_DOCKER_NAME="ghcr.io/microchip-ung/velocitydrivesp-support"
MCHP_DOCKER_DIGEST="<none>"
if [ "$MCHP_DOCKER_DIGEST" = "<none>" ]; then
unset MCHP_DOCKER_DIGEST
fi
if [[ -z "${DR_USER}" ]]; then
DR_USER=$(id -un)
fi
if [[ -z "${DR_UID}" ]]; then
DR_UID=$(id -u)
fi
if [[ -z "${DR_HOME}" ]]; then
DR_HOME=$HOME
fi
DEV_UART=""
if [[ -e "/dev/ttyACM0" ]]; then
DEV_UART="$DEV_UART --device /dev/ttyACM0"
fi
if [[ -e "/dev/ttyACM1" ]]; then
DEV_UART="$DEV_UART --device /dev/ttyACM1"
fi
if [[ -e "/dev/ttyACM2" ]]; then
DEV_UART="$DEV_UART --device /dev/ttyACM2"
fi
if [[ -e "/dev/ttyACM3" ]]; then
DEV_UART="$DEV_UART --device /dev/ttyACM3"
fi
if [[ -e "/dev/ttyUSB0" ]]; then
DEV_UART="$DEV_UART --device /dev/ttyUSB0"
fi
if [[ -e "/dev/ttyUSB1" ]]; then
DEV_UART="$DEV_UART --device /dev/ttyUSB1"
fi
if [[ -e "/dev/ttyUSB2" ]]; then
DEV_UART="$DEV_UART --device /dev/ttyUSB2"
fi
if [[ -e "/dev/ttyUSB3" ]]; then
DEV_UART="$DEV_UART --device /dev/ttyUSB3"
fi
# Mount /tmp as tmpfs
# Add current username and uid in environment
MCHP_DOCKER_OPTIONS="-i --security-opt seccomp=unconfined \
--init \
-v $DR_HOME:/mapped_home \
--network host \
--tmpfs /tmp:exec \
$DEV_UART \
-e GEM_PATH=/var/lib/gems/3.0.0:/usr/local/lib/ruby/gems/3.0.0 \
-e BLD_USER=$DR_USER \
-e BLD_UID=$DR_UID \
-e PATH=$top/support/scripts/:$top/build-host/appl/test:$top/build-generic/appl/test:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/nvm/versions/node/v18.17.1/bin/"