From cfae8620a809675dcd2f356c8b51935bd0ddc8cc Mon Sep 17 00:00:00 2001 From: penguin Date: Fri, 14 Jun 2024 07:15:23 -0500 Subject: [PATCH] commenting out softconsole for now --- Dockerfile | 17 ++++++++++------- Makefile | 7 ++++++- scripts/entrypoint | 2 -- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 53568db..3ca8942 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,11 +12,13 @@ ENV LM_LICENSE_FILE="1702@LPOD" ENV SNPSLMD_LICENSE_FILE="1702@LPOD" ENV FPGENPROG="${LIBERO_DIR}/Libero/bin64/fpgenprog" ARG DEBIAN_FRONTEND=noninteractive +ENV XDG_RUNTIME_DIR="/tmp/.xdg/${UID}" # prepare the install dirs RUN mkdir -p ${MICROCHIP_TOOLS_DIR}/common RUN mkdir -p ${MICROCHIP_TOOLS_DIR}/installers RUN mkdir -p ${MICROCHIP_TOOLS_DIR}/scripts +RUN mkdir -p $XDG_RUNTIME_DIR RUN dpkg --add-architecture i386 && \ apt-get update -y && \ @@ -27,16 +29,17 @@ ADD installers/* ${MICROCHIP_TOOLS_DIR}/installers/ ADD scripts/* ${MICROCHIP_TOOLS_DIR}/scripts/ # run installer in silent mode using config file RUN echo "Installing Libero... This could take a bit" -RUN ${MICROCHIP_TOOLS_DIR}/installers/Libero_SoC_${LIBERO_VERSION}_Web.bin -f ${MICROCHIP_TOOLS_DIR}/installers/installer.cfg -i silent +RUN ls /opt/microchip +RUN ${MICROCHIP_TOOLS_DIR}/installers/Libero_SoC_${LIBERO_VERSION}_Web.bin -i silent -f ${MICROCHIP_TOOLS_DIR}/installers/installer.cfg RUN echo "Installing license" RUN mkdir -p ${LIBERO_LICENSE_DIR} ADD licenses/* ${LIBERO_LICENSE_DIR} -RUN echo "Installing SoftConsole... This could take a bit" -RUN ${MICROCHIP_TOOLS_DIR}/installers/Microchip-SoftConsole-${SOFTCONSOLE_VERSION}-linux-x64-installer.run \ - --mode unattended --unattendedmodeui minimal --installrenodesources "Yes, I accept Renode's MIT license." \ - --prefix ${SC_INSTALL_DIR} +# RUN echo "Installing SoftConsole... This could take a bit" +# RUN ${MICROCHIP_TOOLS_DIR}/installers/Microchip-SoftConsole-${SOFTCONSOLE_VERSION}-linux-x64-installer.run \ +# --mode unattended --unattendedmodeui minimal --installrenodesources "Yes, I accept Renode's MIT license." \ +# --prefix ${SC_INSTALL_DIR} # 32 bit deps RUN apt-get install -y libc6:i386 libdrm2:i386 libexpat1:i386 \ @@ -68,5 +71,5 @@ RUN apt-get install -y xfonts-100dpi xfonts-75dpi xfonts-base \ RUN bash -c "echo \". ${MICROCHIP_TOOLS_DIR}/scripts/env\"" >> /root/.bashrc -ENTRYPOINT "${MICROCHIP_TOOLS_DIR}/scripts/entrypoint" -CMD "echo \"Got here\"" +ENTRYPOINT ["/bin/bash", "-c"] +CMD [".", "/opt/microchip/scripts/entrypoint", "&&"] diff --git a/Makefile b/Makefile index ed25076..67464bd 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,12 @@ # @version 0.1 bash: - podman run -it -h LPOD --volume="/etc/localtime:/etc/localtime" --network podman1 --mac-address ${LIBERO_LICENSE_MAC} --rm -v "${XAUTHORITY}:${XAUTHORITY}:ro" -v /tmp/.X11-unix:/tmp/.X11-unix:ro -e "DISPLAY" --security-opt label=type:container_runtime_t localhost/microchip_tools:latest bash + podman run -it -h LPOD --volume="/etc/localtime:/etc/localtime" --network podman --mac-address ${LIBERO_LICENSE_MAC} -v "${XAUTHORITY}:${XAUTHORITY}:ro" -v /tmp/.X11-unix:/tmp/.X11-unix:ro -e "DISPLAY" --security-opt label=type:container_runtime_t localhost/microchip_tools:latest +libero: + podman run -t -h LPOD --volume="/etc/localtime:/etc/localtime" --network podman --mac-address ${LIBERO_LICENSE_MAC} -v "${XAUTHORITY}:${XAUTHORITY}:ro" -v /tmp/.X11-unix:/tmp/.X11-unix:ro -e "DISPLAY" --security-opt label=type:container_runtime_t localhost/microchip_tools:latest libero + +daemon: + podman run -d -h LPOD --volume="/etc/localtime:/etc/localtime" --network podman --mac-address ${LIBERO_LICENSE_MAC} -v "${XAUTHORITY}:${XAUTHORITY}:ro" -v /tmp/.X11-unix:/tmp/.X11-unix:ro -e "DISPLAY" --security-opt label=type:container_runtime_t localhost/microchip_tools:latest /opt/microchip/scripts/entrypoint # end diff --git a/scripts/entrypoint b/scripts/entrypoint index 6034ef0..373c6e7 100755 --- a/scripts/entrypoint +++ b/scripts/entrypoint @@ -2,5 +2,3 @@ . /opt/microchip/scripts/env ${LIBERO_DIR}/Libero/bin64/lmgrd -z -c ${LIBERO_LICENSE_DIR}/License.dat -l ${LIBERO_LOG_DIR}/license.log - -exec "$@"