Introduction to Embedded Linux Part 1 - Buildroot | Digi-Key Electronics

Поділитися
Вставка
  • Опубліковано 24 тра 2024
  • Linux is a powerful operating system that can be compiled for a number of platforms and architectures. One of the biggest draws is its ability to be customized for an application. Tools like Buildroot, OpenWRT, and Yocto Project help us create custom Linux distributions for embedded systems.
    In this video series, we will explore Buildroot and the Yocto Project. We also demonstrate how you might develop applications for embedded Linux. We will not dive into the specifics of how each of these systems work but give you a good starting place so you can read or watch more advanced material about working with embedded Linux.
    See this written tutorial if you would like to review the commands issued in this tutorial for Buildroot: www.digikey.com/en/maker/proj...
    To start, we provide some reasons and examples as to why you might want to use embedded Linux over other platforms, such as bare-metal programming on microcontrollers and an RTOS. Often, your application will dictate the use of one platform over another. Embedded Linux offers the ability to reuse high-level code written and tested by others that work across a variety of platforms. This can save you development time when you need things like networking, graphics, cryptography, audio, machine learning, etc.
    We introduce Buildroot as one of the easiest tools to use for creating a custom Linux image. We demonstrate it by creating a Linux distribution for the STM32MP157D-DK1 single board computer. From there, we flash the distribution image onto an SD card and load Linux on the board, which allows us to log in with a serial terminal to do basic file manipulation and script writing.
    Product Links:
    www.digikey.com/en/products/d...
    Related Videos:
    • STM32MP1 workshop - 1 ...
    Related Project Links:
    www.digikey.com/en/maker/proj...
    Related Articles:
    forum.digikey.com/c/eewiki/li...
    Learn more:
    Maker.io - www.digikey.com/en/maker
    Digi-Key’s Blog - TheCircuit www.digikey.com/en/blog
    Connect with Digi-Key on Facebook / digikey.electronics
    And follow us on Twitter / digikey
  • Наука та технологія

