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

Поділитися
Вставка
  • Опубліковано 21 лют 2016
  • 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.instructables.com/id/Build...
  • Наука та технологія

КОМЕНТАРІ • 100

  • @AndrejGeorgievski
    @AndrejGeorgievski 7 років тому +7

    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 2 роки тому +3

    Thanks man, this totally helped with my first build.

    • @LeonAnavi
      @LeonAnavi  2 роки тому

      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.

  • @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.

  • @aaronsibaja2051
    @aaronsibaja2051 6 років тому

    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!

  • @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

  • @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.

  • @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.

  • @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

  • @sagarkanade8383
    @sagarkanade8383 4 роки тому

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

    • @LeonAnavi
      @LeonAnavi  4 роки тому

      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.

  • @MrVotuananhs
    @MrVotuananhs 7 років тому

    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  7 років тому

      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 7 років тому

      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.

  • @fahadmubeen6272
    @fahadmubeen6272 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

  • @Dizzifer9538
    @Dizzifer9538 3 роки тому +1

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

    • @LeonAnavi
      @LeonAnavi  3 роки тому +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 3 роки тому +2

      The one fitting your exact requirements...

  • @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

  • @electroraven8833
    @electroraven8833 7 років тому

    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  7 років тому

      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 7 років тому

      +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  7 років тому

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

    • @electroraven8833
      @electroraven8833 7 років тому

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

  • @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.

  • @fekihazem2195
    @fekihazem2195 4 роки тому

    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  4 роки тому

      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 4 роки тому

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

    • @LeonAnavi
      @LeonAnavi  4 роки тому

      @@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/

  • @trecyhelpz4562
    @trecyhelpz4562 3 роки тому +1

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

    • @LeonAnavi
      @LeonAnavi  3 роки тому

      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

  • @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

  • @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.

  • @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

  • @iprogramplus
    @iprogramplus 5 років тому

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

    • @LeonAnavi
      @LeonAnavi  5 років тому

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

    • @iprogramplus
      @iprogramplus 5 років тому

      how about gnu c compiler, thank you so much

    • @LeonAnavi
      @LeonAnavi  5 років тому

      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.

  • @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:
      ua-cam.com/video/pyg27uj0Xns/v-deo.html

  • @user-bb9ge7ji4e
    @user-bb9ge7ji4e 2 роки тому

    אנה ואלזה

    • @LeonAnavi
      @LeonAnavi  2 роки тому

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

  • @brsollb
    @brsollb 3 роки тому

    Tu ne serais pas francais par hazard ?

    • @LeonAnavi
      @LeonAnavi  3 роки тому

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

  • @chevvurisandeep5720
    @chevvurisandeep5720 2 роки тому +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  2 роки тому

      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 2 роки тому +1

      @@LeonAnavi Thanks, i will try with Dunfell