Creating a custom Linux distribution for the Raspberry Pi (with Buildroot and OpenEmbedded/Yocto)

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024

ความคิดเห็น • 84

  • @jino139
    @jino139 7 หลายเดือนก่อน +4

    I don't have the time to watch your video right now, but I will make sure to do so. Thank you so much for taking the time to share your knowledge with us.

    • @spradotube
      @spradotube  7 หลายเดือนก่อน

      Yeah, take your time. And leave your feedback after watching it!

  • @sudheendraraobilamkar6938
    @sudheendraraobilamkar6938 3 หลายเดือนก่อน +2

    I was bit confused about yocto project after watching this video I got overview about this thanks for video.

    • @spradotube
      @spradotube  3 หลายเดือนก่อน

      That is great, thanks for the feedback!

  • @TurboElectricLtd
    @TurboElectricLtd 13 วันที่ผ่านมา

    Very good "get you started" video. Properly worked examples are of great value. Also I didn't know about the serial console on the Pi, so thanks for that. Just one suggestion: the view of the Raspberry Pi bottom right covers the text you are typing. I would move the overlay up maybe to the middle right so it shows it.

    • @spradotube
      @spradotube  11 วันที่ผ่านมา +1

      Gotcha. Thanks for the feedback!

  • @monalisasilva8933
    @monalisasilva8933 8 หลายเดือนก่อน +1

    Thanks for the video. The audio is much better. Help me a lot!!

    • @spradotube
      @spradotube  8 หลายเดือนก่อน

      I am glad you enjoyed it, Monalisa!

  • @luisalbertoespinosacalvo1610
    @luisalbertoespinosacalvo1610 3 หลายเดือนก่อน +1

    Gracias por hacer este tipo de videos, realmente estuve buscando a alguien que explicara bien estos temas

    • @spradotube
      @spradotube  3 หลายเดือนก่อน

      I am glad you enjoyed it!

  • @eliasfilho7833
    @eliasfilho7833 8 หลายเดือนก่อน +1

    Nice video Sergio. Thank you for that lesson.

    • @spradotube
      @spradotube  8 หลายเดือนก่อน

      Hi Elias! I am glad you enjoyed it!

  • @gemini1014
    @gemini1014 7 หลายเดือนก่อน +2

    I have been following you for a long time in LinkedIn because of your content, As always, the content is amazing
    it would be nice addition if you could create an extension to this video on how to add our own layers for custom/not known HW

    • @spradotube
      @spradotube  7 หลายเดือนก่อน +1

      Thanks for the suggestion! Noted!

  • @patrickegesa8264
    @patrickegesa8264 6 หลายเดือนก่อน

    best embedded linux tutorial

    • @spradotube
      @spradotube  6 หลายเดือนก่อน

      Thanks!

  • @mathias4863
    @mathias4863 9 หลายเดือนก่อน +1

    Thanks for the video. The audio improved a lot. The audio is a little bit delayed.

    • @spradotube
      @spradotube  9 หลายเดือนก่อน

      Hi @mathias4863! Yeah, now I have a decent Mic. I just need to work on the OBS settings. Thanks for the feedback!

  • @YashJain-cx7fs
    @YashJain-cx7fs 3 หลายเดือนก่อน +3

    some of the content written by you in terminal we can't see that because of two split screen one was board and other your face cam. please rearrange though screen in your upcoming videos. thank you great videos

    • @spradotube
      @spradotube  3 หลายเดือนก่อน +2

      Gotcha. I will make sure that doesn't happen next time. Thanks for the feedback!

  • @gabrielpb876
    @gabrielpb876 6 หลายเดือนก่อน

    Great video, thanks by sharing this valuable content Sérgio!

    • @spradotube
      @spradotube  6 หลายเดือนก่อน

      I am glad you enjoyed Gabriel!

  • @David-yp9oz
    @David-yp9oz 3 หลายเดือนก่อน

    Extremely useful video

    • @spradotube
      @spradotube  3 หลายเดือนก่อน

      Thanks!

  • @user-id9kZf7T8Bl3Y
    @user-id9kZf7T8Bl3Y 4 หลายเดือนก่อน

    Great video. Easy to understand.

    • @spradotube
      @spradotube  4 หลายเดือนก่อน

      Glad um enjoyed it!

  • @jedy90
    @jedy90 26 วันที่ผ่านมา +1

    Thanks for the tutorial, seems actually easy to start, but I fear it will become arbitrarily complex to actually configure what you want

    • @spradotube
      @spradotube  25 วันที่ผ่านมา +1

      Yeah, that is the price you pay for the flexibility you get.

  • @ravibabumyself
    @ravibabumyself 5 หลายเดือนก่อน +1

    Thanks for helpful video. It will be helpful if you can add the Host Ubuntu version that you are using(or any recommended version) for custom Linux build as using different version might result in errors.

    • @spradotube
      @spradotube  5 หลายเดือนก่อน

      I am glad you liked it! My desktop is currently running Ubuntu 22.04 LTS.

  • @andrewtristan6375
    @andrewtristan6375 6 หลายเดือนก่อน +1

    Hello Sergio, thank you for making this video. Does Buildroot have the capability of building for the pi 5?

    • @spradotube
      @spradotube  6 หลายเดือนก่อน +1

      Hi Andrew. Unfortunatelly, as of this writing, there is no defconfig available for the Raspberry Pi 5 in Buildroot. Nothing prevents one from opening menuconfig and creating the configuration from scratch, but that of course would require some time and knowledge about how to build the OS components (especially low level stuff like the bootloader).

  • @ilyesHidri
    @ilyesHidri 11 วันที่ผ่านมา +1

    I had this error after bitbake, ERROR: Layer raspberrypi is not compatible with the core layer which only supports these series: kirkstone (layer is compatible with styhead walnascar)

    • @spradotube
      @spradotube  11 วันที่ผ่านมา +1

      It seems you are ixing up layer versions. Make sure all layers are using the same version. For example, if you want to use kirkstone. Make sure all layers are using this version.

  • @mohamedsebri4955
    @mohamedsebri4955 หลายเดือนก่อน +1

    Thanks very much for the content! It was really helpful!
    I want to ask how can I access the raspberry pi board from my PC to see it boot and use it once I have built the image and flashed it into the SD card?

    • @spradotube
      @spradotube  หลายเดือนก่อน +1

      Hi Mohamed. I Would recommend attaching to its serial console. You might find a few tutoriais out there on how to do it, like this one: www.jeffgeerling.com/blog/2021/attaching-raspberry-pis-serial-console-uart-debugging.

    • @mohamedsebri4955
      @mohamedsebri4955 หลายเดือนก่อน

      @@spradotube Thank you very much!

  • @bootoolz
    @bootoolz 8 หลายเดือนก่อน

    Congratulations! Very nice demo…
    I’d like to suggest a demo of how enable and use SPI device via user space like… example how connect MCP251x modules…
    Anyway thanks…

    • @spradotube
      @spradotube  8 หลายเดือนก่อน

      Great, thanks for the feedback!

  • @sehjpal
    @sehjpal 8 หลายเดือนก่อน +1

    Thanks for the lesson, I followed the steps for yocto and built the images. After downloading to rpi, I was trying to use Wifi so found that in /lib/ there is no module folder. Can you please share more details on how to add Wifi drivers. TIA

    • @spradotube
      @spradotube  8 หลายเดือนก่อน

      In Buildroot, you need to enable BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI.
      In Yocto, try bitbaking core-image-base instead of core-image-minimal.

  • @DTimCummings
    @DTimCummings 7 หลายเดือนก่อน

    Thanks. Great video. May I suggest moving camera image of rpi from bottom right to top left. All the action on the command line is in bottom right corner and obscured by camera. I am using CM4 with eMMC and am interested in file systems or techniques to protect OS from being corrupted if power abruptly removed by an end user. Also I didn't understand your comment that remotely applying updates to off-the-shelf debian is a problem because it seems easier than remotely updating a custom OS?

    • @spradotube
      @spradotube  7 หลายเดือนก่อน

      Hi Tim!
      1. Thanks for the suggestion about moving the camera. I will make sure the camera does not obscure the commands next time.
      2. Thanks for the suggestion on techniques to protect the filesystems from being corrupted. Added to my list of future blog posts/videos.
      3. About remotely applying updates to off-the-shelf Debian, I see a few problems. One of the main problems is that people tend to use packages as a mechanism for remote updates. And a package management system (dpkg/apt on Debian based systems) is not atomic. If you interrupt the update in the middle, you might end-up in a situation where you cannot interrupt anymore without manual intervention. There are other challenges as well, like implementing a reliable rollback mechanism.
      Thanks for the feedback!

    • @DTimCummings
      @DTimCummings 7 หลายเดือนก่อน

      @@spradotube Thanks. That gives me more to think about Debian updates. However, I was actually asking why custom OS from Yocto or Buildroot don't have problems with updates. I don't even know how to do apply updates in those cases.

    • @spradotube
      @spradotube  7 หลายเดือนก่อน

      The main reason is that, when you build from sources, you have more control over the logic behind the update system. An update system needs to be fail-safe (atomic) and secure (you need to be able to sign the update artifacts and maybe encrypt the payloads). It needs to be fast and use little network bandwidth (e.g. only download the difference, what has changed). It needs to provide a short downtime (e,g, do the update in the background, while the system is running). Is it not easy to implement all of that with a binary-based Linux distribution. On embedded Linux, there are a few solutions to implement a remote update system, including swupdate, RAUC and Mender. You might want to look at them.

    • @DTimCummings
      @DTimCummings 7 หลายเดือนก่อน

      @@spradotube Wow thanks. That is great info. Yes I will check them out.

  • @AakashKumarGupta-rh5pb
    @AakashKumarGupta-rh5pb 2 หลายเดือนก่อน +1

    there is some error coming while installing bitbake
    error end with failed with exit code '1'
    and then NATIVELSBSTRING "universal " showing
    before error its showing host name
    is there some solution for this

    • @spradotube
      @spradotube  2 หลายเดือนก่อน

      I haven't seen this issue before. I t might be something related to your build environment. Make sure you configured your environment as described in docs.yoctoproject.org/ref-manual/system-requirements.html#required-packages-for-the-build-host

    • @AakashKumarGupta-rh5pb
      @AakashKumarGupta-rh5pb 2 หลายเดือนก่อน

      @@spradotube i click the image where error is showing can i send error image on your Instagram id if you give your Instagram handle
      I also chat gpt the error but nothing resolve

  • @radhakrishnans785
    @radhakrishnans785 8 หลายเดือนก่อน +1

    Whether Buildroot have option for creation of custom OS image with GUI based desktop enviroment ?

    • @spradotube
      @spradotube  8 หลายเดือนก่อน

      Buildroot supports graphic toolkits like GTK, QT, SDL, etc; and also display servers like X11 and Wayland/Weston, but it doesn't support building rich desktop environments like Gnome and KDE, mainly because it is focused on embedded systems.

  • @agungprasetyonugroho3076
    @agungprasetyonugroho3076 2 ชั่วโมงที่ผ่านมา

    why is my buildroot output/images only found 'rootfs.tar' not found file .img

    • @spradotube
      @spradotube  ชั่วโมงที่ผ่านมา

      Something is probably missing in your configuration. If you loaded one of Raspberry Pi's default configuration files, you should have a .img to flash and boot.

  • @lxw5231
    @lxw5231 8 หลายเดือนก่อน

    thank you for this tutorial. I wonder how you connect the console, so you can see the boot process.

    • @spradotube
      @spradotube  8 หลายเดือนก่อน +1

      I am glad you enjoyed it! For the serial console, there is a nice tutorial on the Adafruit website: learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable/connect-the-lead

    • @lxw5231
      @lxw5231 8 หลายเดือนก่อน

      @@spradotube thank you so much. I got it work, both on buildroot and yocto. great video!

  • @yousfineji6164
    @yousfineji6164 3 หลายเดือนก่อน

    Thank you for the excellent video, it was really helpful

    • @spradotube
      @spradotube  3 หลายเดือนก่อน

      Thanks! I am glad you enjoyed it!

  • @Bhv-w1g
    @Bhv-w1g 4 หลายเดือนก่อน

    Hi Sergio,
    Thanks for the video, quite insightful.
    While I was able to follow along and use bitbake, I seem to be facing an issue with compiling the image. The build runs until the very end every time (98% sometimes) and the terminal closes abruptly.
    To add more info., the following directory “deploy/images/raspberrypi4-64/bootfiles” is generated with files with the following extensions “.bin” “.txt” “.dat” “.stamp” “.elf”.
    There are no “.wic” files being generated.
    I’m using Ubuntu - 22.04, kirkstone branch for poky and raspberrypi layer.
    Kindly seeking your suggestions in this regard. Thanks.

    • @spradotube
      @spradotube  4 หลายเดือนก่อน

      Usuallly those abrupt terminal closes are related to the lack of resources. Did you try to build with just a few threads, just to see if that is the case. Just add this to your local.conf file:
      BB_NUMBER_PARSE_THREADS = "4"
      BB_NUMBER_THREADS = "4"
      PARALLEL_MAKE = "-j 2"
      The build will be slow, but we just want to confirm if it is related to resource usage (i.e. low memory for the amount of threads created by bitbake).

    • @Bhv-w1g
      @Bhv-w1g 4 หลายเดือนก่อน

      Hi Sergio,
      Thank you for your reply.
      I tried troubleshooting it with your suggestion and it resolved the error.
      Thank you for helping me in my Yocto learning curve.

  • @hajainaandrialazantsoa9215
    @hajainaandrialazantsoa9215 4 หลายเดือนก่อน

    Thank you so much for this video.....How do i do to emulate it on Qemu?I'm trying to load it but i always on a blackscreen

    • @spradotube
      @spradotube  4 หลายเดือนก่อน +1

      Hmmm, haven´t tried to emulate an Rpi image on QEMU yet. It should be doable since QEMU supports it, but not sure about the complete details. If you want to just amulate an image, maybe it is better to just build a qemu image by changing the machine to something like this:
      MACHINE = "qemuarm"

    • @hajainaandrialazantsoa9215
      @hajainaandrialazantsoa9215 4 หลายเดือนก่อน

      @@spradotube Yeah I follow Qemu instructions using "qemu-system-arm" but I dont know why i always have a blackscreen😅nothing load....Maybe i missed something

    • @TurboElectricLtd
      @TurboElectricLtd 13 วันที่ผ่านมา

      @@hajainaandrialazantsoa9215 It's probably on another console. I think if you type help it will show how to switch.

  • @protonspeed
    @protonspeed 4 หลายเดือนก่อน

    Hey, hope you are doing well. I was trying to build a buildroot to simply stream a USB camera on HDMI. I have one error that I'm stuck to. /dev/video0 no such file or directory. Either I use vlc to capture, gstreamer , ffmpeg everywhere. I'm making this on my windows using wsl. Can you help me with this? Please

    • @spradotube
      @spradotube  4 หลายเดือนก่อน

      Since you don't have /dev/video0, it is possible that your kernel is lacking the camera driver? Or maybe the drivers are built as kernel modules and you need to load them at boot time?

    • @protonspeed
      @protonspeed 4 หลายเดือนก่อน

      @@spradotube Thanks for the reply. I have installed UVC module from linux configuration. How can i load them at the boot time ?

    • @spradotube
      @spradotube  4 หลายเดือนก่อน

      You can use the modprobe command to load the module.

    • @protonspeed
      @protonspeed 4 หลายเดือนก่อน

      @@spradotube okay will do that and update you soon.

  • @guestsneezeplayz
    @guestsneezeplayz 4 หลายเดือนก่อน

    i would like to add kde-plasma to my distro how could i do that?

    • @spradotube
      @spradotube  4 หลายเดือนก่อน

      I have never tried, but there is a meta-kde layer (layers.openembedded.org/layerindex/branch/master/layer/meta-kde/) that containes metadata to package KDE related software.
      Now, it is important to mention that Yocto Project is focused on building Linux distributions for embeded devices, not fully-fledged desktop distros. So in this case, using a Debian based distro might be a better approach.

    • @guestsneezeplayz
      @guestsneezeplayz 4 หลายเดือนก่อน

      @@spradotube would you make a tutorial?

    • @spradotube
      @spradotube  4 หลายเดือนก่อน

      Cannot promise, but add it to my list!

    • @guestsneezeplayz
      @guestsneezeplayz 4 หลายเดือนก่อน

      @@spradotube i have a few more files than ususal since i added a few more feature : root@archlinux:~# ls
      buildroot-2024.02 bzImage efi-part rootfs.cpio rootfs.ext2 rootfs.ext3 rootfs.iso9660 rootfs.tar syslinux
      root@archlinux:~# tar xf rootfs.tar
      root@archlinux:~#

  • @vikramjitsingh834
    @vikramjitsingh834 7 หลายเดือนก่อน

    i have followed all the steps to create image "core-image-full-cmdline-raspberrypi4-64.rootfs-20240419074735.wic.bz2" extracted 'core-image-full-cmdline-raspberrypi4-64.rootfs-20240419074735.wic'. Then copied it to windows machine. Used RPI Imager to flash the microSD card. But the raspberrypi4 (400) is not booting up. It displays the the raspberry images on monitor and then shuts off. Any hints?

    • @spradotube
      @spradotube  7 หลายเดือนก่อน

      I would try to access the serial console to check the kernel logs and see if there is a prompt to login and inspect the distro (learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable/connect-the-lead)

    • @vikramjitsingh834
      @vikramjitsingh834 7 หลายเดือนก่อน

      @@spradotube Thanks. Will try and check

    • @goudamm9680
      @goudamm9680 6 หลายเดือนก่อน

      i am also facing the same issue ,did you fix the issue

    • @vikramjitsingh834
      @vikramjitsingh834 6 หลายเดือนก่อน

      No, the project got depriortized

  • @raghupatrinisaisankarrao9253
    @raghupatrinisaisankarrao9253 4 หลายเดือนก่อน +1

    hi sergio,
    While I am trying to build os using Yocto in Rpi4 as per your inputs, i am facing the issue as mentioned below, please help me to fix this issue
    thanks.
    please suggest some website/book to understand the about linux in and out.
    lcl@lcl-Latitude-5430:~/Desktop/yocto/build$ bitbake core-image-minimal
    Loading cache: 100% |######################################################################################################################################################################################################################################################| Time: 0:00:00
    Loaded 1676 entries from dependency cache.
    NOTE: Resolving any missing task queue dependencies
    Build Configuration:
    BB_VERSION = "2.0.0"
    BUILD_SYS = "x86_64-linux"
    NATIVELSBSTRING = "universal"
    TARGET_SYS = "aarch64-poky-linux"
    MACHINE = "raspberrypi4-64"
    DISTRO = "poky"
    DISTRO_VERSION = "4.0.19"
    TUNE_FEATURES = "aarch64 armv8a crc cortexa72"
    TARGET_FPU = ""
    meta
    meta-poky = "kirkstone:cbac0f1bfc025d11aea74db16034e9589fbcffa6"
    meta-raspberrypi = "kirkstone:d7544f35756d87834e8b4bf3e3e733c771d380ae"
    Initialising tasks: 100% |#################################################################################################################################################################################################################################################| Time: 0:00:01
    Sstate summary: Wanted 1118 Local 0 Mirrors 0 Missed 1118 Current 269 (0% match, 19% complete)
    NOTE: Executing Tasks
    WARNING: linux-raspberrypi-1_5.15.92+gitAUTOINC+509f4b9d68_14b35093ca-r0 do_fetch: Failed to fetch URL git://github.com/raspberrypi/linux.git;name=machine;branch=rpi-5.15.y;protocol=https, attempting MIRRORS if available
    ERROR: linux-raspberrypi-1_5.15.92+gitAUTOINC+509f4b9d68_14b35093ca-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/home/lcl/Desktop/yocto/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/lcl/Desktop/yocto/sources/poky/scripts:/home/lcl/Desktop/yocto/build/tmp/work/raspberrypi4_64-poky-linux/linux-raspberrypi/1_5.15.92+gitAUTOINC+509f4b9d68_14b35093ca-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/lcl/Desktop/yocto/build/tmp/work/raspberrypi4_64-poky-linux/linux-raspberrypi/1_5.15.92+gitAUTOINC+509f4b9d68_14b35093ca-r0/recipe-sysroot/usr/bin/crossscripts:/home/lcl/Desktop/yocto/build/tmp/work/raspberrypi4_64-poky-linux/linux-raspberrypi/1_5.15.92+gitAUTOINC+509f4b9d68_14b35093ca-r0/recipe-sysroot-native/usr/sbin:/home/lcl/Desktop/yocto/build/tmp/work/raspberrypi4_64-poky-linux/linux-raspberrypi/1_5.15.92+gitAUTOINC+509f4b9d68_14b35093ca-r0/recipe-sysroot-native/usr/bin:/home/lcl/Desktop/yocto/build/tmp/work/raspberrypi4_64-poky-linux/linux-raspberrypi/1_5.15.92+gitAUTOINC+509f4b9d68_14b35093ca-r0/recipe-sysroot-native/sbin:/home/lcl/Desktop/yocto/build/tmp/work/raspberrypi4_64-poky-linux/linux-raspberrypi/1_5.15.92+gitAUTOINC+509f4b9d68_14b35093ca-r0/recipe-sysroot-native/bin:/home/lcl/Desktop/yocto/sources/poky/bitbake/bin:/home/lcl/Desktop/yocto/build/tmp/hosttools"; export HOME="/home/lcl"; LANG=C git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat clone --bare --mirror github.com/raspberrypi/linux.git /home/lcl/Desktop/yocto/build/downloads/git2/github.com.raspberrypi.linux.git --progress failed with exit code 128, no output
    ERROR: linux-raspberrypi-1_5.15.92+gitAUTOINC+509f4b9d68_14b35093ca-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'git://github.com/raspberrypi/linux.git;name=machine;branch=rpi-5.15.y;protocol=https')
    ERROR: Logfile of failure stored in: /home/lcl/Desktop/yocto/build/tmp/work/raspberrypi4_64-poky-linux/linux-raspberrypi/1_5.15.92+gitAUTOINC+509f4b9d68_14b35093ca-r0/temp/log.do_fetch.687420
    ERROR: Task (/home/lcl/Desktop/yocto/sources/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.15.bb:do_fetch) failed with exit code '1'
    WARNING: squashfs-tools-native-4.5-r0 do_fetch: Failed to fetch URL git://github.com/plougher/squashfs-tools.git;protocol=https;branch=master, attempting MIRRORS if available
    WARNING: libmodulemd-native-2.14.0-r0 do_fetch: Failed to fetch URL git://github.com/fedora-modularity/libmodulemd;protocol=https;branch=main, attempting MIRRORS if available
    WARNING: dnf-native-4.11.1-r0 do_fetch: Failed to fetch URL git://github.com/rpm-software-management/dnf.git;branch=master;protocol=https, attempting MIRRORS if available
    NOTE: Tasks Summary: Attempted 1462 tasks of which 1203 didn't need to be rerun and 1 failed.
    Summary: 1 task failed:
    /home/lcl/Desktop/yocto/sources/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.15.bb:do_fetch
    Summary: There were 4 WARNING messages.
    Summary: There were 2 ERROR messages, returning a non-zero exit code.

    • @spradotube
      @spradotube  4 หลายเดือนก่อน

      It seems the errors are related to network connectivity. Make sure you have Internet access, no firewalls, proxies, etc.
      About books on the topic, two good ones:
      www.amazon.com/Embedded-Linux-Development-Using-Project-ebook/dp/B0BRCTY345
      www.amazon.com/Mastering-Embedded-Linux-Programming-potential/dp/1789530385

    • @raghupatrinisaisankarrao9253
      @raghupatrinisaisankarrao9253 4 หลายเดือนก่อน

      @@spradotube thanks for books suggestion
      Reg error:
      I can access the links via browser