I am using Raspberry Pi 3 Model B and used Yocto project to build disk image including Mender layer. Then used Rasperry Pi Imager to flash microSD card along with Wifi SSID, password info and also enabled SSH.
After that, I disconnected the SD card, inserted it into Raspberry Pi and boot it. It booted up very fast, although there is no boot error, I also couldn’t see its IP address which is required by SSH and connect to hosted Mender. Is it normal in this case? Also how to get IP address? Thank you.
Hi @cin200618,
If you built with Yocto, then actually the IP+SSH process is not required. You can set the MENDER_SERVER_URL
and MENDER_TENANT_TOKEN
variables in your local.conf
, then the device will automatically appear as pending in your hosted Mender account. (see also Variables | Mender documentation).
For obtaining the ip address from a running device, you can use
ip a
on the command line. This will list connectivity details, including the IP address(es). On the Raspberry Pi, the eth0
section should be the one to check.
Alternatively, you might be able to check the DHCP server status on your WiFi router.
Greetz,
Josef
Hi Josef,
Thank you for the reply! I tried it out by adding sever url and token in the local.conf. No device showed up in my hosted mender account.
I hooked up the Raspberry Pi box to a monitor. The bootup was so fast, like within 2 seconds and then the screen just went black. I took a video and played back using slow motion speed. There was no error. The last screen snapshot is in below. But the Raspberry Pi appeared to shut down right after that. Why it shuts down so fast?
Thank you,
Cindy
Hi Josef and Mender Hub,
Any idea of what happened here? And how to get Yocto Linux bootup and IP address work properly?
Thank you,
Cindy
Hi @cin200618,
Hard to guess, really. The times I saw Raspis shut down so fast were badly usually one of
- badly flashed or broken SD cards
- insufficient power supplies
Ah, and re-reading it. Sorry!
The Raspberry Pi Imager is known to break images that are not Raspberry Pi OS. So either use it without any add-on modifications while writing, or an alternative tool such as Etcher or plain old dd.
Sorry this didn’t strike me earlier.
The Yocto build can be instructed add a root account without password by having IMAGE_FEATURES += "debug-tweaks"
in local.conf
. Plus, the UART should also have a login console exposed by default.
WiFi and user management are a bit of a different story on Yocto than on debianoids. So lets get one thing working (the board booting to shell), and then we can take on the next one.
Greetz,
Josef