Yocto Tutorial - 00 Introduction to Yocto - Building Linux for BeagleBone Black (STEP WISE!!)
HTML-код
- Опубликовано: 2 мар 2023
- Are you looking for a way to create a custom embedded Linux distribution?
The Yocto Project is a powerful open source tool that allows you to create customized embedded Linux distributions tailored to your specific needs. In this video, we'll introduce you to the basics of Yocto, walk you through the steps of building your first OS with Yocto for the BeagleBone Black and then we will build the yocto image for Beaglebone Black. (bitbake build image)
We'll start by explaining what Yocto is and why it's an excellent choice for creating custom embedded Linux systems. Then, we'll guide you through the installation and setup of the necessary software packages and tools needed to build your first OS with Yocto. We'll show you how to configure your build environment. Next, we'll go through the process of building the OS with Yocto, including how to set up the build directory.
Finally , we will learn how to build the Linux OS Image for Beaglebone Black.
With Yocto, you can easily configure Linux according to your specific needs. You can create a custom image that only contains the packages you need, which leads to smaller image sizes and less clutter.
The main Topics this video covers are:
- Introduction to Yocto Project
- Reasons to use Yocto
- Host PC requirements
- Supported Linux distros
- Target hardware: BeagleBone Black
- Setting up the host PC.
- Setup Yocto Build Environment
- Cloning / Downloading Poky
- Initializing the build environment
- Configuring local.conf File
- Creating a source folder (optional but recommended)
- Building the image file.
- Finding the image file in the tmp folder
Ready to get started with Yocto? Check out the video for a step-by-step guide on how to create a custom embedded Linux distribution!
github.com/Mun...
www.yoctoproje...
www.yoctoproje...
vadl.github.io...
beagleboard.or...
Thanks sir! I start using Yocto 2 months ago. Now I have a basic knowledge and your videos help me a lot to connect all pieces in my mind. :)
Glad it helped 😀
Thanks for effort!
pretty neat! keep it up.
Thanks!
Hi! I intended to use Yocto in order to build Linux for Arty z7-20 board (Digilent)
Does Poky branches correspond with different embedded platforms?
No
@@techabyte8 Thanks for the fast response!
Can you instruct me on how to use Yocto for my purpose?
What is your purpose?
@@techabyte8 I used to build for Xilinx platforms using Petalinux
I want to learn how to build it using Yocto
@@techabyte8 RUclips sometimes delete comments.
I build nowadays on Xilinx platforms with Petalinux and I want to learn how to do it with Yocto
Lovely video....Please continue the good work....Whats the significance of using kirkstone branch
I greatly appreciate your support and love. Yocto consistently introduces new versions every half year. In my current context, I've opted for Kirstone due to its more recent syntax. It's worth noting that Kirstone is a part of Yocto's Long-Term Support (LTS) branch, ensuring support and updates until April 2026.
For additional information and details on Yocto releases, you can visit the following link:
wiki.yoctoproject.org/wiki/Releases
Nice 👌🏻
Good way of presentation, however audio is too low
Hi,
Thank you for your appreciation
bro can you give me idea how to set updated date and time as my embedded through yocto project
How much difference would your tutorials be if i were to use a raspberry pi instead if beaglebone?
Hi there,
There will be no big difference.
The only difference will be the machine you will build and flashing the final image to Rpi, nothing more.
hello,
i am getting this error after calling bitbake..
ERROR: Variable BB_ENV_EXTRAWHITE has been renamed to BB_ENV_PASSTHROUGH_ADDITIONS
ERROR: Variable BB_ENV_EXTRAWHITE from the shell environment has been renamed to BB_ENV_PASSTHROUGH_ADDITIONS
ERROR: Exiting to allow enviroment variables to be corrected
Hi there,
Please try the following steps:
1. Exit the current shell by closing the Terminal.
2. Open a new, clean Terminal window.
3. Try initializing the bitbake environment again by running the command: *source oe-init-build-env* .
I hope this resolves the issue.
While building the image I am getting the error: " The postinstall intercept hook 'update_mime_database". Any way to resolve this?
What I would suggest you is:
*) Undo any local modifications you made to BSP recipes and other control files.
*) Do a full cleanup and rebuild.
*) Reinstall everything anew from the exact branch specified in the BSP manual: release/bsp30.0
*) Perform builds on a verified host Linux distro: Ubuntu-18.04 LTS
can we use raspberry pi board instead of beagle bone black ?
Of course you can use raspberry pi, but you need to do some changes. First of all you need to clone raspberry-pi meta layer Kirkstone branch(if you are using kirkstone)
You can clone using the following git link:
github.com/agherzan/meta-raspberrypi.
Then in local.conf you need to change the machine from beaglebone to raspberry.
for example you want to build for raspberrypi3 then in local.conf add *MACHINE = raspberrypi3*
The list of available raspberry machine you can find in *meta-raspberrypi/conf/machine* .
Then add meta-raspberrypi to *bblayers.conf* and then build the Image. To build the test Image run *bitbake rpi-test-image* . The final Image you need to flash in SD-card and test in R-Pi
For further info refer to the following documentation
meta-raspberrypi.readthedocs.io/en/latest/index.html
hai bro really it is a good stuff
Actually i am trying it on ubuntu 22.04 while doing bitbake it is giving so many errors i tried to resolve some of them can you do a video of making it in ubuntu
Hi there,
Presently, I'm using Ubuntu 18.04, but it's expected to function same on 22.04 as well. It's possible that you haven't installed all the necessary packages and libraries. Please refer to the following link to configure your host with Ubuntu 22.04:
docs.yoctoproject.org/ref-manual/system-requirements.html
Furthermore, you can share the error with me.
hi bro nice job
but after I finish with bitbake I can't find deploy folder inside tmp even I tried to find .wic file by searching it
Hello,
It seems like you might be searching in the wrong directory. If you're building the *core-image-full-cmdline*, here's a guide to locating the image file:
1) To find the Yocto *tmp* folder, use the following command:
*bitbake -e core-image-full-cmdline | grep ^TMPDIR= *
2) This command will provide you with the path to the Yocto *tmp* folder.
3) Navigate to the specified *tmp* directory.
4) Inside the *tmp* folder, proceed to *deploy/images/beaglebone*.
5) Within this directory, you should find the *.wic* image file you're looking for.
Hope this solves your problem
How can I build a Yocto image for jetson-tx2-devkit-4gb
Hi there,
I think, the following link will help you to build for Jetson.
developer.ridgerun.com/wiki/index.php/Yocto_Support_for_NVIDIA_Jetson_Platforms_-_Setting_up_Yocto
can we use STM32F411 NUCLEO board instead of beagle bone black ?
STM32F411 is a MCU (Microcontroller Unit) it is not capable to run Linux on it.
You need an Embedded System to such as Rpi, Beaglebone Black etc to run Linux on it.
Thanks you@@techabyte8
i cant find the workspace folder
Hi there,
*workspace* is not a default Linux folder, I have created it myself to keep it clean for work.
You can create a folder with any name if you want.
To create a folder in Linux you can use the following command:
*mkdir *
Example:
*mkdir workspace*
Good voise bro
🙏 Thanks
when i enter' bitbake core-image-full-cmdline'' it shows bitbake command not found why?
I think that you didn't initialize the environment.
First you need to go to poky folder, then run the following command:
*source oe-init-build-env*
Now you will be in *build* folder.
From now you can execute *bitbake core-image-full-cmdline* .
Please watch the whole video, each and every step has been explained clearly.
@@techabyte8thankyou for your reply.but after doing that it shows some error message "OE-core's config sanity checker detected a potential misconfiguration. Either fix the cause of this error or at your own risk disable the checker (see sanity.conf). Do not use bitbake as root"
Are you using sudo?
One more thing you can try is remove the whole *build* folder from the *poky* folder using the following command:
*rm -rf build* .
Then once again follow the previous steps to build the Image.
@@techabyte8 This won't work after that.
can we use qemu instead of beagle board..
Yes of course you can use qemu. Even after building the image with beagleone if you run "runqemu" you can test the image in virtual beaglebone environment.
can i use it for nitrogen8 board and raspbery pie
Of course you can use **raspberry pi**, but you need to do some changes.
First of all you need to clone raspberry-pi meta layer Kirkstone branch(if you are using kirkstone).
You can clone using the following git link: github.com/agherzan/meta-raspberrypi.
Then in **local.conf** you need to change the machine from beaglebone to raspberry.
For example you want to build for **raspberrypi3** then in local.conf add **MACHINE = raspberrypi3**.
The list of available raspberry machine you can find in **meta-raspberrypi/conf/machine** .
Then add **meta-raspberrypi to bblayers.conf** and then build the Image.
To build the test Image run **bitbake rpi-test-image**. The final Image you need to flash in SD-card and test in R-Pi.
Furthermore you can also implement the above steps for nitrogen8, you need to find the correct meta-layer for it and again find your correct machine in *conf/machine* of nitrogen8 meta-layer.
thank you
any way i can reach you out for some discussion??
@@user-bf4rz2qm6hyou can send me an email on munawerali1993@gmail.com
can we use macbook as the host to build the image ??@@techabyte8
i was trying to build using macbook, but got the following error:
~/Desktop/custom_image/yocto_tutorial/poky/build kirkstone ?1 ❯ bitbake core-image-full-cmdline
Traceback (most recent call last):
File "/Users/skarifmajid/Desktop/custom_image/yocto_tutorial/poky/bitbake/bin/bitbake", line 36, in
sys.exit(bitbake_main(BitBakeConfigParameters(sys.argv),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/skarifmajid/Desktop/custom_image/yocto_tutorial/poky/bitbake/lib/bb/main.py", line 378, in bitbake_main
return ui_module.main(server_connection.connection, server_connection.events,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/skarifmajid/Desktop/custom_image/yocto_tutorial/poky/bitbake/lib/bb/ui/knotty.py", line 415, in main
params.updateToServer(server, os.environ.copy())
File "/Users/skarifmajid/Desktop/custom_image/yocto_tutorial/poky/bitbake/lib/bb/cookerdata.py", line 75, in updateToServer
raise Exception("Unable to update the server configuration with local parameters: %s" % error)
Exception: Unable to update the server configuration with local parameters: Traceback (most recent call last):
File "/Users/skarifmajid/Desktop/custom_image/yocto_tutorial/poky/bitbake/lib/bb/command.py", line 90, in runCommand
result = command_method(self, commandline)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/skarifmajid/Desktop/custom_image/yocto_tutorial/poky/bitbake/lib/bb/command.py", line 286, in updateConfig
command.cooker.updateConfigOpts(options, environment, cmdline)
File "/Users/skarifmajid/Desktop/custom_image/yocto_tutorial/poky/bitbake/lib/bb/cooker.py", line 535, in updateConfigOpts
self.reset()
File "/Users/skarifmajid/Desktop/custom_image/yocto_tutorial/poky/bitbake/lib/bb/cooker.py", line 1774, in reset
self.initConfigurationData()
File "/Users/skarifmajid/Desktop/custom_image/yocto_tutorial/poky/bitbake/lib/bb/cooker.py", line 360, in initConfigurationData
self.setupConfigWatcher()
File "/Users/skarifmajid/Desktop/custom_image/yocto_tutorial/poky/bitbake/lib/bb/cooker.py", line 235, in setupConfigWatcher
self.configwatcher = pyinotify.WatchManager()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/skarifmajid/Desktop/custom_image/yocto_tutorial/poky/bitbake/lib/pyinotify.py", line 1723, in __init__
raise InotifyBindingNotFoundError()
pyinotify.InotifyBindingNotFoundError: Couldn't find any inotify binding
Does beagle board blue supports this steps?
There are the general steps you can use to build the Image. I think that you can use the same Image for Beaglebone Blue, but you need to adapt the beaglebone blue configs (Kernel Driver / DTS) in your Image. In future I will be making videos about these topics.
But I encourage you to use these steps and fill in the missing gaps yourself. If the Issue occurs, then share me your Email, I will get in touch and may be can help you in some way.
Ok bro thank you. If any error occurs i will let you know
@@techabyte8
would you share mail id of yours
hi
Run the bitbake the core file faced two errors remaining all successful. Is there an issue if you dump the image into the SD card and run into the beagle bone board?
@@dsvignesh1523 I will not recommend that. Even If you have image it would be buggy. There should be no error during the build process.
The Audio is too low :C
Good Job. Video and sound clearity is too poor.
Thanks for your video!
I'm a beginer in yocto project, in all progress of build image file I met issue like bellow. I tried to search in internet, but haven't solved that issue. Can you help me check it please? Do you think it come from my ubuntu version(22.04)
ISSUE:
"ERROR: Task (/home/eric/yocto_tutorial/poky/meta/recipes-connectivity/openssl/openssl_3.0.13.bb:do_package_write_rpm) failed with exit code '1'"
This is my build configuration:
"Build Configuration:
BB_VERSION = "2.0.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "ubuntu-22.04"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "beaglebone-yocto"
DISTRO = "poky"
DISTRO_VERSION = "4.0.19"
TUNE_FEATURES = "arm vfp cortexa8 neon callconvention-hard"
TARGET_FPU = "hard"
meta
meta-poky
meta-yocto-bsp
meta-mylayer = "kirkstone:e139e9d0ce343ba77a09601a976c92acd562c9df"
Are you installing openssl package?
Could you please share error Log file.
Requires(rpmlib): rpmlib(CompressedFileNames)
Next part of that file:
Provides: openssl-dev = 3.0.13-r0
Requires(rpmlib): rpmlib(CompressedFileNames)
I cannot find the cause here, could you share you local.conf and bblayers.conf
@@techabyte8
This is setting in my side
/*--------------------- 1. local.conf ---------------------*/
MACHINE ?= "beaglebone-yocto"
SOURCES = "/home/eric/yocto_tutorial/sources"
DL_DIR ?= "${SOURCES}/downloads"
SSTATE_DIR ?= "${SOURCES}/sstate-cache"
TMPDIR = "${SOURCES}/tmp"
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
CONF_VERSION = "2"
RM_OLD_IMAGE = "1"
INHERIT += "rm_work"
/*--------------------- 2.bblayers.conf ---------------------*/
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/home/eric/yocto_tutorial/poky/meta \
/home/eric/yocto_tutorial/poky/meta-poky \
/home/eric/yocto_tutorial/poky/meta-yocto-bsp \
/home/eric/yocto_tutorial/poky/meta-mylayer \
can we get paid certificate for this tutorial @Tech-A-Byte
Hi Ahsan,
No. This is free of cost content to everybody. Right now we do not provide such services. May be you need to check some other platform for that. i.e Udemy.