Become a leader in the IoT community!

Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.

Step 1 of 5

CREATE YOUR PROFILE *Required

OR
Step 2 of 5

WHAT BRINGS YOU TO DEVHEADS? *Choose 1 or more

Connect & collaborate 🀝with other tech professionals
Learn & Grow πŸ“š
Contribute Experience & Expertise πŸ”§
Step 3 of 5

WHAT'S YOUR INTEREST OR EXPERTISE? *Choose 1 or more

Hardware Design πŸ’‘
Embedded Software πŸ’»
Edge Networking ⚑
Step 4 of 5

Personalize your profile

Step 5 of 5

Read & agree to our COMMUNITY RULES

  1. We want this server to be a welcoming space! Treat everyone with respect. Absolutely no harassment, witch hunting, sexism, racism, or hate speech will be tolerated.
  2. If you see something against the rules or something that makes you feel unsafe, let staff know by messaging @admin in the "support-tickets" tab in the Live DevChat menu.
  3. No age-restricted, obscene or NSFW content. This includes text, images, or links featuring nudity, sex, hard violence, or other graphically disturbing content.
  4. No spam. This includes DMing fellow members.
  5. You must be over the age of 18 years old to participate in our community.
  6. You agree to our Terms of Service (https://www.devheads.io/terms-of-service/) and Privacy Policy (https://www.devheads.io/privacy-policy)
By clicking "Finish", you have read and agreed to the our Terms of Service and Privacy Policy.

Getting Started with Yocto and Raspberry Pi

Hello, I’m just getting started with yocto and have been finding myself a bit overwhelmed. I’ve developed an app on my laptop that talks to a usb-serial device and I’m not looking at building up an image for a Raspberry Pi to have something a little more “production-like”. I’ve got an image built today based on poky, but I’m finding that I want to make changes to some of the config files (i.e. sshd_config to allow root login during development). Is best practice here to start creating my own distro instead of poky? Branch from poky with modifications I need? Or is there a way in bitbake to mark a dependency of some recipe on another in poky and patch files somehow?

Trying to strike a balance between getting something production-like and procrastinating building my actual project in eternal tweaking of the packages installed by default instead of hitting milestones on my project πŸ˜„

  1. ssnover#0000

    I actually managed to figure out the ssh config override: https://github.com/ssnover/megabit-yocto/commit/b3e87d6f9f59d9b86fffc3f39d50da09aa39abec thanks to a section in the dev manual: https://docs.yoctoproject.org/dev-manual/layers.html#overlaying-a-file-using-your-layer
    Lots of documentation, just not always clear how to find what I’m looking for or if what I’m trying to do is even a good idea πŸ˜…

  2. ming_58391#0000

    > Is best practice here to start creating my own distro instead of poky?

    The standard answer to this question is just about _any_ context is **yes**

    Poky is a reference distro – it is not meant to be used in production. The latest releases of Yocto will now print a warning if you use Poky as your distro.

    It is fine to use Poky for learning / exploring, but as soon as you want to use it seriously, you should be making your own distro.

  3. ming_58391#0000

    This is the correct way to do it.
    You have:
    – Created your own layer
    – Created an append file to modify an existing recipe
    – Changed the config file being used.

    πŸ‘

  4. ssnover#0000

    Thank you! I’m still trying to to get up and running so I’ll stick with poky for now, but going to a custom distro isn’t looking as imposing as I thought.

    I’ve tried a bunch of things, but I’m a bit stumped when it comes to adding new bitbake recipes. I’ve successfully added some bbappend files and seen the changes reflected in the final image, and I added an image recipe that seems to be discovered by `bitbake` as a valid target, but when I’ve tried to add a small recipe which builds an app to install into that image, I can’t get `bitbake` to discover it.

    So if I comment line 6 in here (https://github.com/ssnover/megabit-yocto/blob/3429c3edfb5fdc7dc9ae8681585e8b0f84c6ae85/meta-megabit/recipes-core/images/megabit-image-base.bb), I can run `bitbake megabit-image-base` no problem. But I’ve added an app with this recipe here (https://github.com/ssnover/megabit-yocto/blob/3429c3edfb5fdc7dc9ae8681585e8b0f84c6ae85/meta-megabit/recipe-apps/blink/blink_0.1.0.bb) and if I run `bitbake blink_0.1.0` I just get an error stating that nothing provides that target. I also tried `bitbake blink` in case the convention is to discard version postfix. I also tried a clean build directory just to see if it was a caching issue, but no luck.

  5. ming_58391#0000

    You have a type in your directory name
    /meta-megabit/recipe-apps/blink/blink_0.1.0.bb
    vs
    /meta-megabit/**recipes-apps**/blink/blink_0.1.0.bb

  6. ming_58391#0000

    `recipes` is plural

  7. ming_58391#0000

    The logic is that a diretcory may contain multiple recipe files

  8. ssnover#0000

    Oh wow, there needs to be a lint for that! Thank you πŸ˜‚

  9. ming_58391#0000

    You may be interested in the Tech Tips tomorrow as I will be talking about how I created a Yocto Project layer for a demo I am creating

  10. ssnover#0000

    That does sound informative, is that tomorrow morning (US East coast time)?

  11. ssnover#0000

    I thought I saw a list on the server somewhere, but it’s escaping me now

  12. techielew#0000

    Yes it’s tomorrow at 15:00 GMT/10:00 EST

CONTRIBUTE TO THIS THREAD

Browse other questions tagged 

Leaderboard

RANKED BY XP

All time
  • 1.
    Avatar
    @Nayel115
    1620 XP
  • 2.
    Avatar
    @UcGee
    650 XP
  • 3.
    Avatar
    @melta101
    600 XP
  • 4.
    Avatar
    @chitour
    600 XP
  • 5.
    Avatar
    @lifegochi
    250 XP
  • 6.
    Avatar
    @Youuce
    180 XP