[Yocto Linux] Quick Build for Raspberry Pi 3B+ (Fedora 35)

문연수·2022년 10월 2일
0

Embedded Linux

목록 보기
4/4

0. Environments

  • Fedora 35
  • Yocto Linux Docs Version: Kirkstone (4.0.4)
  • Raspberry Pi 3B+

1. System Requirements

- 1 Supported Linux Distributions

Fedora 35

- 2 Required Packages for the Build Host

sudo dnf install gawk make wget tar bzip2 gzip python3 unzip perl patch diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue perl-bignum socat python3-pexpect findutils which file cpio python python3-pip xz python3-GitPython python3-jinja2 SDL-devel xterm rpcgen mesa-libGL-devel perl-FindBin perl-File-Compare perl-File-Copy perl-locale zstd lz4

I'm not install Documentation packages.

- 3 Required Git, tar, Python and gcc Versions

  • Git 1.8.3.1 or greater
  • tar 1.28 or greater
  • Python 3.6.0 or greater

2. Use Git to Clone Poky

git clone git://git.yoctoproject.org/poky
git checkout -t origin/kirkstone -b my-kirkstone
git pull

3. Building Image

- 1. Initialize the Build Environment:

cd poky
source oe-init-build-env rpi-build

- 2. Find and Add Layer

 Many hardware layers are available. The Yocto Project Source Repositories has many hardware layers.

cd poky
git clone https://git.yoctoproject.org/meta-raspberrypi
cd meta-raspberrypi/
git checkout -t origin/kirkstone -b my-kirkstone
git pull

Before you can use a layer during build, you must add it to your bblayers.conf file, which is found in the uild Directory conf directory.

cd poky/rpi-build
bitbake-layers add-layer ../meta-raspberrypi

- 3. Change the Configuration to Build for a Specific Machine

cd poky/rpi-build/
vi conf/local.conf

# Change the machine
MACHINE ??= "raspberrypi3-64"

- 4. Start the Build

bitbake core-image-base

Done.

4. Upload Image

cd poky/rpi-build/tmp/deploy/images/
sudo bmaptool copy <image file>.rootfs.wic.bz2 --bmap <image file>.rootfs.wic.bmap <device>

Burn Yocto Linux image file to your microSD.

5. Boot up & Login

Connect cable to your Raspberry Pi board

  • HDMI
  • Power (USB-B)
  • Keyboard (USB-C)

You can login to enter root as a username.

Reference

[Site] https://docs.yoctoproject.org/ref-manual/system-requirements.html
[Site] https://git.yoctoproject.org/meta-raspberrypi/
[Site] https://docs.yoctoproject.org/brief-yoctoprojectqs/
[Site] https://github.com/agherzan/meta-raspberrypi

profile
2000.11.30

0개의 댓글