RCHD-PF - Running Libero in a container
Libero SoC can be run in a docker/podman container to allow use in Linux distibutions other than officially supported by Microchip, such as Ubuntu. It also gives the tool a stable runtime environment, immune to host operating system updates.
Install Libero SoC
Use standard installer package to install Libero SoC on the host machine. Make sure to make the default installation directory /usr/local/microchip user-writeable or choose a different directory.
Installing system packages suggested by the Libero SoC installer can be skipped, as they are already provided by the container environment.
Â
To install Liber 2023.2 download:
https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/fpga/libero-software-later-versions
Â
After download unizip and run instaler. For example:
$ /mnt/c/Libero_SoC_v2023.2_lin$ sudo ./Libero_SoC_v2023.2.bin
Install podman
Use your distribution’s package manger to install podman container runtime, for example:
$ sudo apt-get install podman
Install Libero container image
Build container image from the https://gitlab.conclusive.pl/devices/libero-docker.git repository:
$ git clone https://gitlab.conclusive.pl/devices/libero-docker.git
$ cd libero-docker
$ make
podman build -t libero --build-arg=PACKAGELIST="alsa-lib bzip2-libs bzip2-libs.i686 dbus-libs dejavu-sans-fonts elfutils-libelf elfutils-libelf.i686 elfutils-libs elfutils-libs.i686 expat expat.i686 flac-libs fontconfig fontconfig.i686 freetype freetype-devel freetype.i686 glib2 glib2.i686 glibc glibc.i686 gmp gnutls gsm gsm.i686 keyutils-libs krb5-libs ksh.x86_64 libasyncns libattr libattr.i686 libblkid libcanberra-gtk2.i686 libcap libcap.i686 libcom_err libdrm libdrm.i686 libffi libffi.i686 libgcc libgcrypt libgcrypt.i686 libglvnd libglvnd-egl libglvnd-glx libglvnd-glx.i686 libgpg-error libgpg-error.i686 libICE libICE.i686 libidn2 libmount libnsl libogg libpng libpng12.i686 libpng.i686 libselinux libSM libSM.i686 libsndfile libstdc++ libtasn1 libunistring libuuid libuuid.i686 libvorbis libwayland-client libwayland-client.i686 libwayland-server libwayland-server.i686 libX11 libX11.i686 libX11-xcb libX11-xcb.i686 libXau libXau.i686 libxcb libxcb.i686 libXcomposite libXcursor libXdamage libXdamage.i686 libXext libXext.i686 libXfixes libXfixes.i686 libXi libxkbcommon libxkbcommon-x11 libxml2 libXrandr libXrender libXrender.i686 libxshmfence libxshmfence.i686 libxslt libXtst libXxf86vm libXxf86vm.i686 lz4 lz4-libs mesa-dri-drivers mesa-dri-drivers.i686 mesa-libgbm mesa-libglapi mesa-libglapi.i686 nettle nspr nss nss-util openssl-libs p11-kit PackageKit-gtk3-module.i686 pciutils-libs pcre pcre2 pcre.i686 pulseaudio-libs pulseaudio-libs-glib2 sqlite-libs systemd-libs systemd-libs.i686 xcb-util xcb-util-image xcb-util-keysyms xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-fonts-ISO8859-1-100dpi.noarch xorg-x11-fonts-ISO8859-1-75dpi.noarch xorg-x11-fonts-Type1 xz-libs xz-libs.i686 zlib zlib.i686 mesa-libEGL.i686 redhat-lsb libXft" .
STEP 1/7: FROM centos:8
STEP 2/7: ARG PACKAGELIST
--> Using cache 2afa989aa1f3ad5438cfea0d2051e9df157d1d27cc10306af8353a6bc848010b
--> 2afa989aa1f
STEP 3/7: VOLUME /usr/local/microchip
--> Using cache 5858b55d1e4409c00ec210a11378230794560e9b86554b9511adac3a280c944d
--> 5858b55d1e4
STEP 4/7: RUN sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-* && sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
--> Using cache 6c65f013f320389b5fe62c4f0b3855d1fc240e3a353c177be05addf0aa6fb999
--> 6c65f013f32
STEP 5/7: RUN yum update -y && yum install -y ${PACKAGELIST}
--> Using cache 9997a4082acf140f65127de38f7f48003e908025d0ab2e8d85fe78681bfc7381
--> 9997a4082ac
STEP 6/7: ENV XDG_RUNTIME_DIR=/tmp
--> Using cache 01b9a2c020c9040475cdf525e964fcd05968cf14c33ad8246d3ceed1dc9cd1b2
--> 01b9a2c020c
STEP 7/7: ENTRYPOINT ["/usr/local/microchip/Libero_SoC_v2023.2/Libero/bin64/libero"]
--> Using cache 3d98efc63864e39d09f40a370d7fcc4edd36fe5ea47a894facc3e37e8b76625a
COMMIT libero
--> 3d98efc6386
Successfully tagged localhost/libero:latest
3d98efc63864e39d09f40a370d7fcc4edd36fe5ea47a894facc3e37e8b76625a
Build rchd-pf-base-design using podman:
Before starting a build or launching Libero make sure to configure the LM_LICENSE_FILE
environment variable to point to the license server with available Libero licenses or use the self-hosted license server using the guide below.
When using libero-2023.03
branch, Makefile should automatically detect existence of podman image and use it:
Run a local license server
You can run your own license server from the rchd_pf_base_design
. To do so, you need to first prepare a directory and store all your license files inside:
Edit the hostname in the license.dat file to match your machine hostname
License file name does not matter, but change all file extensions to
*.lic
You can generate multiple licenses and put them all together into the same directory to enable multi-thread builds.
Free Libero Silver licenses can be obtained from Microchip’s website. There is no limit to the number of licenses generated per single user.
Running license server
Stopping license server
Â