libero container + licenser working

develop
penguin 2 months ago
parent 96f9bbd904
commit 1a491fa010

@ -18,8 +18,8 @@ ENV INSTALLERS_DIR="${BASE_DIR}/installers"
ENV SCRIPTS_DIR="${BASE_DIR}/scripts"
ENV LIBERO_DIR="${BASE_DIR}/Libero_SoC_${LIBERO_VERSION}"
ENV SC_DIR="${BASE_DIR}/SoftConsole-${SOFTCONSOLE_VERSION}"
ENV LICENSE_DIR="${LIBERO_DIR}/license"
ENV LOG_DIR="${LIBERO_DIR}/Logs"
ENV LICENSE_DIR="${BASE_DIR}/licenses"
ENV LOG_DIR="${BASE_DIR}/logs"
ENV FPGENPROG="${LIBERO_DIR}/Libero/bin64/fpgenprog"
# prepare the install dirs

@ -1,7 +1,7 @@
LIBERO_IMAGE := "libero"
MICROCHIP_TOOLS_NETWORK := "microchip_tools_network"
MICROCHIP_TOOLS_POD := "microchip_tools_pod"
LIBERO_CONTAINER ::= "localhost/$(LIBERO_IMAGE):latest"
LIBERO_IMAGE := libero
MICROCHIP_TOOLS_NETWORK := microchip_tools_network
MICROCHIP_TOOLS_POD := microchip_tools_pod
LIBERO_CONTAINER ::= localhost/$(LIBERO_IMAGE):latest
C_RED= \033[0;31m
C_YELLOW= \033[0;33m
@ -12,17 +12,18 @@ build:
podman build . -t libero --volume="${PWD}/installers:/opt/microchip/installers"
daemon:
podman run -dt --rm --replace --name libero \
--volume="/etc/localtime:/etc/localtime" --volume="${PWD}/licenses:/opt/microchip/licenses" \
${LIBERO_LICENSER_CONTAINER} /opt/microchip/scripts/entrypoint
podman run -dt --replace --name libero \
--net host \
-v "/etc/localtime:/etc/localtime" \
-v "${PWD}/licenses:/opt/microchip/licenses" \
-v "${XAUTHORITY}:/home/libby/.Xauthority:ro" \
-v "/tmp/.X11-unix:/tmp/.X11-unix:ro" \
-e "DISPLAY" --security-opt label=type:container_runtime_t \
${LIBERO_CONTAINER} /opt/microchip/scripts/entrypoint
# launch a bash shell in the libero container
debug:
podman exec -it --volume="/etc/localtime:/etc/localtime" \
-v "${XAUTHORITY}:${XAUTHORITY}:ro" -v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-e "DISPLAY" --security-opt label=type:container_runtime_t ${LIBERO_CONTAINER}
podman exec -it -e "DISPLAY" libero bash
run:
podman exec -it --volume="/etc/localtime:/etc/localtime" \
-v "${XAUTHORITY}:${XAUTHORITY}:ro" -v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-e "DISPLAY" --security-opt label=type:container_runtime_t ${LIBERO_CONTAINER} libero
podman exec -it ${LIBERO_CONTAINER} libero

@ -16,7 +16,8 @@ unzip Libero_soc_*.*_web_lin.zip
cd ..
#+end_src
* TODO Request a License from Microchip
* [[https://docs.beagleboard.org/latest/boards/beaglev/fire/demos-and-tutorials/mchp-fpga-tools-installation-guide.html#request-a-libero-silver-license][Request a License from Microchip]]
* Install the license
#+begin_src bash
mv /path/to/License.dat ./licenses/.

@ -0,0 +1 @@
Put your licenses here.

@ -1,4 +1,4 @@
#!/usr/bin/env bash
. /opt/microchip/scripts/env
${LIBERO_DIR}/Libero/bin64/lmgrd -z -c ${LIBERO_LICENSE_DIR}/License.dat -l ${LIBERO_LOG_DIR}/license.log
${LIBERO_DIR}/Libero/bin64/lmgrd -z -c ${LICENSE_DIR}/License.dat -l ${LOG_DIR}/licenser.log

@ -11,8 +11,8 @@ export INSTALLERS_DIR="${BASE_DIR}/installers"
export SCRIPTS_DIR="${BASE_DIR}/scripts"
export LIBERO_DIR="${BASE_DIR}/Libero_SoC_${LIBERO_VERSION}"
export SC_DIR="${BASE_DIR}/SoftConsole-${SOFTCONSOLE_VERSION}"
export LICENSE_DIR="${LIBERO_DIR}/license"
export LOG_DIR="${LIBERO_DIR}/Logs"
export LICENSE_DIR="${BASE_DIR}/licenses"
export LOG_DIR="${BASE_DIR}/logs"
export FPGENPROG="${LIBERO_DIR}/Libero/bin64/fpgenprog"
# license vars

Loading…
Cancel
Save