{"id":804,"date":"2018-11-04T14:51:58","date_gmt":"2018-11-04T13:51:58","guid":{"rendered":"http:\/\/www.fabienm.eu\/flf\/?p=804"},"modified":"2018-11-04T14:51:58","modified_gmt":"2018-11-04T13:51:58","slug":"installing-libero-on-debian-9","status":"publish","type":"post","link":"http:\/\/www.fabienm.eu\/flf\/installing-libero-on-debian-9\/","title":{"rendered":"Installing Libero on Debian 9"},"content":{"rendered":"<p>This is just an install success story of Libero on Debian 9 (stretch).\u00a0 For the <a href=\"https:\/\/riscv.org\/2018contest\/\">Risc-V contest<\/a>, I recently acquired the Microsemi IGLOO2 development kit named\u00a0<a href=\"https:\/\/www.microsemi.com\/existing-parts\/parts\/143948\">FUTUREM2GL-EVB\u00a0<\/a> distributed by Futur-Electronic.<\/p>\n<p>The development software for the IGLOO2 is named Libero and according to Microsemi, should works on Linux. But officially support only RedHat, CentOS and SuSE &#8230; not Debian. Microsemi provide a Linux installation guide to install it. It&rsquo;s useful but should be adapted for Debian.<\/p>\n<p><strong>Download and install Libero<\/strong><\/p>\n<p>The first thinks to do is <a href=\"http:\/\/soc.microsemi.com\/download\/reg\/download.aspx?p=f=LiberoSoCv11_9_LIN\">to download the installing file<\/a> for Linux (and not the SP1 file which is only an update).\u00a0 Once downloaded we just have to launch it, if it&rsquo;s not executable we can change rights with chmod command.<\/p>\n<pre>$ chmod 666 Libero_SoC_v11.9_Linux.bin\r\n$ .\/Libero_SoC_v11.9_Linux.bin<\/pre>\n<p>An install windows will raise and we can follow directives.<\/p>\n<p><strong>Licensing<\/strong><\/p>\n<p>Once installed, we need to install the license. For that, we need to know our mac address :<\/p>\n<pre>$ ip addr show dev eth0\r\n[...]\r\nlink\/ether 12:34:56:78:9a:bc [...]\r\n<\/pre>\n<p>The key that should be given to Microsemi is in upper case without &lsquo;:&rsquo; :<\/p>\n<pre>$ ipython\r\n\r\nIn [1]: \"12:34:56:78:9a:bc\".replace(':','').upper()                                                                                                                                                             \r\nOut[1]: '123456789ABC'\r\n<\/pre>\n<p>With this key we can then ask for a license file on microsemi website. The official Linux guide talk about license.<strong>dat<\/strong> file, but for me it was license.<strong>zip<\/strong> &#8230; Both are zip file in fact. We can then unflat it with unzip command:<\/p>\n<pre>$ unzip License.zip \r\nArchive:  License.zip\r\n  inflating: License.dat<\/pre>\n<p>The unflated file is a text file that should be edited with you text edito as explained <a href=\"https:\/\/www.microsemi.com\/document-portal\/doc_view\/132361-how-to-set-up-your-linux-environment-for-libero\">in guide<\/a> (page 6).<\/p>\n<p><strong>License server<\/strong><\/p>\n<p>The license server deamon must be downoaded on <a href=\"http:\/\/www.microsemi.com\/products\/fpga-soc\/design-resources\/licensing#downloads\">official microsemi website<\/a>. Choose \u00ab<a href=\"https:\/\/www.microsemi.com\/document-portal\/doc_download\/131989-linux-daemons\">Linux deamon<\/a>\u00bb in table. It&rsquo;s an archive of several binaries that should be unflated :<\/p>\n<pre>$ cd\r\n$ tar -zxvf Linux_Licensing_Daemon.tar.gz\r\nLinux_Licensing_Daemon\/\r\nLinux_Licensing_Daemon\/actlmgrd\r\nLinux_Licensing_Daemon\/lmgrd\r\nLinux_Licensing_Daemon\/lmhostid\r\nLinux_Licensing_Daemon\/lmutil\r\nLinux_Licensing_Daemon\/mgcld\r\nLinux_Licensing_Daemon\/snpslmd\r\nLinux_Licensing_Daemon\/syncad\r\nLinux_Licensing_Daemon\/synplctyd\r\n<\/pre>\n<p><strong>Export shell variables<\/strong><\/p>\n<p>Before launching software, we have to export some paths in our .bashrc :<\/p>\n<pre>#Libero \r\nLIBERO_LICENSE_FOLDER=\/home\/giselle\/flexlm\r\nLD_LIBRARY_PATH=\/usr\/lib\/i386-linux-gnu\/:\/usr\/lib\/x86_64-linux-gnu\/\r\n# For Floating License from a License Server\r\nexport LM_LICENSE_FILE=1702@gisellelaptop:$LM_LICENSE_FILE\r\nexport SNPSLMD_LICENSE_FILE=1702@gisellelaptop:$SNPSLMD_LICENSE_FILE\r\n# &lt;1702&gt; is the port number\r\n# martonilp is the license server host name\r\n#For Node-Locked License\r\nexport LM_LICENSE_FILE=$LIBERO_LICENSE_FOLDER\/license.dat:$LM_LICENSE_FILE\r\nexport SNPSLMD_LICENSE_FILE=$LIBERO_LICENSE_FOLDER\/license.dat:$SNPSLMD_LICENSE_FILE\r\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:\/usr\/lib\r\nexport DISPLAY=:0\r\nexport PATH=\/opt\/microsemi\/Libero_SoC_v11.9\/Libero\/bin:$PATH\r\n<\/pre>\n<p>On my computer, Microsemi softwares are installed in \/opt\/ directory.<\/p>\n<p><strong>Launching Libero<\/strong><\/p>\n<p>First launch license server :<\/p>\n<pre>$ cd\r\n$.\/flexlm\/lmgrd -c ~\/flexlm\/License.dat -log \/tmp\/lmgrd.log\r\n<\/pre>\n<p>Once license server launched we can run Libero :<\/p>\n<pre>$ libero\r\n\/opt\/microsemi\/Libero_SoC_v11.9\/Libero\/bin\/libero_bin: \/opt\/microsemi\/Libero_SoC_v11.9\/Libero\/lib\/libz.so.1: no version information available (required by \/usr\/lib\/i386-linux-gnu\/libpng16.so.16)\r\n<\/pre>\n<p>I had a little problem with libz provided with libero package, then I removed it and linked libz of my distribution :<\/p>\n<pre>$ apt-file search libz.so\r\nlib32z1: \/usr\/lib32\/libz.so.1\r\nlib32z1: \/usr\/lib32\/libz.so.1.2.8\r\nlib32z1-dev: \/usr\/lib32\/libz.so\r\nzlib1g: \/lib\/x86_64-linux-gnu\/libz.so.1\r\nzlib1g: \/lib\/x86_64-linux-gnu\/libz.so.1.2.8\r\nzlib1g-dev: \/usr\/lib\/x86_64-linux-gnu\/libz.so\r\n...\r\n$ cd \/opt\/microsemi\/Libero_SoC_v11.9\/Libero\/lib\r\n$ mv libz.so.1 oldlibz.so.1\r\n$ ln -s \/lib\/x86_64-linux-gnu\/libz.so.1 libz.so.1\r\n<\/pre>\n<p>And then managed to launch it :<\/p>\n<pre>$ libero\r\n<\/pre>\n<figure id=\"attachment_808\" aria-describedby=\"caption-attachment-808\" style=\"width: 1394px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.fabienm.eu\/flf\/wp-content\/uploads\/2018\/11\/libero_screenshot.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-808\" src=\"http:\/\/www.fabienm.eu\/flf\/wp-content\/uploads\/2018\/11\/libero_screenshot.png\" alt=\"\" width=\"1394\" height=\"869\" srcset=\"http:\/\/www.fabienm.eu\/flf\/wp-content\/uploads\/2018\/11\/libero_screenshot.png 1394w, http:\/\/www.fabienm.eu\/flf\/wp-content\/uploads\/2018\/11\/libero_screenshot-300x187.png 300w, http:\/\/www.fabienm.eu\/flf\/wp-content\/uploads\/2018\/11\/libero_screenshot-768x479.png 768w, http:\/\/www.fabienm.eu\/flf\/wp-content\/uploads\/2018\/11\/libero_screenshot-1024x638.png 1024w\" sizes=\"auto, (max-width: 1394px) 100vw, 1394px\" \/><\/a><figcaption id=\"caption-attachment-808\" class=\"wp-caption-text\">Hurrah \\o\/ that works<\/figcaption><\/figure>\n<p>But it&rsquo;s unfortunately not finished.<\/p>\n<p>First, when I tryied to synthesize I had this message in error window :<\/p>\n<pre>\/opt\/microsemi\/Libero_SoC_v11.9\/Synplify\/bin\/synplify_pro: 137: [: unexpected operator\r\n\/opt\/microsemi\/Libero_SoC_v11.9\/Synplify\/bin\/synplify_pro: 151: [: !=: argument expected\r\n\/opt\/microsemi\/Libero_SoC_v11.9\/Synplify\/bin\/synplify_pro: 324: \/opt\/microsemi\/Libero_SoC_v11.9\/Synplify\/bin\/config\/execute: Syntax error: \"(\" unexpected (expecting \";;\")\r\n<\/pre>\n<p>The problem come from the shell Debian uses by default :<\/p>\n<pre>$ ls -lha \/bin\/sh\r\nlrwxrwxrwx 1 root root 4 oct.  29 20:50 \/bin\/sh -&gt; <strong>dash\r\n<\/strong><\/pre>\n<p>This shell doesn&rsquo;t work like <strong>bash<\/strong> and generate some error in synplify scripts. To solve it I simply changed the \/bin\/sh link to \/bin\/bash :<\/p>\n<pre>$ cd \/bin\/\r\n$ sudo mv sh shold\r\n$ sudo ln -s bash sh\r\n<\/pre>\n<p>And I managed to synthesize my design.<\/p>\n<p>&#8230;<\/p>\n<p>But it&rsquo;s not finished ! Once my bitstream generated I would like to download it on the IGLOO2 on kit. For that, we have to install correctly drivers for FlashPro5.<br \/>\nDirectives are given in the official Microsemi Linux install guide, but udev syntax is false on Debian :<\/p>\n<pre>BUS==\"usb\",SYSFS{idProduct}==\"2008\",SYSFS{idVendor}==\"1514\",MODE=\"0660\",GROUP=\"\",SYMLINK+=\"FlashPro5\"\r\nBUS==\"usb\",SYSFS{idProduct}==\"6001\",SYSFS{idVendor}==\"0403\",MODE=\"0660\",GROUP=\"\",SYMLINK+=\"FTDI232\"\r\n<\/pre>\n<p>Right rules are following :<\/p>\n<pre># FlashPro5\r\nSUBSYSTEM==\"usb\", ATTR{idVendor}==\"1514\", ATTR{idProduct}==\"2008\", MODE=\"0666\", GROUP=\"plugdev\"\r\nSUBSYSTEM==\"usb\", ATTR{idVendor}==\"0403\", ATTR{idProduct}==\"6001\", MODE=\"0666\", GROUP=\"plugdev\"\r\n<\/pre>\n<p>Should be written in <strong>\/etc\/udev\/rules.d\/70-microsemi.rules<\/strong> file.<\/p>\n<p>Then fully works\u00a0 <span id=\"result_box\" class=\"short_text\" lang=\"en\"><span class=\"\">and they lived happily and urged a lot of children<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is just an install success story of Libero on Debian 9 (stretch).\u00a0 For the Risc-V contest, I recently acquired the Microsemi IGLOO2 development kit named\u00a0FUTUREM2GL-EVB\u00a0 distributed by Futur-Electronic. The development software for the IGLOO2 is named Libero and according to Microsemi, should works on Linux. But officially support only RedHat, CentOS and SuSE &#8230; &hellip; <a href=\"http:\/\/www.fabienm.eu\/flf\/installing-libero-on-debian-9\/\" class=\"more-link\">Continuer la lecture de <span class=\"screen-reader-text\">Installing Libero on Debian 9<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[22,24,9],"tags":[6,105,106,104,107],"class_list":["post-804","post","type-post","status-publish","format-standard","hentry","category-blog","category-materiel","category-outils","tag-debian","tag-igloo2","tag-libero","tag-microsemi","tag-riscv"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false},"uagb_author_info":{"display_name":"Fabien Marteau","author_link":"http:\/\/www.fabienm.eu\/flf\/author\/admin\/"},"uagb_comment_info":4,"uagb_excerpt":"This is just an install success story of Libero on Debian 9 (stretch).\u00a0 For the Risc-V contest, I recently acquired the Microsemi IGLOO2 development kit named\u00a0FUTUREM2GL-EVB\u00a0 distributed by Futur-Electronic. The development software for the IGLOO2 is named Libero and according to Microsemi, should works on Linux. But officially support only RedHat, CentOS and SuSE &#8230;\u2026","_links":{"self":[{"href":"http:\/\/www.fabienm.eu\/flf\/wp-json\/wp\/v2\/posts\/804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.fabienm.eu\/flf\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.fabienm.eu\/flf\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.fabienm.eu\/flf\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.fabienm.eu\/flf\/wp-json\/wp\/v2\/comments?post=804"}],"version-history":[{"count":4,"href":"http:\/\/www.fabienm.eu\/flf\/wp-json\/wp\/v2\/posts\/804\/revisions"}],"predecessor-version":[{"id":810,"href":"http:\/\/www.fabienm.eu\/flf\/wp-json\/wp\/v2\/posts\/804\/revisions\/810"}],"wp:attachment":[{"href":"http:\/\/www.fabienm.eu\/flf\/wp-json\/wp\/v2\/media?parent=804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.fabienm.eu\/flf\/wp-json\/wp\/v2\/categories?post=804"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.fabienm.eu\/flf\/wp-json\/wp\/v2\/tags?post=804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}