Building embedded GNU/Linux distribution for Raspberry Pi using the Yocto Project

Поделиться
HTML-код
  • Опубликовано: 16 сен 2024
  • Step by step tutorial for building a command line interface image of a custom embedded GNU/Linux distribution for Raspberry Pi 2 using the Yocto Project and Openembedded. Exact steps:
    www.instructabl...

Комментарии • 100

  • @AndrejGeorgievski
    @AndrejGeorgievski 7 лет назад +8

    Exactly what I needed for a head start. Thanks Leon!

    • @LeonAnavi
      @LeonAnavi  7 лет назад

      Hi Andrej, I am glad that you like the video :) Stay in touch :)

  • @verissimomichael3967
    @verissimomichael3967 3 года назад +3

    Thanks man, this totally helped with my first build.

    • @LeonAnavi
      @LeonAnavi  3 года назад

      Cool :) You are welcome :)

  • @philipvankampen3394
    @philipvankampen3394 2 года назад

    Thanks also for the instructables page!

    • @LeonAnavi
      @LeonAnavi  2 года назад +1

      Glad it was helpful! Keep in mind that nowadays you should use the latest stable or long-term support release of the Yocto Project.

  • @ahmedmashaly7213
    @ahmedmashaly7213 2 года назад +1

    Thanks man this totally helped me.

    • @LeonAnavi
      @LeonAnavi  2 года назад

      Happy to hear this tutorial is still useful :) Thanks for the feedback.

  • @shubhamroy5023
    @shubhamroy5023 3 года назад +1

    thanks a lot, it really helped us getting started

    • @LeonAnavi
      @LeonAnavi  3 года назад

      Glad to hear the video is still useful. It has been a while since the video was published so Yocto and OpenEmbedded evolved in the mean time. Thanks for the feedback!

  • @maranatha84
    @maranatha84 7 лет назад +3

    Hi
    How do you enable the camera interface in such customized OS? Do you have an image to share?

    • @LeonAnavi
      @LeonAnavi  7 лет назад +1

      Using VIDEO_CAMERA = "1" Please check the details in meta-raspberrypi README.

  • @ezequiel3775
    @ezequiel3775 Год назад

    Hi man... i'm building a raspberrypi 1 image, but when i'm compiling the image, i got an error: binutils-2.34-r0 do_compile: oe_runmake failed. How could i fix that error?

    • @LeonAnavi
      @LeonAnavi  Год назад

      The error log should contain details to debug the problem. Which Yocto release are you using? The video is a bit old therefore I suggest using an up to date long-term support release.

  • @aaronsibaja2051
    @aaronsibaja2051 7 лет назад

    Hi Leon.
    It's possible to emulate the raspberry pi image using QEMU(Quick Emulator)? I have dealing with this for a long time!
    I built the image and it boots perfectly on the raspberry pi.
    Thanks!

  • @BatsAwesomeIn2030
    @BatsAwesomeIn2030 3 года назад +1

    Does these steps work with new yacto release 2.4.2 (rocko)

    • @LeonAnavi
      @LeonAnavi  3 года назад +1

      Yes, the basic steps with Yocto/OE and meta-raspberrypi are the same. Yocto has a release twice per year. As of the moment the current stable is 3.2 with codename Gatesgarth:
      wiki.yoctoproject.org/wiki/Releases

  • @jmiighassen8263
    @jmiighassen8263 5 лет назад

    Hello, I am trying to build the smallest possible linux image using the Yocto project. While i was searching on net , i found some solutions like using busybox instead of systemV or systemd , using uClibc instead of glibc, Thumb2 instructions instead of 32 Arm instructions .. Do you have any idea how and where i can make this changes ? Do you have any other solutions to make smaller image and rootfs size ?

    • @LeonAnavi
      @LeonAnavi  5 лет назад

      The Yocto Project Mega manual contains all the information needed to customize the image according to your needs. Depending on your exact requirements it could be a complex procedure. Here is the manual: www.yoctoproject.org/docs/current/mega-manual/mega-manual.html

  • @christianitis
    @christianitis 3 года назад +1

    I need my device to boot straight to the console (without requiring the user to enter in a username and password, since my project uses a touchscreen only and no keyboard so logging in manually is impossible) and run a certain Qt program I wrote. How would I do this? Is this possible to configure in Debian or openSUSE or do I need to roll my own distro?

    • @LeonAnavi
      @LeonAnavi  3 года назад +1

      yes, you can do this but the solution depends on the exact technical details. Is the Qt app running on X11, Wayland or just framebuffer? Which console do you have in mind, serial? I am not sure what is your end-gola but I guess you are looking for a kiosk mode that automatically launched a specific app on start-up.

    • @christianitis
      @christianitis 3 года назад

      @@LeonAnavi Yes, a kiosk mode is what I need. It's running on X11. Getting the app to run on startup is no problem: all I need to do is make it so it requires no user input to log in and run the app.

    • @christianitis
      @christianitis 3 года назад

      @@LeonAnavi *and for serial, I just have the raspberry pi connected to the touchscreen via the display cable if that's what your asking

    • @LeonAnavi
      @LeonAnavi  3 года назад

      @@christianitis which window manager for X11 are you using?

    • @christianitis
      @christianitis 3 года назад

      @@LeonAnavi i3

  • @MrVotuananhs
    @MrVotuananhs 8 лет назад

    Hell Leon Anavi, I have tried to build an image for raspberry pi 3. But i had an issue, my image can not jump command line interface. It had a screen like an image at 4:57 in your video. Please help me to fix it.
    In the video, I didn't understand why you need an ethernet cable to connect internet ?
    Thank you.

    • @LeonAnavi
      @LeonAnavi  8 лет назад

      Please note that the video is for Raspberry Pi 2. If you are building an image or Raspberry Pi 3 or another version please set it at conf/local.conf. I need an ethernet cable because Raspberry Pi 2 does not have built-in WiFi.

    • @MrVotuananhs
      @MrVotuananhs 8 лет назад

      of course, I have configured MACHINE by "raspberrypi3" in local.conf file. I only want to know why my image that is builded successful, but it is stopped the same image at 4:57 in your video. I can not go to command line interface. If you know, please tell me your solution to fix it. Thank you.

  • @trecyhelpz4562
    @trecyhelpz4562 4 года назад +1

    hi i want to create an android tv 9 image for rpi3

    • @LeonAnavi
      @LeonAnavi  4 года назад

      Android is a different story. Have a look at this article at MagPi about running Android on Raspberry Pi: magpi.raspberrypi.org/articles/android-raspberry-pi
      You can also consider running Kodi on top of Poky, the reference distribution of the Yocto Project on Raspberry Pi. I am maintaining such a Yocto/OE distro as a small hobby project for my personal needs here: github.com/leon-anavi/media-hub/releases

  • @chevvurisandeep5720
    @chevvurisandeep5720 3 года назад +2

    hello Leon
    Its really a great insight for the beginners.
    I have followed the same steps that you had mentioned, but i am facing a error:
    [ bitbake rpi-basic-image
    ERROR: Unable to parse /home/sandeepch/yocto/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py
    Traceback (most recent call last):
    File "/home/sandeepch/yocto/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 188, in feeder(lineno=40, s='DEFAULT_TEST_SUITES:append:rpi = " parselogs_rpi"', tements=[, , , , , , , ]):
    > raise ParseError("unparsed line: '%s'" % s, fn, lineno);
    ParseError: ParseError at /home/sandeepch/yocto/poky/meta-raspberrypi/conf/layer.conf:40: unparsed line: 'DEFAULT_TEST_SUITES:append:rpi = " parselogs_rpi"' ]
    I am using raspberrypi3.
    Could you help me out with that error?

    • @LeonAnavi
      @LeonAnavi  3 года назад

      Please note that this tutorial is for older release of Yocto Project and OpenEmbedded. Although in general the approach is still the same, recently there were some syntax changes in the main branches (replacing _ with : in append/preppend) which are causing errors like the one you see. I recommend you to use a long-term Yocto release like Dunfell which is based on the old syntax (the same used in the video).

    • @chevvurisandeep5720
      @chevvurisandeep5720 3 года назад +1

      @@LeonAnavi Thanks, i will try with Dunfell

  • @Dizzifer9538
    @Dizzifer9538 4 года назад +1

    Which is the best linux distro for embedded system development??

    • @LeonAnavi
      @LeonAnavi  4 года назад +1

      With Yocto and OpenEmbedded you can build exactly what distribution you need for your embedded systems. This will definitely be the best end result because it will fit your exact needs.

    • @hagalazmultiverze3411
      @hagalazmultiverze3411 4 года назад +2

      The one fitting your exact requirements...

  • @electroraven8833
    @electroraven8833 8 лет назад

    Hi thanks for your videos. I have compiled for the rpi3 , but I have issues with the wifi. I followed the steps of your video.

    • @LeonAnavi
      @LeonAnavi  8 лет назад

      This tutorial is for Raspberry Pi 2. You have to change the machine name in conf/local.conf for other versions. It is recommended to use the latest stable release of Poky.

    • @electroraven8833
      @electroraven8833 8 лет назад

      +Leon Anavi thanks for your reply!. I have changed my local.conf and I used the last version "Krogoth" . But I have the same results.

    • @LeonAnavi
      @LeonAnavi  8 лет назад

      What exactly is the issue that you are having? Could you please provide details?

    • @electroraven8833
      @electroraven8833 8 лет назад

      Well,I recompiled one more time and this time I have lucky... I can see my wlan0. Thanks man!

  • @paolarayatolentino7684
    @paolarayatolentino7684 2 года назад

    Hi! I’m having problems to connect the USB keyboard … I don’t know why it’s happening this … can you help me, please ? :(

    • @LeonAnavi
      @LeonAnavi  2 года назад +1

      Hm... what kind of a keyboard is it and what problems do you have? Which version of Yocto are you using? In general USB keyboards are human interface devices (HID) that are "plug and play" thanks to the Linux kernel that you are building as part of the the whole image that bitbake produces.

    • @paolarayatolentino7684
      @paolarayatolentino7684 2 года назад

      @@LeonAnavi it's a common USB keyboard and the problem is that when I initialize the system and try to introduce the password it doesn't work... I don't know if it's for the Yocto version (I'm trying with Zeus) do you recommend me to change it?

    • @LeonAnavi
      @LeonAnavi  2 года назад

      @@paolarayatolentino7684 I haven't experience such an issue. Is the same keyboard an rpi working fine with Raspberry Pi OS?
      Release zeus is not supported anymore. In general I recommend using the latest stable version of the Yocto Project or the LTS release: wiki.yoctoproject.org/wiki/Releases

  • @sunilvasudevan8431
    @sunilvasudevan8431 7 лет назад

    Hi..great thanks for uploading..May I know what will be Linux flavour which will be booted onto the raspberry from sd card??Is there any options to add Ui?How can I add Qt framework on to tht Linux..thanks..

    • @LeonAnavi
      @LeonAnavi  7 лет назад

      With Yocto and Openembedded you can build any kind of custom GNU/Linux distribution for your Raspberry Pi. No problem to add GUI. There are drivers for hardware graphical acceleration in both X11 and Wayland. Use layer meta-qt5 to bring Qt to your image.

  • @sagarkanade8383
    @sagarkanade8383 5 лет назад

    Hi Leon,
    Could you please explain how to do same for beaglebone black revision C hardware??

    • @LeonAnavi
      @LeonAnavi  5 лет назад

      It is the same approach. Just change the machine. Poky contains a machine configuration for beaglebone. Keep in mind that it is always recommended to use the latest stable release of the Yocto Project, which at the moment is warrior.

  • @fekihazem2195
    @fekihazem2195 5 лет назад

    when i open linux by raspberry pi several commands are not found
    So I can not build the linux kernel module to activate the jtag pins.
    i need apt-get, apt, make ..
    are there packages that I can add to use them or another solution?

    • @LeonAnavi
      @LeonAnavi  5 лет назад

      In general the whole idea of the Yocto project and OpenEmbedded is to build an image for a particular device will packages that it needs. However it is possible to create package feed and use the smart package manager. Have a look at the Yocto Mega Manual for details.

    • @fekihazem2195
      @fekihazem2195 5 лет назад

      @@LeonAnavi can you give me the packages of apt-get and make

    • @LeonAnavi
      @LeonAnavi  5 лет назад

      @@fekihazem2195 you probably need packagegroup-core-buildessential that provides essential build dependencies. Have a look at the OpenEmbedded Layer Index: layers.openembedded.org/layerindex/branch/master/recipes/

  • @RahulSharma-jm4tk
    @RahulSharma-jm4tk 7 лет назад

    Hi Leon,
    Nice video. I am following your video but i m getting gstreamer error as follows:
    ERROR: No recipes available for:
    /home/rahul/poky/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.10%.bbappend

    • @LeonAnavi
      @LeonAnavi  7 лет назад

      Things in Yocto/OE layers change over the time so you need to adjust a little bit. It seems that recipe gstreamer1.0-omx is not found and the bbappend file cannot extend it. Make sure that you are using the latest release of the Yocto Project. Probably this error won't affect you with the latest stable version. As of the moment it is Morty.

  • @ak_ambition
    @ak_ambition 6 лет назад

    My raspberry pi is successfully booted.I have logged in as root.But now I am not able to login as pi.I am not able to use sudo command when logged in as root.So what command should I use to install new packages directly on Raspberry pi monitor interface when logged in as root??

    • @LeonAnavi
      @LeonAnavi  6 лет назад

      By default you don't have pi user in Poky. Running package management in Yocto/OE is kind of an advanced tasks. Please refer to tutorials how to achieve it. In the past I wrote an article for on of the distributions based on Yocto/OE that might be useful but it is a bit outdated and you need to adapt it to your particular case: wiki.tizen.org/Runtime_package_management_in_Tizen_on_Yocto_with_Smart

    • @ak_ambition
      @ak_ambition 6 лет назад

      Thanks for the reply,are there any commands which I can use to install new things(not necessarily packages) and use startx on our system on raspberry pi interface built on yocto (same as when we use putty in windows for installation?)

    • @LeonAnavi
      @LeonAnavi  6 лет назад

      you can enable ssh to login remotely. If you want X11 you should build appropriate image with GUI.

    • @ak_ambition
      @ak_ambition 6 лет назад

      Is there any of your video on using wiringpi in order to work with some sensors using root as a username??

    • @LeonAnavi
      @LeonAnavi  6 лет назад

      Yes have a look at this one as well as the one for HTU21D:
      ruclips.net/video/pyg27uj0Xns/видео.html

  • @mykolakhyliuk1687
    @mykolakhyliuk1687 7 лет назад

    Can we remove (or comment out ) meta-yocto-bsp in bblayers.conf because we use BSP from Raspberry (meta-raspberrypi)?

    • @LeonAnavi
      @LeonAnavi  7 лет назад

      I don't think this is a good idea.

    • @mykolakhyliuk1687
      @mykolakhyliuk1687 7 лет назад

      Why not? meta-yocto-bsp doesn't contain any BSP stuff related to Raspberry. In my case i removed it and all was compiled well and works on pi3 (moreover images are the same with meta-yocto-bsp and without, I guess it says that such layer is not involved in build process for Raspberry).

    • @LeonAnavi
      @LeonAnavi  7 лет назад

      Layer meta-yocto-bsp brings BSP for Yocto Project reference hardware. This was you can eventually build the same images not only for Raspberry Pi but also for Beaglebone or Intel x86/x86-64 devices. It doesn't interfere your rpi images. What is the point to remove it?

    • @mykolakhyliuk1687
      @mykolakhyliuk1687 7 лет назад

      The reason is that I wanted to clarify what exactly involved in build process for pi3 target. And I don't like to collect an additional stuff which not used in the project I guess it's more clear for understanding (e.g. like you comment out the unused stuff for qemu). And BTW: thanks for the video!

    • @LeonAnavi
      @LeonAnavi  7 лет назад

      Have a look at bitbake -g option for generating dependency graphs. It is a great tool to clarify what is in the image and what are the dependencies between the different packages: www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#bitbake-user-manual-command

  • @ssvs143
    @ssvs143 7 лет назад

    Hi
    I would like to build a custom kernel for the RPI2? I tried the cross compilation method but was not successful. Could you please help me.

    • @LeonAnavi
      @LeonAnavi  7 лет назад

      Follow the instructions at eLinux wiki for building a kernel for Raspberry Pi elinux.org/Raspberry_Pi_Kernel_Compilation

  • @iprogramplus
    @iprogramplus 6 лет назад

    hi, how do i add c make nano editor thanks,

    • @LeonAnavi
      @LeonAnavi  6 лет назад

      Add to local/local.conf a line with: IMAGE_INSTALL_append=" nano "

    • @iprogramplus
      @iprogramplus 6 лет назад

      how about gnu c compiler, thank you so much

    • @LeonAnavi
      @LeonAnavi  6 лет назад

      It the same procedure for any package. Read the details about IMAGE_INSTALL_append in the Yocto Mega Manual, search for layers that bring the required package in OpenEmbedded Layer Index.

  • @brsollb
    @brsollb 3 года назад

    Tu ne serais pas francais par hazard ?

    • @LeonAnavi
      @LeonAnavi  3 года назад

      No, sorry, I am fluent only in Bulgarian and English :)

  • @יוסיגבאי-ט5ב
    @יוסיגבאי-ט5ב 2 года назад

    אנה ואלזה

    • @LeonAnavi
      @LeonAnavi  2 года назад

      Hm, I am not sure how is this comment related to the video. Hope you like it though :)