update readme, mostly mediawiki updates
parent
7902c75be5
commit
dba5009052
@ -1,268 +1,321 @@
|
|||||||
---
|
|
||||||
author: Penguin
|
|
||||||
date: 06/19/23
|
|
||||||
title: Installing Microchip FPGA Tools
|
|
||||||
---
|
|
||||||
|
|
||||||
# <span class="todo TODO">TODO</span> Installing via Portage
|
# Table of Contents
|
||||||
|
|
||||||
|
1. [Installing via Portage](#org3a6549a)
|
||||||
|
2. [Installing Manually](#orge000bac)
|
||||||
|
1. [Prerequisites](#org0fd2701)
|
||||||
|
1. [Download Libero](#orgbf609ab)
|
||||||
|
2. [Download SoftConsole](#orgfa083ed)
|
||||||
|
2. [Install](#orgc791c33)
|
||||||
|
1. [Setup](#org180e2e4)
|
||||||
|
2. [Install Libero](#orgfe1c9e4)
|
||||||
|
3. [Install SoftConsole](#orgc4f7dd5)
|
||||||
|
3. [Post-Install](#org1aab735)
|
||||||
|
1. [Installing FlashPro Drivers](#orgcec48c8)
|
||||||
|
2. [Installing Your License](#org01887da)
|
||||||
|
3. [Installing the Licensing Daemon](#orgb0a7b68)
|
||||||
|
3. [Install Yocto Ecosystem](#orgecf7921)
|
||||||
|
1. [Prerequisites](#org2fca117)
|
||||||
|
2. [Create the Yocto Workspace](#org2f15271)
|
||||||
|
3. [Update the repo workspace](#orgce514fa)
|
||||||
|
4. [Setup the Bitbake environment](#org732eaac)
|
||||||
|
5. [Optimize your build environment](#orgac0a974)
|
||||||
|
6. [Build the Disk Image](#orgf5edd26)
|
||||||
|
4. [Creating a Bootable Yocto Linux Image](#org40b9d56)
|
||||||
|
1. [Create a workspace (OPTIONAL)](#orga1efcaa)
|
||||||
|
2. [Update the repo workspace](#org35bd6db)
|
||||||
|
3. [Set up the Bitbake environment](#org4c59d20)
|
||||||
|
4. [Building Board Disk Image](#orgbaf8a8f)
|
||||||
|
1. [Building a Linux Image with a root file system (RootFS)](#org72cdb3e)
|
||||||
|
2. [Building a RAM-based Root Filestystem](#org1d95b8f)
|
||||||
|
3. [Building a Linux Image for an external QSPI flash memory](#orgbf5cb99)
|
||||||
|
4. [Flashing an SD Card](#org1cfcc9a)
|
||||||
|
5. [References](#org30d3773)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a id="org3a6549a"></a>
|
||||||
|
|
||||||
|
# TODO Installing via Portage
|
||||||
|
|
||||||
|
|
||||||
|
<a id="orge000bac"></a>
|
||||||
|
|
||||||
# Installing Manually
|
# Installing Manually
|
||||||
|
|
||||||
|
|
||||||
|
<a id="org0fd2701"></a>
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
``` bash
|
sudo emerge -a sys-apps/lsb-release
|
||||||
sudo emerge -a sys-apps/lsb-release
|
|
||||||
```
|
|
||||||
|
<a id="orgbf609ab"></a>
|
||||||
|
|
||||||
### Download Libero
|
### Download Libero
|
||||||
|
|
||||||
Download the latest version from
|
Download the latest version from [here](https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/fpga/libero-software-later-versions).
|
||||||
[here](https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/fpga/libero-software-later-versions).
|
|
||||||
|
|
||||||
``` bash
|
mkdir -p ~/Documents/MicrochipInstallers
|
||||||
mkdir -p ~/Documents/MicrochipInstallers
|
cd ~/Documents/MicrochipInstallers
|
||||||
cd ~/Documents/MicrochipInstallers
|
mv ~/Downloads/libero_soc_*.*_web_lin.zip .
|
||||||
mv ~/Downloads/libero_soc_*.*_web_lin.zip .
|
unzip libero_soc_*.*_web_lin.zip
|
||||||
unzip libero_soc_*.*_web_lin.zip
|
|
||||||
```
|
|
||||||
|
<a id="orgfa083ed"></a>
|
||||||
|
|
||||||
### Download SoftConsole
|
### Download SoftConsole
|
||||||
|
|
||||||
Download the latest version from
|
Download the latest version from [here](https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/soc-fpga/softconsole).
|
||||||
[here](https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/soc-fpga/softconsole).
|
|
||||||
|
mkdir -p ~/Documents/MicrochipInstallers
|
||||||
|
cd ~/Documents/MicrochipInstallers
|
||||||
|
mv ~/Downloads/Microchip-SoftConsole-*.*-RISC-V-*-linux-x64-installer.run .
|
||||||
|
|
||||||
``` bash
|
|
||||||
mkdir -p ~/Documents/MicrochipInstallers
|
<a id="orgc791c33"></a>
|
||||||
cd ~/Documents/MicrochipInstallers
|
|
||||||
mv ~/Downloads/Microchip-SoftConsole-*.*-RISC-V-*-linux-x64-installer.run .
|
|
||||||
```
|
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
|
||||||
|
<a id="org180e2e4"></a>
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
``` bash
|
export INSTALL_DIR=/opt/microchip
|
||||||
export INSTALL_DIR=/opt/microchip
|
sudo mkdir -p $INSTALL_DIR
|
||||||
sudo mkdir -p $INSTALL_DIR
|
sudo chown $USER:$USER $INSTALL_DIR
|
||||||
sudo chown $USER:$USER $INSTALL_DIR
|
|
||||||
```
|
|
||||||
|
<a id="orgfe1c9e4"></a>
|
||||||
|
|
||||||
### Install Libero
|
### Install Libero
|
||||||
|
|
||||||
Installer Directions:
|
Installer Directions:
|
||||||
|
|
||||||
- Install Directory:
|
- Install Directory: $INSTALL\_DIR/Libero\_SoC\_<version\_major>.<version\_minor>
|
||||||
$INSTALL_DIR/Libero_SoC\_\<version_major\>.\<version_minor\>
|
- Common Directory: $INSTALL\_DIR/common
|
||||||
- Common Directory: $INSTALL_DIR/common
|
|
||||||
- Install Set: Everything
|
- Install Set: Everything
|
||||||
|
|
||||||
``` bash
|
cd ~/Documents/MicrochipInstallers
|
||||||
cd ~/Documents/MicrochipInstallers
|
./Libero_SoC_*.*_Web.bin
|
||||||
./Libero_SoC_*.*_Web.bin
|
|
||||||
```
|
|
||||||
|
|
||||||
1. Gentoo Specific Libero Fixes
|
1. Gentoo Specific Libero Fixes
|
||||||
|
|
||||||
When attempting to run
|
When attempting to run `/opt/microchip/Libero_SoC_v2024.1/Libero/bin64/libero`, you will most likely be met with the following error:
|
||||||
`/opt/microchip/Libero_SoC_v2024.1/Libero/bin64/libero`, you will
|
|
||||||
most likely be met with the following error:
|
Warning: You are running a version of Suse Linux that is not supported.
|
||||||
|
Please refer to Libero SoC Release Note for the detail of supported operating systems.
|
||||||
``` example
|
/opt/microchip/Libero_SoC_v2024.1/Libero/bin64/libero_bin: /opt/microchip/Libero_SoC_v2024.1/Libero/lib64/rhel/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib64/libicuuc.so.74)
|
||||||
Warning: You are running a version of Suse Linux that is not supported.
|
|
||||||
Please refer to Libero SoC Release Note for the detail of supported operating systems.
|
The way I chose to combat this was to delete all of the `libstdc++.so.6` files that came with the tools and then supplying the system’s provides files via $LD\_LIBRARY\_PATH. I’ve also chosen to do this with git commits so you don’t have to start all over if you mess up. The git parts are optional but recommended. (Thanks to sam for helping me figure this out)
|
||||||
/opt/microchip/Libero_SoC_v2024.1/Libero/bin64/libero_bin: /opt/microchip/Libero_SoC_v2024.1/Libero/lib64/rhel/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib64/libicuuc.so.74)
|
|
||||||
```
|
cd /opt/microchip/Libero_SoC_*.*
|
||||||
|
git init
|
||||||
The way I chose to combat this was to delete all of the
|
git add .
|
||||||
`libstdc++.so.6` files that came with the tools and then supplying
|
git commit -m "init"
|
||||||
the system's provides files via $LD_LIBRARY_PATH. I've also chosen
|
find . -name "libstdc++.so.6" -type f -or -type l -delete
|
||||||
to do this with git commits so you don't have to start all over if
|
git add .
|
||||||
you mess up. The git parts are optional but recommended. (Thanks to
|
git commit -m "removed tool specific libstdc++.so.6 files"
|
||||||
sam for helping me figure this out)
|
# test it to make sure it launches
|
||||||
|
LD_LIBRARY_PATH="/usr/lib/gcc/x86_64-pc-linux-gnu/13" ./Libero/bin64/libero
|
||||||
``` bash
|
|
||||||
cd /opt/microchip/Libero_SoC_*.*
|
This should launch and then give you an error saying license not found. This is normal and will be fixed later in the guide.
|
||||||
git init
|
|
||||||
git add .
|
|
||||||
git commit -m "init"
|
<a id="orgc4f7dd5"></a>
|
||||||
find . -name "libstdc++.so.6" -type f -or -type l -delete
|
|
||||||
git add .
|
|
||||||
git commit -m "removed tool specific libstdc++.so.6 files"
|
|
||||||
# test it to make sure it launches
|
|
||||||
LD_LIBRARY_PATH="/usr/lib/gcc/x86_64-pc-linux-gnu/13" ./Libero/bin64/libero
|
|
||||||
```
|
|
||||||
|
|
||||||
This should launch and then give you an error saying license not
|
|
||||||
found. This is normal and will be fixed later in the guide.
|
|
||||||
|
|
||||||
### Install SoftConsole
|
### Install SoftConsole
|
||||||
|
|
||||||
``` bash
|
cd ~/Documents/MicrochipInstallers
|
||||||
cd ~/Documents/MicrochipInstallers
|
./Microchip-SoftConsole-*.*-RISC-V-*-linux-x64-installer.run
|
||||||
./Microchip-SoftConsole-*.*-RISC-V-*-linux-x64-installer.run
|
|
||||||
```
|
|
||||||
|
<a id="org1aab735"></a>
|
||||||
|
|
||||||
## Post-Install
|
## Post-Install
|
||||||
|
|
||||||
``` bash
|
sudo $INSTALL_DIR/Libero_SoC_*.*/Logs/req_to_install.sh
|
||||||
sudo $INSTALL_DIR/Libero_SoC_*.*/Logs/req_to_install.sh
|
|
||||||
```
|
|
||||||
|
<a id="orgcec48c8"></a>
|
||||||
|
|
||||||
### Installing FlashPro Drivers
|
### Installing FlashPro Drivers
|
||||||
|
|
||||||
You need to have the FlashPro device to install these, so ignore this if
|
You need to have the FlashPro device to install these, so ignore this if you don’t have a FlashPro device.
|
||||||
you don't have a FlashPro device.
|
|
||||||
|
|
||||||
1. FlashPro 5
|
1. FlashPro 5
|
||||||
|
|
||||||
``` bash
|
sudo $INSTALL_DIR/Libero_SoC_v2023.1/Libero/bin/udev_install
|
||||||
sudo $INSTALL_DIR/Libero_SoC_v2023.1/Libero/bin/udev_install
|
|
||||||
```
|
|
||||||
|
|
||||||
2. FlashPro 6
|
2. FlashPro 6
|
||||||
|
|
||||||
``` bash
|
sudo $INSTALL_DIR/Libero_SoC_v2023.1/Libero/bin/fp6_env_install
|
||||||
sudo $INSTALL_DIR/Libero_SoC_v2023.1/Libero/bin/fp6_env_install
|
|
||||||
```
|
|
||||||
|
<a id="org01887da"></a>
|
||||||
|
|
||||||
### Installing Your License
|
### Installing Your License
|
||||||
|
|
||||||
You can register for a microchip and request a year-long evaluation
|
You can register for a microchip and request a year-long evaluation license here: <https://www.microchipdirect.com/login?redirectTo=%2Ffpga-software-products>
|
||||||
license here:
|
|
||||||
<https://www.microchipdirect.com/login?redirectTo=%2Ffpga-software-products>
|
|
||||||
|
|
||||||
You'll want to get the **LIB-PL-MACID-F-EVAL** license, which is a
|
You’ll want to get the **LIB-PL-MACID-F-EVAL** license, which is a floating linux license.
|
||||||
floating linux license.
|
|
||||||
|
|
||||||
``` bash
|
mkdir -p $INSTALL_DIR/Libero_SoC_v2023.1/license
|
||||||
mkdir -p $INSTALL_DIR/Libero_SoC_v2023.1/license
|
cp /path/to/license /opt/microchip/Libero_SoC_v2023/license
|
||||||
cp /path/to/license /opt/microchip/Libero_SoC_v2023/license
|
|
||||||
```
|
|
||||||
|
<a id="orgb0a7b68"></a>
|
||||||
|
|
||||||
### Installing the Licensing Daemon
|
### Installing the Licensing Daemon
|
||||||
|
|
||||||
``` bash
|
sudo cp scripts/libero-license.service /etc/systemd/user
|
||||||
sudo cp scripts/libero-license.service /etc/systemd/user
|
|
||||||
```
|
|
||||||
|
<a id="orgecf7921"></a>
|
||||||
|
|
||||||
# Install Yocto Ecosystem
|
# Install Yocto Ecosystem
|
||||||
|
|
||||||
|
|
||||||
|
<a id="org2fca117"></a>
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
``` bash
|
sudo emerge -pv gawk wget dev-vcs/git diffstat unzip sys-apps/texinfo chrpath socat libsdl xterm bmap-tools repo
|
||||||
sudo emerge -pv gawk wget dev-vcs/git diffstat unzip sys-apps/texinfo chrpath socat libsdl xterm bmap-tools repo
|
|
||||||
```
|
sudo emerge -a
|
||||||
|
|
||||||
``` bash
|
|
||||||
sudo emerge -a
|
<a id="org2f15271"></a>
|
||||||
```
|
|
||||||
|
|
||||||
## Create the Yocto Workspace
|
## Create the Yocto Workspace
|
||||||
|
|
||||||
``` bash
|
mkdir yocto-dev && cd yocto-dev
|
||||||
mkdir yocto-dev && cd yocto-dev
|
repo init -u https://github.com/polarfire-soc/polarfire-soc-yocto-manifests.git -b main -m default.xml
|
||||||
repo init -u https://github.com/polarfire-soc/polarfire-soc-yocto-manifests.git -b main -m default.xml
|
|
||||||
```
|
|
||||||
|
<a id="orgce514fa"></a>
|
||||||
|
|
||||||
## Update the repo workspace
|
## Update the repo workspace
|
||||||
|
|
||||||
``` bash
|
repo sync
|
||||||
repo sync
|
repo rebase
|
||||||
repo rebase
|
|
||||||
```
|
|
||||||
|
<a id="org732eaac"></a>
|
||||||
|
|
||||||
## Setup the Bitbake environment
|
## Setup the Bitbake environment
|
||||||
|
|
||||||
``` bash
|
. ./meta-polarfire-soc-yocto-bsp/polarfire-soc_yocto_setup.sh
|
||||||
. ./meta-polarfire-soc-yocto-bsp/polarfire-soc_yocto_setup.sh
|
|
||||||
```
|
|
||||||
|
<a id="orgac0a974"></a>
|
||||||
|
|
||||||
## Optimize your build environment
|
## Optimize your build environment
|
||||||
|
|
||||||
Yocto builds take a very long time. We can optimize this.
|
Yocto builds take a very long time. We can optimize this.
|
||||||
|
|
||||||
``` bash
|
mkdir -p ${HOME}/.local/share/yocto/downloads
|
||||||
mkdir -p ${HOME}/.local/share/yocto/downloads
|
mkdir -p ${HOME}/.local/share/yocto/sstate-cache
|
||||||
mkdir -p ${HOME}/.local/share/yocto/sstate-cache
|
mkdir -p ${HOME}/.local/share/yocto/persistent
|
||||||
mkdir -p ${HOME}/.local/share/yocto/persistent
|
cd <project_root>/build/conf/
|
||||||
cd <project_root>/build/conf/
|
|
||||||
|
|
||||||
|
echo '
|
||||||
echo '
|
BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
|
||||||
BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
|
PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count() - 1}"
|
||||||
PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count() - 1}"
|
DL_DIR = "${HOME}/.local/share/yocto/downloads"
|
||||||
DL_DIR = "${HOME}/.local/share/yocto/downloads"
|
SSTATE_DIR = "${HOME}/.local/share/yocto/sstate-cache"
|
||||||
SSTATE_DIR = "${HOME}/.local/share/yocto/sstate-cache"
|
PERSISTENT_DIR=${HOME/.local/share/yocto/persistent
|
||||||
PERSISTENT_DIR=${HOME/.local/share/yocto/persistent
|
SOURCE_MIRROR_URL ?= "file://${HOME}/.local/share/yocto/downloads"
|
||||||
SOURCE_MIRROR_URL ?= "file://${HOME}/.local/share/yocto/downloads"
|
INHERIT += "own-mirrors"
|
||||||
INHERIT += "own-mirrors"
|
BB_GENERATE_MIRROR_TARBALLS = "1"
|
||||||
BB_GENERATE_MIRROR_TARBALLS = "1"
|
# uncomment to test sources
|
||||||
# uncomment to test sources
|
# BB_NO_NETWORK = "1"
|
||||||
# BB_NO_NETWORK = "1"
|
|
||||||
|
# remove static deps
|
||||||
# remove static deps
|
STATICLIBCONF = "--disable-static"
|
||||||
STATICLIBCONF = "--disable-static"
|
DISABLE_STATIC:pn-openssl = ""
|
||||||
DISABLE_STATIC:pn-openssl = ""
|
DISABLE_STATIC:pn-openssl-native = ""
|
||||||
DISABLE_STATIC:pn-openssl-native = ""
|
DISABLE_STATIC:pn-nativesdk-openssl = ""
|
||||||
DISABLE_STATIC:pn-nativesdk-openssl = ""
|
DISABLE_STATIC:pn-libtalloc = ""
|
||||||
DISABLE_STATIC:pn-libtalloc = ""
|
EXTRA_OECONF += "${STATICLIBCONF}"
|
||||||
EXTRA_OECONF += "${STATICLIBCONF}"
|
' >> local.conf
|
||||||
' >> local.conf
|
|
||||||
```
|
|
||||||
|
<a id="orgf5edd26"></a>
|
||||||
|
|
||||||
## Build the Disk Image
|
## Build the Disk Image
|
||||||
|
|
||||||
``` bash
|
cd $PROOT
|
||||||
cd $PROOT
|
bitbake mpfs-dev-cli
|
||||||
bitbake mpfs-dev-cli
|
|
||||||
```
|
|
||||||
|
<a id="org40b9d56"></a>
|
||||||
|
|
||||||
# Creating a Bootable Yocto Linux Image
|
# Creating a Bootable Yocto Linux Image
|
||||||
|
|
||||||
We have two options: Create a new workspace, or we can use this repo as
|
We have two options: Create a new workspace, or we can use this repo as a workspace because this repo is my working workspace.
|
||||||
a workspace because this repo is my working workspace.
|
|
||||||
|
|
||||||
|
<a id="orga1efcaa"></a>
|
||||||
|
|
||||||
## Create a workspace (OPTIONAL)
|
## Create a workspace (OPTIONAL)
|
||||||
|
|
||||||
mkdir yocto-dev && cd yocto-dev
|
mkdir yocto-dev && cd yocto-dev
|
||||||
repo init -u https://github.com/polarfire-soc/polarfire-soc-yocto-manifests.git -b main -m default.xml
|
repo init -u https://github.com/polarfire-soc/polarfire-soc-yocto-manifests.git -b main -m default.xml
|
||||||
|
|
||||||
|
|
||||||
|
<a id="org35bd6db"></a>
|
||||||
|
|
||||||
## Update the repo workspace
|
## Update the repo workspace
|
||||||
|
|
||||||
``` bash
|
repo sync
|
||||||
repo sync
|
repo rebase
|
||||||
repo rebase
|
|
||||||
```
|
|
||||||
|
<a id="org4c59d20"></a>
|
||||||
|
|
||||||
## Set up the Bitbake environment
|
## Set up the Bitbake environment
|
||||||
|
|
||||||
``` bash
|
. ./meta-polarfire-soc-yocto-bsp/polarfire-soc_yocto_setup.sh
|
||||||
. ./meta-polarfire-soc-yocto-bsp/polarfire-soc_yocto_setup.sh
|
|
||||||
```
|
|
||||||
|
<a id="orgbaf8a8f"></a>
|
||||||
|
|
||||||
## Building Board Disk Image
|
## Building Board Disk Image
|
||||||
|
|
||||||
|
|
||||||
|
<a id="org72cdb3e"></a>
|
||||||
|
|
||||||
### Building a Linux Image with a root file system (RootFS)
|
### Building a Linux Image with a root file system (RootFS)
|
||||||
|
|
||||||
``` bash
|
MACHINE=icicle-kit-es bitbake mpfs-dev-cli
|
||||||
MACHINE=icicle-kit-es bitbake mpfs-dev-cli
|
|
||||||
```
|
|
||||||
|
<a id="org1d95b8f"></a>
|
||||||
|
|
||||||
### Building a RAM-based Root Filestystem
|
### Building a RAM-based Root Filestystem
|
||||||
|
|
||||||
``` bash
|
MACHINE=icicle-kit-es bitbake -R conf/initramfs.conf mpfs-initramfs-image
|
||||||
MACHINE=icicle-kit-es bitbake -R conf/initramfs.conf mpfs-initramfs-image
|
|
||||||
```
|
|
||||||
|
<a id="orgbf5cb99"></a>
|
||||||
|
|
||||||
### Building a Linux Image for an external QSPI flash memory
|
### Building a Linux Image for an external QSPI flash memory
|
||||||
|
|
||||||
|
|
||||||
|
<a id="org1cfcc9a"></a>
|
||||||
|
|
||||||
### Flashing an SD Card
|
### Flashing an SD Card
|
||||||
|
|
||||||
``` bash
|
zcat build/tmp-glibc/deploy/images/icicle-kit-es/mpfs-dev-cli-icicle-kit-es.wic.gz | sudo dd of=/dev/sdX bs=4096 iflag=fullblock oflag=direct conv=fsync status=progress
|
||||||
zcat build/tmp-glibc/deploy/images/icicle-kit-es/mpfs-dev-cli-icicle-kit-es.wic.gz | sudo dd of=/dev/sdX bs=4096 iflag=fullblock oflag=direct conv=fsync status=progress
|
|
||||||
```
|
|
||||||
|
<a id="org30d3773"></a>
|
||||||
|
|
||||||
# References
|
# References
|
||||||
|
|
||||||
[PolarFire Yocto
|
1. [PolarFire Yocto Github](https://github.com/polarfire-soc/meta-polarfire-soc-yocto-bsp)
|
||||||
Github](https://github.com/polarfire-soc/meta-polarfire-soc-yocto-bsp)
|
|
||||||
|
@ -1,169 +1,134 @@
|
|||||||
|
|
||||||
= TODO Installing via Portage =
|
= TODO Installing via Portage =
|
||||||
|
|
||||||
= Installing Manually =
|
= Installing Manually =
|
||||||
== Prerequisites ==
|
== Prerequisites ==
|
||||||
sudo emerge -a sys-apps/lsb-release app-crypt/mit-krb5
|
{{RootCmd|emerge -a sys-apps/lsb-release}}
|
||||||
|
|
||||||
=== Download Libero ===
|
=== Download Libero ===
|
||||||
Download the latest version from [https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/fpga/libero-software-later-versions here].
|
Download the latest version from [https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/fpga/libero-software-later-versions here].
|
||||||
|
|
||||||
mkdir -p ~/Documents/MicrochipInstallers
|
{{Cmd|mkdir -p ~/Documents/MicrochipInstallers}}
|
||||||
cd ~/Documents/MicrochipInstallers
|
{{Cmd|cd ~/Documents/MicrochipInstallers}}
|
||||||
mv ~/Downloads/libero_soc_*.*_web_lin.zip .
|
{{Cmd|mv ~/Downloads/libero_soc_*.*_web_lin.zip .}}
|
||||||
unzip libero_soc_*.*_web_lin.zip
|
{{Cmd|unzip libero_soc_*.*_web_lin.zip}}
|
||||||
|
|
||||||
=== Download SoftConsole ===
|
=== Download SoftConsole ===
|
||||||
Download the latest version from [https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/soc-fpga/softconsole here].
|
Download the latest version from [https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/soc-fpga/softconsole here].
|
||||||
|
{{Cmd|mkdir -p ~/Documents/MicrochipInstallers}}
|
||||||
mkdir -p ~/Documents/MicrochipInstallers
|
{{Cmd|cd ~/Documents/MicrochipInstallers}}
|
||||||
cd ~/Documents/MicrochipInstallers
|
{{Cmd|mv ~/Downloads/Microchip-SoftConsole-*.*-RISC-V-*-linux-x64-installer.run .}}
|
||||||
mv ~/Downloads/Microchip-SoftConsole-*.*-RISC-V-*-linux-x64-installer.run .
|
|
||||||
|
|
||||||
{{RootCmd|a command}}
|
|
||||||
|
|
||||||
== Install ==
|
== Install ==
|
||||||
=== Setup ===
|
=== Setup ===
|
||||||
export INSTALL_DIR=/opt/microchip
|
{{Cmd|export INSTALL_DIR{{=}}/opt/microchip}}
|
||||||
sudo mkdir -p $INSTALL_DIR
|
{{RootCmd|mkdir -p $INSTALL_DIR}}
|
||||||
sudo chown $USER:$USER $INSTALL_DIR
|
{{RootCmd|chown $USER:$USER $INSTALL_DIR}}
|
||||||
|
|
||||||
=== Install Libero ===
|
=== Install Libero ===
|
||||||
Installer Directions:
|
Installer Directions:
|
||||||
|
|
||||||
*Install Directory: $INSTALL\_DIR/Libero\_SoC\_<version\_major>.<version\_minor>
|
*Install Directory: $INSTALL\_DIR/Libero\_SoC\_<version\_major>.<version\_minor>
|
||||||
|
|
||||||
*Common Directory: $INSTALL\_DIR/common
|
*Common Directory: $INSTALL\_DIR/common
|
||||||
|
|
||||||
*Install Set: Everything
|
*Install Set: Everything
|
||||||
|
|
||||||
cd ~/Documents/MicrochipInstallers
|
{{Cmd|cd ~/Documents/MicrochipInstallers}}
|
||||||
./Libero_SoC_*.*_Web.bin
|
{{Cmd|./Libero_SoC_*.*_Web.bin}}
|
||||||
|
|
||||||
==== Gentoo Specific Libero Fixes ====
|
==== Gentoo Specific Libero Fixes ====
|
||||||
When attempting to run <tt>/opt/microchip/Libero_SoC_v2024.1/Libero/bin64/libero</tt>, you will most likely be met with the following error:
|
When attempting to run <tt>/opt/microchip/Libero_SoC_v2024.1/Libero/bin64/libero</tt>, you will most likely be met with the following error:
|
||||||
|
|
||||||
Warning: You are running a version of Suse Linux that is not supported.
|
{{Cmd|/opt/microchip/Libero_SoC_v2024.1/Libero/bin64/libero|output=<pre>
|
||||||
Please refer to Libero SoC Release Note for the detail of supported operating systems.
|
Warning: You are running a version of Suse Linux that is not supported.
|
||||||
/opt/microchip/Libero_SoC_v2024.1/Libero/bin64/libero_bin: /opt/microchip/Libero_SoC_v2024.1/Libero/lib64/rhel/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib64/libicuuc.so.74)
|
Please refer to Libero SoC Release Note for the detail of supported operating systems.
|
||||||
|
/opt/microchip/Libero_SoC_v2024.1/Libero/bin64/libero_bin: /opt/microchip/Libero_SoC_v2024.1/Libero/lib64/rhel/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib64/libicuuc.so.74) </pre>}}
|
||||||
|
|
||||||
The way I chose to combat this was to delete all of the <tt>libstdc++.so.6</tt> files that came with the tools and then supplying the system’s provides files via $LD\_LIBRARY\_PATH. I’ve also chosen to do this with git commits so you don’t have to start all over if you mess up. The git parts are optional but recommended. (Thanks to sam for helping me figure this out)
|
The way I chose to combat this was to delete all of the <tt>libstdc++.so.6</tt> files that came with the tools and then supplying the system’s provides files via $LD\_LIBRARY\_PATH. I’ve also chosen to do this with git commits so you don’t have to start all over if you mess up. The git parts are optional but recommended. (Thanks to sam for helping me figure this out)
|
||||||
|
{{Cmd|cd /opt/microchip/Libero_SoC_*.*}}
|
||||||
cd /opt/microchip/Libero_SoC_*.*
|
{{Cmd|git init}}
|
||||||
git init
|
{{Cmd|git add .}}
|
||||||
git add .
|
{{Cmd|git commit -m "init"}}
|
||||||
git commit -m "init"
|
{{Cmd|find . -name "libstdc++.so.6" -type f -or -type l -delete}}
|
||||||
find . -name "libstdc++.so.6" -type f -or -type l -delete
|
{{Cmd|git add .}}
|
||||||
git add .
|
{{Cmd|git commit -m "removed tool specific libstdc++.so.6 files"}}
|
||||||
git commit -m "removed tool specific libstdc++.so.6 files"
|
{{Cmd|# test it to make sure it launches
|
||||||
# test it to make sure it launches
|
LD_LIBRARY_PATH{{=}}"/usr/lib/gcc/x86_64-pc-linux-gnu/13" ./Libero/bin64/libero}}
|
||||||
LD_LIBRARY_PATH="/usr/lib/gcc/x86_64-pc-linux-gnu/13" ./Libero/bin64/libero
|
|
||||||
|
|
||||||
This should launch and then give you an error saying license not found. This is normal and will be fixed later in the guide.
|
This should launch and then give you an error saying license not found. This is normal and will be fixed later in the guide.
|
||||||
|
|
||||||
=== Install SoftConsole ===
|
=== Install SoftConsole ===
|
||||||
cd ~/Documents/MicrochipInstallers
|
{{Cmd|cd ~/Documents/MicrochipInstallers}}
|
||||||
./Microchip-SoftConsole-*.*-RISC-V-*-linux-x64-installer.run
|
{{Cmd|./Microchip-SoftConsole-*.*-RISC-V-*-linux-x64-installer.run}}
|
||||||
|
|
||||||
== Post-Install ==
|
== Post-Install ==
|
||||||
sudo $INSTALL_DIR/Libero_SoC_*.*/Logs/req_to_install.sh
|
{{RootCmd|$INSTALL_DIR/Libero_SoC_*.*/Logs/req_to_install.sh}}
|
||||||
|
|
||||||
=== Installing FlashPro Drivers ===
|
=== Installing FlashPro Drivers ===
|
||||||
You need to have the FlashPro device to install these, so ignore this if you don’t have a FlashPro device.
|
You need to have the FlashPro device to install these, so ignore this if you don’t have a FlashPro device.
|
||||||
|
|
||||||
==== FlashPro 5 ====
|
==== FlashPro 5 ====
|
||||||
sudo $INSTALL_DIR/Libero_SoC_v2023.1/Libero/bin/udev_install
|
{{RootCmd|$INSTALL_DIR/Libero_SoC_v2023.1/Libero/bin/udev_install}}
|
||||||
|
|
||||||
==== FlashPro 6 ====
|
==== FlashPro 6 ====
|
||||||
sudo $INSTALL_DIR/Libero_SoC_v2023.1/Libero/bin/fp6_env_install
|
{{RootCmd|$INSTALL_DIR/Libero_SoC_v2023.1/Libero/bin/fp6_env_install}}
|
||||||
|
|
||||||
=== Installing Your License ===
|
=== Installing Your License ===
|
||||||
You can register for a microchip and request a year-long evaluation license here: https://www.microchipdirect.com/login?redirectTo=%2Ffpga-software-products
|
You can register for a microchip and request a year-long evaluation license here: https://www.microchipdirect.com/login?redirectTo=%2Ffpga-software-products
|
||||||
|
|
||||||
You’ll want to get the '''LIB-PL-MACID-F-EVAL''' license, which is a floating linux license.
|
You’ll want to get the '''LIB-PL-MACID-F-EVAL''' license, which is a floating linux license.
|
||||||
|
|
||||||
mkdir -p $INSTALL_DIR/Libero_SoC_v2023.1/license
|
{{Cmd|mkdir -p $INSTALL_DIR/Libero_SoC_v2023.1/license}}
|
||||||
cp /path/to/license /opt/microchip/Libero_SoC_v2023/license
|
{{Cmd|cp /path/to/license /opt/microchip/Libero_SoC_v2023/license}}
|
||||||
|
|
||||||
=== Installing the Licensing Daemon ===
|
=== Installing the Licensing Daemon ===
|
||||||
sudo cp scripts/libero-license.service /etc/systemd/user
|
{{RootCmd|cp scripts/libero-license.service /etc/systemd/user}}
|
||||||
|
|
||||||
= Install Yocto Ecosystem =
|
= Install Yocto Ecosystem =
|
||||||
== Prerequisites ==
|
== Prerequisites ==
|
||||||
sudo emerge -pv gawk wget dev-vcs/git diffstat unzip sys-apps/texinfo chrpath socat libsdl xterm bmap-tools repo
|
{{RootCmd|emerge -av gawk wget dev-vcs/git diffstat unzip sys-apps/texinfo chrpath socat libsdl xterm bmap-tools repo}}
|
||||||
|
|
||||||
sudo emerge -a
|
|
||||||
|
|
||||||
== Create the Yocto Workspace ==
|
== Create the Yocto Workspace ==
|
||||||
mkdir yocto-dev && cd yocto-dev
|
{{Cmd|mkdir yocto-dev && cd yocto-dev}}
|
||||||
repo init -u https://github.com/polarfire-soc/polarfire-soc-yocto-manifests.git -b main -m default.xml
|
{{Cmd|repo init -u https://github.com/polarfire-soc/polarfire-soc-yocto-manifests.git -b main -m default.xml}}
|
||||||
|
|
||||||
== Update the repo workspace ==
|
== Update the repo workspace ==
|
||||||
repo sync
|
{{Cmd|repo sync}}
|
||||||
repo rebase
|
{{Cmd|repo rebase}}
|
||||||
|
|
||||||
== Setup the Bitbake environment ==
|
== Setup the Bitbake environment ==
|
||||||
. ./meta-polarfire-soc-yocto-bsp/polarfire-soc_yocto_setup.sh
|
{{Cmd|. ./meta-polarfire-soc-yocto-bsp/polarfire-soc_yocto_setup.sh}}
|
||||||
|
|
||||||
== Optimize your build environment ==
|
== Optimize your build environment ==
|
||||||
Yocto builds take a very long time. We can optimize this.
|
Yocto builds take a very long time. We can optimize this.
|
||||||
|
|
||||||
mkdir -p ${HOME}/.local/share/yocto/downloads
|
{{Cmd|mkdir -p "$HOME/.local/share/yocto/downloads"}}
|
||||||
mkdir -p ${HOME}/.local/share/yocto/sstate-cache
|
{{Cmd|mkdir -p "$HOME/.local/share/yocto/sstate-cache"}}
|
||||||
mkdir -p ${HOME}/.local/share/yocto/persistent
|
{{Cmd|mkdir -p "$HOME/.local/share/yocto/persistent"}}
|
||||||
cd <project_root>/build/conf/
|
{{Cmd|cd <project_root>/build/conf/}}
|
||||||
|
|
||||||
|
Append the following to =<project_root>/build/conf/local.conf= to disable static dependencies and set up non-temporary directories for your yocto build artifacts to live.
|
||||||
echo '
|
{{FileBox|filename=local.conf|lang=bash|1=BB_NUMBER_THREADS ?{{=}} "${@oe.utils.cpu_count()}"
|
||||||
BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
|
PARALLEL_MAKE ?{{=}} "-j ${@oe.utils.cpu_count() - 1}"
|
||||||
PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count() - 1}"
|
DL_DIR {{=}} "${HOME}/.local/share/yocto/downloads"
|
||||||
DL_DIR = "${HOME}/.local/share/yocto/downloads"
|
SSTATE_DIR {{=}} ${HOME}/.local/share/yocto/sstate-cache"
|
||||||
SSTATE_DIR = "${HOME}/.local/share/yocto/sstate-cache"
|
PERSISTENT_DIR{{=}}"${HOME}/.local/share/yocto/persistent"
|
||||||
PERSISTENT_DIR=${HOME/.local/share/yocto/persistent
|
SOURCE_MIRROR_URL ?{{=}} "file://${HOME}/.local/share/yocto/downloads"
|
||||||
SOURCE_MIRROR_URL ?= "file://${HOME}/.local/share/yocto/downloads"
|
INHERIT +{{=}} "own-mirrors"
|
||||||
INHERIT += "own-mirrors"
|
BB_GENERATE_MIRROR_TARBALLS {{=}} "1"
|
||||||
BB_GENERATE_MIRROR_TARBALLS = "1"
|
# uncomment to test sources
|
||||||
# uncomment to test sources
|
# BB_NO_NETWORK {{=}} "1"
|
||||||
# BB_NO_NETWORK = "1"
|
|
||||||
|
# remove static deps
|
||||||
# remove static deps
|
STATICLIBCONF {{=}} "--disable-static"
|
||||||
STATICLIBCONF = "--disable-static"
|
DISABLE_STATIC:pn-openssl {{=}} ""
|
||||||
DISABLE_STATIC:pn-openssl = ""
|
DISABLE_STATIC:pn-openssl-native {{=}} ""
|
||||||
DISABLE_STATIC:pn-openssl-native = ""
|
DISABLE_STATIC:pn-nativesdk-openssl {{=}} ""
|
||||||
DISABLE_STATIC:pn-nativesdk-openssl = ""
|
DISABLE_STATIC:pn-libtalloc {{=}} ""
|
||||||
DISABLE_STATIC:pn-libtalloc = ""
|
EXTRA_OECONF +{{=}} "${STATICLIBCONF}"
|
||||||
EXTRA_OECONF += "${STATICLIBCONF}"
|
}}
|
||||||
' >> local.conf
|
|
||||||
|
|
||||||
== Build the Disk Image ==
|
== Build the Disk Image ==
|
||||||
cd $PROOT
|
{{Cmd|cd $PROOT}}
|
||||||
bitbake mpfs-dev-cli
|
{{Cmd|bitbake mpfs-dev-cli}}
|
||||||
|
|
||||||
= Creating a Bootable Yocto Linux Image =
|
= Creating a Bootable Yocto Linux Image =
|
||||||
We have two options: Create a new workspace, or we can use this repo as a workspace because this repo is my working workspace.
|
We have two options: Create a new workspace, or we can use this repo as a workspace because this repo is my working workspace.
|
||||||
|
|
||||||
== Create a workspace (OPTIONAL) ==
|
== Create a workspace (OPTIONAL) ==
|
||||||
mkdir yocto-dev && cd yocto-dev
|
{{Cmd|mkdir yocto-dev && cd yocto-dev}}
|
||||||
repo init -u https://github.com/polarfire-soc/polarfire-soc-yocto-manifests.git -b main -m default.xml
|
{{Cmd|repo init -u https://github.com/polarfire-soc/polarfire-soc-yocto-manifests.git -b main -m default.xml}}
|
||||||
|
|
||||||
== Update the repo workspace ==
|
== Update the repo workspace ==
|
||||||
repo sync
|
{{Cmd|repo sync}}
|
||||||
repo rebase
|
{{Cmd|repo rebase}}
|
||||||
|
|
||||||
== Set up the Bitbake environment ==
|
== Set up the Bitbake environment ==
|
||||||
. ./meta-polarfire-soc-yocto-bsp/polarfire-soc_yocto_setup.sh
|
{{Cmd|. ./meta-polarfire-soc-yocto-bsp/polarfire-soc_yocto_setup.sh}}
|
||||||
|
|
||||||
== Building Board Disk Image ==
|
== Building Board Disk Image ==
|
||||||
=== Building a Linux Image with a root file system (RootFS) ===
|
=== Building a Linux Image with a root file system (RootFS) ===
|
||||||
MACHINE=icicle-kit-es bitbake mpfs-dev-cli
|
{{Cmd|MACHINE{{=}}icicle-kit-es bitbake mpfs-dev-cli}}
|
||||||
|
|
||||||
=== Building a RAM-based Root Filestystem ===
|
=== Building a RAM-based Root Filestystem ===
|
||||||
MACHINE=icicle-kit-es bitbake -R conf/initramfs.conf mpfs-initramfs-image
|
{{Cmd|MACHINE{{=}}icicle-kit-es bitbake -R conf/initramfs.conf mpfs-initramfs-image}}
|
||||||
|
|
||||||
=== Building a Linux Image for an external QSPI flash memory ===
|
=== Building a Linux Image for an external QSPI flash memory ===
|
||||||
|
|
||||||
=== Flashing an SD Card ===
|
=== Flashing an SD Card ===
|
||||||
zcat build/tmp-glibc/deploy/images/icicle-kit-es/mpfs-dev-cli-icicle-kit-es.wic.gz | sudo dd of=/dev/sdX bs=4096 iflag=fullblock oflag=direct conv=fsync status=progress
|
{{Cmd|zcat build/tmp-glibc/deploy/images/icicle-kit-es/mpfs-dev-cli-icicle-kit-es.wic.gz {{!}} sudo dd of{{=}}/dev/sdX bs{{=}}4096 iflag{{=}}fullblock oflag{{=}}direct conv{{=}}fsync status{{=}}progress}}
|
||||||
|
|
||||||
= References =
|
= References =
|
||||||
==== [https://github.com/polarfire-soc/meta-polarfire-soc-yocto-bsp PolarFire Yocto Github] ====
|
==== [https://github.com/polarfire-soc/meta-polarfire-soc-yocto-bsp PolarFire Yocto Github] ====
|
||||||
|
Loading…
Reference in New Issue