Constructing Embedded Linux Image for Raspberry Pi4 using yocto project
Hello All,
In my previous article we have seen that how we can construct an embedded linux image for beaglebone black using yocto project and how to build a toolchain for cross compilation using yocto project.
In case if you have missed my previous articles, you can find them here:
https://learnyoctowithme.blogspot.com/2022/03/constructing-embedded-linux-image-for.html
https://learnyoctowithme.blogspot.com/2022/03/building-toolchain-for-beaglebone-black.html
In this article we are going to see how we can construct an embedded linux image for raspberry Pi4-64 using yocto project.
pre-requisites:
you need to be familiar with my previous articles mentioned above as it contains the setup details and environment settings to build the image.
Building an embedded linux image for Raspberry Pi4-64:
and the final bblayers.conf file should look as
Step 9: Now inside the build_rpi folder, run the command as
$ bitbake core-image-base
Step 10 : you can find your complete image under tmp/deploy/images/raspberrypi-64/ folder
$ cd tmp/deploy/images/raspberrypi-64/
image name is "core-image-base-raspberrypi4-64.wic.bz2" which is an complete rpi4-64 image used for booting rpi4 hardware.
Step 11: flashing the image on SD card
Images are present in tmp/deploy/images/raspberrypi4-64 folder
please insert the SD card in to your sytsem and type command
$ lsblk
this will shows the SD card mount partition , for me its detected as sdb
Step 12 : use dd command to flash the image on SD card
$ dd if = core-image-base-raspberrypi4-64.wic.bz2 of = /dev/sdb bs =4096 && sync
This will flash the complete image on to SD card
Step 13 : insert the SD card in to raspberrypi4 device and power it ON
By default the username is root and password is empty
That's it now you have constructed your own embedded linux image for Rpi4 hardware.
Errors I faced while building the image:
The build of binutils was aborted and binutils was not compiling successfully because of the bug in binutils Makefiles
I made the following changes in binutils.inc file as
LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--disable-gold --enable-ld=default --enable-threads', d)}"
you can find binutils.inc file under poky/meta/recipes-devtools/binutils folder
Comments
Post a Comment