# Raspberry Pi 5 and Yocto, modifications and adding users

**URL:** <https://hub.mender.io/t/raspberry-pi-5-and-yocto-modifications-and-adding-users/7244>\
**Category:** General Discussions\
**Tags:** yocto, raspberry-pi-5\
**Created:** [October 18, 2024, 8:00am UTC](https://hub.mender.io/t/raspberry-pi-5-and-yocto-modifications-and-adding-users/7244 "2024-10-18T08:00:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidlekve](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@davidlekve](https://hub.mender.io/u/davidlekve)\
**Post date:** [October 18, 2024, 8:00am UTC](https://hub.mender.io/t/raspberry-pi-5-and-yocto-modifications-and-adding-users/7244/1 "2024-10-18T08:00:51Z")

</div>

Hi and thank you for this board integration!

I am having trouble logging in after creating an image. On my first try, I did not do any changes to conf/local.conf and have seen in other [forum replies](https://hub.mender.io/t/not-able-to-login-on-yocto-image/926) that one should be able to login with: login: root, and empty password.

I have also tried setting

```auto
INHERIT += "extrausers"
EXTRA_USERS_PARAMS = "usermod -p '\$1\$EZkCDWad\$eEMhB36cFCOeRGXvtP3t81' root;"

```

in my-raspberrypi5/build/local.conf as explained [here](https://stackoverflow.com/questions/32274163/how-to-set-root-password-on-yocto-poky-image). When doing this I am not able to start the image at all. It seems to be stuck in some boot loop as the screen turns on and of.

In addition, I was wondering if it is possible to get explained the difference between the my-raspberrypi5/build and my-raspberrypi5/poky/build directory. Especially when changes should be made to each of them.

It is worth noting that I am on ubuntu 24 and I am getting this warning after running bitbake core-image-base: WARNING: Host distribution “ubuntu-24.04” has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.

---

<div class="post-metadata">

**Author:** ![davidlekve](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@davidlekve](https://hub.mender.io/u/davidlekve)\
**Post date:** [October 18, 2024, 8:28am UTC](https://hub.mender.io/t/raspberry-pi-5-and-yocto-modifications-and-adding-users/7244/2 "2024-10-18T08:28:06Z")

</div>

I see I am not the only one with this issue:

> [@Raspberry Pi 5 setup](https://hub.mender.io/t/raspberry-pi-5-setup/7139):
>
> Hi everyone, I followed the instructions to setup a Raspberry Pi 5 with Mender as outlined here: However, my Raspberry Pi 5 boots to a terminal based login screen for which I do not have the password. Online sources indicate that the user should be “root” with a blank password but this did not work. If someone can point me in the right direction I would greatly appreciate it.

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [October 18, 2024, 10:08am UTC](https://hub.mender.io/t/raspberry-pi-5-and-yocto-modifications-and-adding-users/7244/3 "2024-10-18T10:08:56Z")

</div>

Hi @davidlekve,

Thanks for getting in touch! There’s a couple of questions in here, let me try to address them one by one:

- logging in, with empty root password.  
By default, the root login on a Yocto image is disabled, in the reasoning of “secure by default”. The easiest way to get the empty password login is adding `EXTRA_IMAGE_FEATURES += "debug-tweaks"` to your `local.conf` or image recipe. For more details, please see [11 Features — The Yocto Project ® 5.0.999 documentation](https://docs.yoctoproject.org/ref-manual/features.html?highlight=root+password#image-features). Why is this not in the default `kas` file? Same reason, we don’t want to encourage insecure defaults.
- setting the root password.  
The link which you posted seems to be quite outdated. I’d suggest to follow the documentation at [5 Classes — The Yocto Project ® 5.0.999 documentation](https://docs.yoctoproject.org/ref-manual/classes.html#extrausers)
- `my-raspberrypi5/build/conf/local.conf` versus `my-raspberrypi5/poky/...`. There is no reason to ever modify anything inside `poky`. Treat it as the upstream source it is - how would you manage and control any eventual changes upon checkout? My guess is that you have mixed up different Yocto tutorials here, one of them suggesting to to `oe-init-build-env` inside `poky`. That is definitely bad practice. If you want to have the shell initialized for building without calling `kas shell`, but using the setup which `kas` prepared, then to correctly use the `my-raspberrypi5/build` directory, do

```auto
cd my-raspberrypi5
source poky/oe-init-build-env

```

- Building on Ubuntu 24.04 is a so-called “untested path” for the `scarthgap` release of Yocto as Ubuntu 24.04 just was not around when the release was constructed. I’m at least not aware of any immediate problems, and it’s a common situation. It just tells you that there is no fully official, auto builder scale quality assurance on it.

Hope this helps,  
Josef
