You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4.7 KiB
4.7 KiB
PolarFire SoC FPGA
- About the Board
- Installing Libero (via portage)
- Installing Libero (MANUAL)
- Install Yocto Ecosystem
- References
- Creating a Bootable Yocto Linux Image
- References
About the Board
Installing Libero (via portage)
Installing Libero (MANUAL)
Prerequisites
Installation Process
sudo mkdir -p /opt/Microchip
sudo chown $USER:$USER /opt/Microchip
unzip
Installer Directions:
- Install Directory: /opt/Microchip/Libero_SoC_v2023.1
- Common Directory: /opt/Microchip/common
- Install Set: Everything
Post-Install
sudo /opt/Microchip/Libero_SoC_v2023.1/Logs/req_to_install.sh
Installing FlashPro Drivers
You need to have the FlashPro device to install these, so ignore this if you don't have a FlashPro device.
FlashPro 5
sudo /opt/Microchip/Libero_SoC_v2023.1/Libero/bin/udev_install
FlashPro 6
sudo /opt/Microchip/Libero_SoC_v2023.1/Libero/bin/fp6_env_install
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'll want to get the LIB-PL-MACID-F-EVAL license, which is a floating linux license. If you're on windows, just get whatever license works for you.
mkdir -p /opt/Microchip/Libero_SoC_v2023.1/license
cp /path/to/license /opt/Microchip/Libero_SoC_v2023/license
Installing the Licensing Daemon
# install lsb-core
sudo apt install lsb-core
sudo cp scripts/libero-license.service /etc/systemd/user
Install Yocto Ecosystem
Prerequisites
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat libsdl1.2-dev xterm bmap-utils python3-distutils repo
Create the Yocto Workspace
mkdir yocto-dev && cd yocto-dev
repo init -u https://github.com/polarfire-soc/polarfire-soc-yocto-manifests.git -b main -m default.xml
Update the repo workspace
repo sync
repo rebase
Setup the Bitbake environment
. ./meta-polarfire-soc-yocto-bsp/polarfire-soc_yocto_setup.sh
Optimize your build environment
Yocto builds take a very long time. We can optimize this.
mkdir -p ${HOME}/.local/share/yocto/downloads
mkdir -p ${HOME}/.local/share/yocto/sstate-cache
mkdir -p ${HOME}/.local/share/yocto/persistent
cd <project_root>/build/conf/
echo '
BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count() - 1}"
DL_DIR = "${HOME}/.local/share/yocto/downloads"
SSTATE_DIR = "${HOME}/.local/share/yocto/sstate-cache"
PERSISTENT_DIR=${HOME/.local/share/yocto/persistent
SOURCE_MIRROR_URL ?= "file://${HOME}/.local/share/yocto/downloads"
INHERIT += "own-mirrors"
BB_GENERATE_MIRROR_TARBALLS = "1"
# uncomment to test sources
# BB_NO_NETWORK = "1"
# remove static deps
STATICLIBCONF = "--disable-static"
DISABLE_STATIC:pn-openssl = ""
DISABLE_STATIC:pn-openssl-native = ""
DISABLE_STATIC:pn-nativesdk-openssl = ""
DISABLE_STATIC:pn-libtalloc = ""
EXTRA_OECONF += "${STATICLIBCONF}"
' >> local.conf
Build the Disk Image
cd $PROOT
bitbake mpfs-dev-cli
References
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.
Create a workspace (OPTIONAL)
mkdir yocto-dev && cd yocto-dev
repo init -u https://github.com/polarfire-soc/polarfire-soc-yocto-manifests.git -b main -m default.xml
Update the repo workspace
repo sync
repo rebase
Set up the Bitbake environment
. ./meta-polarfire-soc-yocto-bsp/polarfire-soc_yocto_setup.sh
Building Board Disk Image
Building a Linux Image with a root file system (RootFS)
MACHINE=icicle-kit-es bitbake mpfs-dev-cli
Building a RAM-based Root Filestystem
MACHINE=icicle-kit-es bitbake -R conf/initramfs.conf mpfs-initramfs-image
Building a Linux Image for an external QSPI flash memory
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