КОМЕНТАРІ • 154

  • @maksimlepel9594
    @maksimlepel9594 Рік тому +17

    I’m not native English speaker, but your pronunciation is perfect, I understand all words you speak, thank you

  • @ShakilShahadat
    @ShakilShahadat 2 роки тому +36

    The timing of this series couldn't be more perfect than this for me.

    • @ajayamirtharaj3016
      @ajayamirtharaj3016 2 роки тому +4

      Same here dude. Same.

    • @bastiannenke9613
      @bastiannenke9613 2 роки тому +6

      Same here, my lichee pi nano will arrive in a couple Weeks and I already started to go deeper in the matter of Linux and C than I've ever done before.

  • @thenoisyelectron
    @thenoisyelectron 2 роки тому +55

    YES! I am SOO happy to see this! Your STM32 series was a fantastic introduction to that micro controller family. If this series is even half as good as that then I am super excited!

  • @MadRajibLab
    @MadRajibLab 2 роки тому +10

    Thanks Shawn, for your efforts in making these videos.

  • @Factory400
    @Factory400 2 роки тому +4

    This content is super high quality! Relevant, well considered, well presented = USEFUL!
    Love it.

  • @electronichome1153
    @electronichome1153 2 роки тому +1

    Thanks Shawn. I will book this weekend mainly for your great tutors in the past months & years!

  • @ItsGosho
    @ItsGosho 2 роки тому +1

    That is High Quality Content. It is worth creating a whole course even bigger than the tutorials that will be available with tasks and more detailed explanations!

  • @PaulSykesMr
    @PaulSykesMr 2 роки тому +4

    Top marks for clarity. Nice to see what can be a complex subject communicated so clearly.

  • @AhmetKizilay0
    @AhmetKizilay0 2 роки тому +2

    This is amazing. Looking forward to the next episode!

  • @chrislamb4723
    @chrislamb4723 2 роки тому +1

    AWESOME! It took me the better part of the day to get this working on an STM32MP157C_DK2 - mostly due to many problems with VirtualBox, but man did I learn a lot! Thank you!

  • @antonyalen2745
    @antonyalen2745 2 роки тому +4

    I was just about to skip on the best Linux resource on the internet, thank god I clicked on this video. Please Please make a comprehensive series on the three (especially Yocto). Thanks alot guyz!

  • @MatteoCordray
    @MatteoCordray Рік тому

    Great video! Build time for a raspberry pi zero w (v1.1) took my Thinkpad T470 about 1 hour and 9 minutes to run "make". Excited to learn more from this series!

  • @scienceoftheuniverse9155
    @scienceoftheuniverse9155 2 роки тому +3

    I really love your tutorials Shawn

  • @starlino
    @starlino 2 роки тому +2

    I like these series, keep them going

  • @astralxing988
    @astralxing988 2 роки тому +4

    For dd command use "status=progress" to actually see the progress of dd command .
    Nice tutorial !!!

  • @littlenewton6
    @littlenewton6 2 роки тому +1

    这个视频太棒了!UP主的发音非常精准清晰!

  • @annguyenhoangphu451
    @annguyenhoangphu451 2 роки тому +2

    Love your video, Shawn. Thank you!!

  • @mixxx2005
    @mixxx2005 2 роки тому +1

    Very good. Looking forward to seeing next videos 👍👍👍

  • @Francisco-me2eu
    @Francisco-me2eu 2 місяці тому

    Great channel!
    Direct and concise

  • @joebro391
    @joebro391 Рік тому

    This was so clear and concise. Thank you!

  • @SchecterWolfe
    @SchecterWolfe 8 місяців тому

    while there are many buildroot guides on youtube, only ONE is explained by a guy in a bowtie. Respect

  • @RichardEricCollins
    @RichardEricCollins 2 роки тому +28

    I've been working with Yocto on and off for a couple of years. It is extremely powerful. Just finished a custom build for a client using i.MX6 ULL chip. Never would have been able to do it without yocto. Looking forward to the series. I still have a lot to learn, I think my work flow needs improving. I've notice over the last three years the need for developers to be using Linux to sky rocket. I'm coming into contact with companies where only the admin staff are on Windows. Management on Mac. Everyone else on Linux.

    • @einsteis
      @einsteis 2 роки тому +2

      You should really have a look at the ISAR project which is based off Yocto. It combines Yocto with prebuilt packages from debian/apt.

    • @evren-5210
      @evren-5210 2 роки тому

      Does i.MX6 cost efeective? compared to stm32

    • @batboy49
      @batboy49 2 роки тому +3

      buildroot is WAY easier than yocto. To date I have not seen anything that you could do with yocto that you cannot do in buildroot....easier. Yocto can take years to properly understand, buildroot....basically an afternoon. It is simpler but not hard to customize.

  • @rodboyce2679
    @rodboyce2679 2 роки тому +9

    The introduction is great. I have worked with buildroot on and off for years. You can split the build into components, boot loaders, kernel, device-tree, root filesystem. This makes updating the kernel easy as long as you can just update each part on your SD card. You can make these components from the buildroot build command line. The best way to figure this out is 'make help' in the buildroot directory, there is a lot of information there. Hope I have not just taken the subject of an up and coming episode of this series. Keep up the good work I will be able to point co-works at this series instead of writing lots of documentation.

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

      You have not...I actually switch to Yocto starting in the next episode :) That's really cool to hear about how Buildroot can be split into components.

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

    Thank you very much for making suck an informative video on buildroot. you made it really easy to understand.

  • @greppurtorfason4216
    @greppurtorfason4216 Рік тому +1

    Excellent series - Thank you.
    I use buildroot and yocto quite a bit, and welcome these videos.
    Notes:
    a) Append 'status=progress' to the dd line to have an indication of dd's progress.
    b) When using usermod to add yourself to a group (here dialout), one needs to use 'newgrp dialout' to activate it - else you have to open a new terminal to get it activated.
    Thanks a lot for all the work that went into making these videos!

    • @KydroxHD
      @KydroxHD 7 місяців тому

      may i ask, what do you use it for? I'm curious on what kind of career direction embedded linux could actually direct to

  • @Clark-Mills
    @Clark-Mills 2 роки тому +5

    Nice timing, I'm playing with a AllWinner D1 64 bit RISC-V board, for fun I want to do exactly this. It's on my ever growing stack of ToDo's...
    Thanks as ever for all your work, it's excellent!

    • @jyvben1520
      @jyvben1520 2 роки тому +1

      Risc V, cutting edge, does gcc compile for that ?

    • @Clark-Mills
      @Clark-Mills 2 роки тому

      @@jyvben1520 Yes! :)

  • @oldornot
    @oldornot 2 роки тому +5

    dd status=progress option is available in Ubuntu since 16.04 ;)

  • @arshammor3729
    @arshammor3729 2 роки тому +3

    waiting for next part !

  • @rick_er2481
    @rick_er2481 2 роки тому +2

    this is awesome, hopefully as great as the stm32 serie

  • @davidpatry4195
    @davidpatry4195 2 роки тому +3

    Good job Shawn.

  • @anoldhippieshideout1080
    @anoldhippieshideout1080 2 роки тому +5

    I have been learning linux since before Red Hat's IPO. It's ability to run on old hardware, has made me always think about task oriented hardware. People throw old hardware to the curb because it is running slow. If it only has one task, it is a speed demon at that task

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

      imagine the amount of old electronics in the landfill due to WINDOZE!!

  • @ryanmckenna2047
    @ryanmckenna2047 Рік тому

    These tutorials are gold

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

    Very interesting, and very nicely explained.

  • @molotov-zz6rm
    @molotov-zz6rm 2 роки тому +2

    to speed up make times: you can run make with the jobs flag. make -j12 for example for a system with 12 logical cores.

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

    Very good quality stuff, thank you !

  • @stevenbroshar7948
    @stevenbroshar7948 3 дні тому

    Been wanting to know what buildroot is/does for some time. I feel that I now have a good foundation. Thanks.

  • @VasaMusic438
    @VasaMusic438 2 роки тому +1

    Great Video !!! Please, more !!!

  • @fat_pigeon
    @fat_pigeon 2 роки тому +2

    17:40 Add `status=progress` to the `dd` command line. to show progress. Or pipe through `pv`.

  • @marcusk7855
    @marcusk7855 Рік тому +2

    If you add "status=progress" the the dd comand it will show the progress as it goes.

  • @francisco.mendes
    @francisco.mendes 10 місяців тому

    Great helpful video! Thank u so much!

  • @muratkancaoglu3284
    @muratkancaoglu3284 2 роки тому +3

    For dd command, using oflag=sync will force every byte written over SD instead of buffer and status=progress to show realtime transfer information

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

      Good to know about the sync argument, thanks! status=progress does not work on my version of Linux Mint, for whatever reason (that status just shows up at the end after dd is done).

  • @sanderspeetjens
    @sanderspeetjens 2 роки тому +2

    Btw when using dd you can add status=progress to show output

  • @Microcontrollerslab
    @Microcontrollerslab 2 роки тому +4

    Correction: We do not have to completely rebuild the entire image in buildroot when we make any changes. We can avoid distclean and buildroot build system will automatically detect which changes are made and it will only build those packages where you make the changes.

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

    Awesome Video! Try status=progress with dd command for progress bar

  • @lionux6506
    @lionux6506 4 місяці тому

    Thanks for this video 👍🏻

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

    Oo! Can't wait to try next! lolz...still doing my first linux project!

  • @mesuttopuzlu6248
    @mesuttopuzlu6248 Рік тому

    Nice video series.... Thank you Mr. Clark Kent :)

  • @nqobilesibisi3544
    @nqobilesibisi3544 Рік тому

    wow ,im a bit late to the party but im glad i followed all the steps successfully 🎉😅, thank you sir.

  • @10e999
    @10e999 2 роки тому +1

    Good video.
    I'm currious about the underlying process here.
    Where does Buildroot find its cross-compiler and linker ?

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

    Cool video, thanks :)

  • @karimzidan3067
    @karimzidan3067 3 місяці тому

    Thank you for your effort 🤍

  • @derisis13
    @derisis13 2 роки тому +8

    I'm definitely an openwrt fanboy. Routers are easy to come by (since no-one is happy with their 100Mb gear anymore) and have all the resources to be used as IoT controllers. And they are quite secure as openwrt is built with security in mind.

    • @gregcooper8647
      @gregcooper8647 Рік тому

      Are you saying you re-purpose the routers to do things besides being a router? Or do you just repurpose them as routers running openwrt?

  • @RajaGupta-iw7wg
    @RajaGupta-iw7wg Рік тому

    Well explained.

  • @MA-td2ic
    @MA-td2ic Рік тому

    This quality is too good to be free honestly

  • @vediam
    @vediam 11 місяців тому

    Harika bir video. Çok bilgilendirici

  • @ereyes95
    @ereyes95 Рік тому

    I have wanted to dive into embedded Linux for a few years now and was wondering if you'd recommend this book: Mastering Embedded Linux Programming 3rd Edition

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

    You can do motor control using FreeRTOS for instance, just use kernel unaware interrupts for time critical interrupts that do the control work and the rest can be easily handled by OS threads. The price you pay is less time for OS tasks...

    • @jerrymorrow5209
      @jerrymorrow5209 2 роки тому +1

      i'm a fan of SoC with FPGA for motor control and ARM (maybe multi-core) running embedded linux. best of both worlds

  • @nagarajy6492
    @nagarajy6492 Рік тому

    You are champ dude🙌

  • @doditsuprianto6474
    @doditsuprianto6474 2 роки тому +1

    i am waiting part 2

  • @bruno6613073
    @bruno6613073 5 місяців тому

    @ShawnHymel The keyboard you are using looks and sounds amazing! What is it?

  • @BogdanTheGeek
    @BogdanTheGeek 2 роки тому +2

    Would be nice if you could go through some options in buildroot and show how complicated it would be to do something like add an i2c port or add some files to the image.

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

      That's something I'm planning to do in the next few episodes using Yocto :)

  • @marcushoutzager6225
    @marcushoutzager6225 2 роки тому +1

    This is awesome. When's part two??

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

      Part 2 dropped yesterday :) ua-cam.com/video/2-PwskQrZac/v-deo.html

  • @AdamMaryniuk
    @AdamMaryniuk 2 роки тому +2

    Make sure you run the "sync" command after you run "dd" like that to be sure all the writes are actually flushed to the sd card before you remove it.

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

      From what I understand, umount will do a sync before unmounting the drive. So long as I do a `umount` or `sync`, I should be good.

    • @AdamMaryniuk
      @AdamMaryniuk 2 роки тому +1

      @@ShawnHymel you may be right, but in the video you said "now all we have to do is remove the card from our computer" so I figured a clarification would be good :)

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

      @@AdamMaryniuk Good catch, thanks :) Agreed, `sync` or `umount` is always a good idea!

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

    Thank you!!

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

    Amazing!

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

    18:18 How did you know UART 4 was tied to the on-board ST-Link debugger? And how did you know the config file has UART 4 used as the console port by default?

  • @xidameng
    @xidameng 2 роки тому +1

    I was just looking for this content, and you made a series of tutorial about it... Can I ask that you take my tuition money?

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

    Please start with an FPGA series!!

  • @samuelsirois7455
    @samuelsirois7455 2 роки тому +1

    That guy is amazing

  • @theengineer9910
    @theengineer9910 6 місяців тому

    Thank you

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

    Could this be customized for Old PC's e.g (some have as low as 32MB), I know it's out of video subject, but this one of few videos about Buildroot .

  • @ashishkushwaha3812
    @ashishkushwaha3812 Рік тому

    my stm32 board does not have a memory slot. what should be the right place to find the interface diagram. I can see stm32f429 is listed and I am using the Discovery board with OTG support.

  • @bensenanehamdane9120
    @bensenanehamdane9120 2 роки тому +2

    Hello Shawn and Digi-Key! Thanks for the amazing introduction to Embedded Linux and Buildroot!
    how to use gcc on the generated embedded linux image.
    because when i use pip to install python frameworks, i get a compile error, the system always works with the cross compiler that generated the linux image

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

      Good question! From what I've gathered, you can't use Buildroot to include a compiler on the target (buildroot.org/downloads/manual/manual.html#faq-no-compiler-on-target). You can use another system (e.g. Yocto) to add such packages. In a future episode, I plan to show you how can cross-compile on your host machine to include a custom application in the target image.

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

    Well, OpenWRT are general and not only for routers. And yes, it has packages, so you have packages that you don't need to rebuild to get.

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

    Good vedio

  • @R90916
    @R90916 Рік тому

    What are some simple projects I can do to practice this

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

    I like gtkterm for a terminal program. This is a GUI program, and it runs under KDE with some extra baggage.

  • @user-xg7hi5mh3g
    @user-xg7hi5mh3g 5 місяців тому

    Thank youuuu . How I could run a dotnet app on Yocto image ?

  • @rakesh231rakesh
    @rakesh231rakesh Рік тому

    Can I use STM32MP157f-dk2 kit along with this series?

  • @Paint2Luv
    @Paint2Luv Рік тому +4

    This guy looks like Henry Cavill.

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

    Great overview! I needed this to see what I want to do with my Raspberry Pi. BTW, _router_ (a device that _routes_ packets) is pronounced identically to "rooter" because _route_ is pronounced identically to "root". A _router_ (a device that _routs_ things) would be a device that creates grooves in wood or metal, since the word there is _rout._

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

    @2:06 I think you mean JTOS, as in Jitter Time Operating System.

  • @dwiyulianto8513
    @dwiyulianto8513 Рік тому

    how to add build essential and ncurses packages? I am a layman and can only directly see this video to practice but there is an error

  • @JairoGustavo
    @JairoGustavo 2 роки тому +1

    Hi, why is strict timing mentioned in baremetal when a RTOS is always mentioned for deterministic behaviour?

    • @ShawnHymel
      @ShawnHymel 2 роки тому +1

      Great question! Most RTOSes can be made to be deterministic or non-deterministic, depending on how you configure the scheduler and heap allocation. As a result, your application is not guaranteed to be completely deterministic just because you use an RTOS (although, with the right settings, you can make it so).
      I might not have described it correctly in the video...but my thoughts for "strict timing" for baremetal include things like needing to sample a sensor every 200 microseconds. A time slice in most RTOSes is 1-10ms, so an RTOS won't help you meet that timing requirement. You can combine baremetal techniques and an RTOS (e.g. use a hardware timer to set up a sampling schedule and feed the data to a FIFO that's read by an RTOS task).

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

      @@ShawnHymel Understood!, thanks, I also check your videos about FreeRTOS, they are great, could you recommend us extra material (courses, books, etc) to learn more about FreeRTOS and embedded Linux?

  • @rverm1000
    @rverm1000 2 роки тому +3

    Excellent I've been learning python for 2 years now. Was wondering if Linux would be useful in conjunction with python. I don't particularly care raspberry pi because of the amount of current it uses. Can't really do a stand alone project with it. But I'm glad brought up another board to use which is probably less of a energy hog.
    Really cool that SpaceX uses Linux to run the rockets

    • @canwenot573
      @canwenot573 2 роки тому +1

      In my opinion, Linux and Python are two peas in a pod. Even if you're not too interested in Raspberry Pi; Linux itself, as pointed out in the video, is a very popular and powerful operating system. Learning how to use Linux isn't too difficult if you're already familiar with systems like Windows or MacOS. There is also a massive community of developers and users to support you in your pursuits.
      Python and Linux are both very useful in terms of embedded systems. SBC's and other small standalone electronics can be hard to develop for, especially if the hardware or applications are custom. This video series should elaborate more on the challenges of programming on embedded devices, but suffice it to say that having a good working knowledge of Linux is very handy if you're looking to program embedded devices yourself. I hope that helps.

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

      Adafruit m0 express uses Circuitpython and uses less than 500 mA

  • @sorrowseal
    @sorrowseal 2 роки тому +1

    17:40 use ctrl+t to display dd progress.

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

      Thanks for the tip! I'll give it a shot, but I don't know if it works on all flavors: askubuntu.com/questions/215505/how-do-you-monitor-the-progress-of-dd

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

    Can we use raspberry pi for development instead of stm32?

  • @BerndFelsche
    @BerndFelsche 2 роки тому +1

    Command line is to take charge. GUI is for spectators! 😎

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

    I'd like to create my own portable device based on linux. How can I manage it?

  • @peace-maker4310
    @peace-maker4310 4 місяці тому

    Will stm32f446re can be used??

  • @markobrodanac4304
    @markobrodanac4304 Рік тому

    How can I run my C program on this default Linux configuration ?

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

    good But I met build error when I set an stm32f429 disco ... ubuntu 16.04

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

    I get this error when I typed in "make stm32mp157a_dk1_defconfig" .
    Error: "make: Nothing to be done for 'stm32mp157a_dk1_defconfig'"
    I am using WSL2. Any idea what is the problem? I am in the current folder that is configs where I can see the file for stm32. But I get this error.

    • @mikelennies5831
      @mikelennies5831 2 роки тому +2

      Hello Butterfruit,
      i came across the same issue.
      It turned out that i executed the "make stm157....." command in the "configs" folder.
      When you're in the "buildroot" folder it works fine.

    • @rgbhere
      @rgbhere 2 роки тому +1

      @@mikelennies5831 Thank you for taking a moment to answer that Mike. I really appreciate it!! You actually helped me out there.

    • @jujigatame4800
      @jujigatame4800 Рік тому

      @@mikelennies5831 Thanks dude

  • @phamnhungnhung5164
    @phamnhungnhung5164 Рік тому

    I'm sorry it was a bit confusing! I promise that if you take your ti over the next few days and weeks, tNice tutorials stuff will make sense. Most

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

    Always curious as to why Digico uses embedded windows instead of Linux for their audio consoles.

    • @izik5
      @izik5 2 роки тому +1

      Most likely a business decision long ago, it allowed them to share the same code base with the offline software (which is only available for Windows). Personally I would love to see them switch to a linux based console with offline software ported to macOS. That would be such a massive rewrite that they aren’t likely to go that route unless some external factor forced their hand.

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

    will you be my master of Linux embedding? that will be great.

  • @andytrewin
    @andytrewin 2 роки тому +2

    Do you double as Clark Kent?

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

    STM32MP1!

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

    You can always install VirtualBox and run Linux installations from there. And there are always possible to make some USB devices visible to the Virtual machine running Mint, Ubuntu or Debian.

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

    I don't see Android.
    Why?
    Is it totally unsuitable for IOT?

    • @RichardEricCollins
      @RichardEricCollins 2 роки тому +1

      Too heavy. There have been attempts to create a version for IoT.