Introduction to Embedded Linux Part 4 - Yocto Custom Image and Layer | Digi-Key Electronics

Поделиться
HTML-код
  • Опубликовано: 16 сен 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 the Yocto Project: www.digikey.co...
    In the previous episode ( • Introduction to Embedd... ), we flashed our core-image-minimal image to an SD card and booted into Linux on our STM32MP157D-DK1.
    In this episode, we see how to create a custom layer in the Yocto Project. Bitbake works by looking through various recipe files found in the different layers specified by bblayers.conf. By creating our own layer, we can control what aspects of the image gets changed, and we can keep the layer under version control to make building and flashing images easier (especially during production).
    We use the bitbake-layers command to create a template layer for us, which we modify to generate a custom image. We copy the main recipe for generating core-image-minimal and use it as a starting point. We make a few changes to core-image-minimal.bb and rename it to custom-image.bb. These changes include expanding the root filesystem (rootfs) as well as setting a default root password.
    We then include our custom layer (named meta-custom) in our build project (conf/bblayers.conf). This causes bitbake to read through the recipes in our layer and include them in the build process.
    We build our custom image (by calling “bitbake custom-image”). When it’s done, we flash the output bootfs and rootfs onto our SD card. From there, we boot our ST32MP157D-DK1 and test the new root password and rootfs size (which should be around 200 MiB).
    Product Links:
    www.digikey.co...
    Related Videos:
    • STM32MP1 workshop - 1 ...
    Related Project Links:
    www.digikey.co...
    Related Articles:
    forum.digikey....
    Learn more:
    Maker.io - www.digikey.co...
    Digi-Key’s Blog - TheCircuit www.digikey.co...
    Connect with Digi-Key on Facebook / digikey.electronics
    And follow us on Twitter / digikey
  • НаукаНаука

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

  • @mahendrasondagar2001
    @mahendrasondagar2001 2 года назад +9

    As usual, super amazing...🤟
    Looking forward to having the entire series of the Yocto just like your previous FreeRTOS series ✌

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

    Useful stuff, even if not widely viewed.

  • @vonmakeheat
    @vonmakeheat 2 года назад +2

    Ok . I swore off low level coding tutorials for a while u sir got me excited to try this stuff again . I mean the explanation of mounting the rootfs after the clock init (fsbl1 layer) is literally 🔥 . I always found it wired that there where loads of coding tutorials on high level concepts, but not low level like this where u really feel as if u know what’s goin on if u should encounter any errors . Kudos 💯

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

    By now, I am used to press like before watching the video in this series :-)

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

    Shawn is awesome. Extremely valuable resource...explains things in such an easy to understand way.

  • @kermitdaphrogge525
    @kermitdaphrogge525 2 года назад +11

    Just can't thank you enough

  • @soufiane_krem
    @soufiane_krem 2 года назад +2

    This is quite helpful ! Thank you

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

    Great video!! Just the one I needed. Thanks a lot.

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

    Free knowledge. Wow!
    I wish all universities taught students like that 😁🤣😂

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

    I guess the busybox that have the argument -P instead of -p when set the password.
    To change the boot partition, you can use the sed(1) command, as you know what to change.
    To redo the same command, you can try C-r to reverse search command line. Like C-r dd, and you can type C-r to continue search.

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

    Is it the same thing when working with the Raspberry Pi ??

  • @benq3605
    @benq3605 7 месяцев назад

    Shawn, thank you a lot, you are awesome

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

    What a amazing session. Impressive content you cover.
    Thanks for it.
    I want to install docker into rugged board imx6ul
    How can I install it ?

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

    Great videos!

  • @AntoineLevesque-w4c
    @AntoineLevesque-w4c 11 месяцев назад

    Not sure why, but setting the password with -P in plain text would not compile for me. I have to create an encrypted password and use the -p flag instead.

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

    how to add library to yocto ...so that we can use that library in application and run in qemu??

  • @AbdulRehman-eq3ns
    @AbdulRehman-eq3ns 2 года назад +1

    I tried but It's saying wrong password.. I also removed the debug-tweaks as well. but I used -p rather then -P. If I use - P it's giving me error.

    • @AbdulRehman-eq3ns
      @AbdulRehman-eq3ns 2 года назад

      ERROR: custom-image-1.0-r0 do_rootfs: custom-image: usermod command did not succeed.
      below command I'm using
      EXTRA_USERS_PARAMS = "usermod -P 'toor' root"

    • @AbdulRehman-eq3ns
      @AbdulRehman-eq3ns Год назад +1

      for me lower -p worked

    • @AbdulRehman-eq3ns
      @AbdulRehman-eq3ns Год назад +1

      Here is the solution:
      #Creating and setting password using kirkstone
      #run in terminal
      openssl passwd -6
      Password: typeyourpassword
      Verifying - Password: typeyourpassword
      $6$CvYxu.4fiswa9Gah$xkiM8wJMb0Y49Op49aPjucbJSvMIePcO54JfMusKGP24GahxOKVnCUjyRCoH.sH6pQXuQ1SA.sIZ0E9szHjTY/
      #Now add these lines in .bb file of local.conf file.
      #use '\' before each $ sign in the encrypted passwd
      inherit extrausers
      EXTRA_USERS_PARAMS = "usermod -p '\$6\$CvYxu.4fiswa9Gah\$xkiM8wJMb0Y49Op49aPjucbJSvMIePcO54JfMusKGP24GahxOKVnCUjyRCoH.sH6pQXuQ1SA.sIZ0E9szHjTY/' root;"

    • @jacobcui1940
      @jacobcui1940 Год назад +1

      @@AbdulRehman-eq3ns thanks man, I had the same issue

  • @siddeshu.h4229
    @siddeshu.h4229 2 года назад

    Great sir thank you

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

    Is there any book to learn this, i am lost here

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

    Anyone happened to encounter this issue: "usermod: prefix must be an absolute path"? It drives me crazy..

    • @chrysolinsudhan6481
      @chrysolinsudhan6481 5 месяцев назад

      For me adding a ; between " and \ in EXTRA_USERS_PARAMS = "\ helped. In other words, I am doing this : EXTRA_USERS_PARAMS = ";\

    • @chrysolinsudhan6481
      @chrysolinsudhan6481 5 месяцев назад

      For me, adding a semi-colin between " and \ helped. In other words, I am doing this : EXTRA_USERS_PARAMS = ";\
      It built, but I havent flashed and checked login, so I don't know whether it is a proper fix.

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

    VERY nice set of videos. However for me Yocto seems broken. I am using Ubuntu as the host machine, its a huge machine, plenty of ram, plenty of disc and plenty of everything. I have built a yocto and it works and now I want to mod it. I have done the sources command yet the create layer then bullshits that theres no space left on the device when it s trying to set up a watch. It even gives me a hint to look at the max user watches which is 65k... I would be more than a bit shocked that somehow this is not enough