Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Custom_table_size_100 |
---|
Note |
---|
Currently only for Intel SoC / FPGA with externel external DDR |
The Yocto Project is a set of tools that helps to create customized Linux systems. This is a short description of how to prepare the host computer and how to create a project with yocto.
Used source files
Scroll Ignore | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
The following description was tested with the source files listed in this table:
Component | Source | Version/Git branch | Commit ID |
---|---|---|---|
Oracle VM VirtualBox | https://www.virtualbox.org/ | 6.1.26 | --- |
Ubuntu 20.04 LTS | https://releases.ubuntu.com/20.04/ | 20.04.3 LTS | --- |
Yocto | https://git.yoctoproject.org/cgit/cgit.cgi/poky/ | dunfell | b47125666fe44e491ce9a4ecadd1875bec9891db |
meta-altera | https://github.com/kraj/meta-altera.git | dunfell | 237cd5ecd28491dbcff16d8d64662d3b56ac30df |
linux -socfpga | https://github.com/altera-opensource/linux-socfpga.git | socfpga-5.4.124-lts | cdb318393975f4bf9a392fb15af74aad45c57245 |
u-boot-socfpga | https://github.com/altera-opensource/u-boot-socfpga.git | socfpga_v2021.04 | bdc9a4409de9cef4408eebd81196fd63887ac78f |
Build Host
Scroll Ignore | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
Yocto Project is supported in many Linux Distributions, this descriptions refers to Ubuntu 20.04 LTS. Information and requirements for other distributions can be found in the Yocto Project Reference Manual.
General requirements
This requirements are generally needed for Yocto Project in Ubuntu 20.04:
- free disk space: at least 50 GB
required packages:
Code Block language bash theme Midnight linenumbers true sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio \ python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 \ libegl1-mesa libsdl1.2-dev pylint3 xterm python3-subunit mesa-common-dev
(optional) VM with supported Linux OS
If you do not have installed Linux OS on your host computer, you can optionally run a VM with a supported Linux OS:
e.g. with OracleVM:
VM Setup:
RAM: >= 8 GB
CPU: >= 4
HDD: 200 GB dynamically
ubuntu-20.04-desktop-amd64.iso
install vm guest additions
Network: network bridge
optional: add shared folder, enable drag and drop
- Note the general requirements
Install Yocto Project
Scroll Ignore | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
Create and navigate to the yocto directory:
Code Block language bash theme Midnight linenumbers true mkdir yocto && cd yocto
Clone the Yocto Project sources:
Code Block language bash theme Midnight linenumbers true git clone -b dunfell https://git.yoctoproject.org/git/poky
Create a project for an Intel FPGA device
Scroll Ignore | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
The following steps are required to create an image for the Intel FPGA devices:
For Intel FPGA devices you need the meta-layer 'meta-altera'. Run following command to clone this meta-layer from github into the 'poky' folder:
Code Block language bash theme Midnight linenumbers true cd poky git clone -b dunfell https://github.com/kraj/meta-altera.git
Run the oe-init-build-env script to initialize the environment:
Code Block language bash theme Midnight linenumbers true source oe-init-build-env
Add meta-altera layer to path/to/yocto/poky/build/conf/bblayers.conf:
Code Block theme Midnight linenumbers true bitbake-layers add-layer ../meta-altera
- Modify the path/to//yocto/poky/build/conf/local.conf file:
Remove default configuration of the MACHINE variable and set it to a supported machine (see meta-altera/conf/machine for more information) of meta-altera layer e.g 'cyclone5':
Code Block theme Midnight linenumbers true sed -i '/^MACHINE/s/MACHINE/#MACHINE/g' conf/local.conf echo -e '\nMACHINE = "cyclone5"' >> conf/local.conf
Set the preferred linux kernel version (see meta-altera/recipes-kernel/linux for other linux kernel versions):
Code Block theme Midnight linenumbers true echo -e '\nPREFERRED_PROVIDER_virtual/kernel = "linux-altera-lts"' >> conf/local.conf echo -e 'PREFERRED_VERSION_linux-altera-lts = "5.4%"' >> conf/local.conf
Set the preferred u-boot version (see meta-altera/recipes-bsp/u-boot for other u-boot versions):
Code Block theme Midnight linenumbers true echo -e '\nPREFERRED_VERSION_u-boot-socfpga = "v2021.04%"' >> conf/local.conf
Build the image:
Code Block theme Midnight linenumbers true bitbake core-image-minimal
The first run of this command can take several hours.
The generated files such as the u-boot file, kernel file or the complete Image are stored in /yocto/poky/build/tmp/deploy/images.- Follow the steps described in Reference Designs with Yocto - Intel devicesSoC FPGAs#Copy image to SD card to copy the image to the SD card.
References
Scroll Ignore | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
Scroll Only | ||
---|---|---|
|
Scroll pdf ignore | ||||||
---|---|---|---|---|---|---|
|