# SD Card + Mender Yocto Image Nitrogen8mm

**URL:** <https://hub.mender.io/t/sd-card-mender-yocto-image-nitrogen8mm/6483>\
**Category:** Yocto Project\
**Created:** [January 16, 2024, 3:15pm UTC](https://hub.mender.io/t/sd-card-mender-yocto-image-nitrogen8mm/6483 "2024-01-16T15:15:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mld](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mld](https://hub.mender.io/u/mld)\
**Post date:** [January 16, 2024, 3:15pm UTC](https://hub.mender.io/t/sd-card-mender-yocto-image-nitrogen8mm/6483/1 "2024-01-16T15:15:39Z")

</div>

I am working with a nitrogen8mm and have a yocto image that successfully flashes via SD card. I am looking to add mender support for this image via the mender layer. Previously, I had used the kirkstone release docs here to flash the produced image via Mender, but this image assumes flashing via eMMC, not SD card. [Mender Kirkstone Release for i.MX8 platforms - Boundary Devices](https://boundarydevices.com/mender-kirkstone-release-for-i-mx8-platforms/)

I was told that the mender layer would need to be adjusted to be able to support an image that flashes via the SD card, as the default flashes via eMMC. How would I adjust the mender layer in my yocto image to allow it to flash via SD card and also be able to be flashed with mender?

---

<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:** [January 16, 2024, 4:56pm UTC](https://hub.mender.io/t/sd-card-mender-yocto-image-nitrogen8mm/6483/2 "2024-01-16T16:56:10Z")

</div>

Hi @mld,

Thanks for reaching out! Adjusting to a different storage device might be as simple as setting `MENDER_STORAGE_DEVICE` accordingly, as it is done for the mp-variant here for example: [meta-mender-community/kas/nitrogen8mp.yml at kirkstone · mendersoftware/meta-mender-community · GitHub](https://github.com/mendersoftware/meta-mender-community/blob/kirkstone/kas/nitrogen8mp.yml#L13)

Maybe @texierp also has experience with that.

Greets,  
Josef

---

<div class="post-metadata">

**Author:** ![mld](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mld](https://hub.mender.io/u/mld)\
**Post date:** [January 16, 2024, 5:26pm UTC](https://hub.mender.io/t/sd-card-mender-yocto-image-nitrogen8mm/6483/3 "2024-01-16T17:26:55Z")

</div>

Hi @TheYoctoJester ,

MENDER\_STORAGE\_DEVICE looks promising. I was assuming that if MENDER\_STORAGE\_DEVICE=/dev/sda or something, there would need to be some repartitioning with some other config as well. I see there is a “mender-convert” option which looks like it could be helpful as well, but there are only a few different platforms officially supported with this. (not arm64 like I am looking for)

> **[GitHub - mendersoftware/mender-convert: An easy way to integrate the Mender...](https://github.com/mendersoftware/mender-convert)**
>
> An easy way to integrate the Mender client into an existing image - GitHub - mendersoftware/mender-convert: An easy way to integrate the Mender client into an existing image

@texierp if you have any more information that you’d be able to share too, that’d be greatly appreciated!

Thanks

---

<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:** [January 17, 2024, 8:04am UTC](https://hub.mender.io/t/sd-card-mender-yocto-image-nitrogen8mm/6483/4 "2024-01-17T08:04:45Z")

</div>

@mld

The `MENDER_STORAGE_DEVICE` variable should in practice only affect the configuration files which are shipped with the image, e.g. `/etc/mender/mender.conf` and eventually `u-boot` scripts.

If you’ve given it a try, please let us know if it works for you so others can benefit too.

Thanks,  
Josef

---

<div class="post-metadata">

**Author:** ![mld](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mld](https://hub.mender.io/u/mld)\
**Post date:** [January 29, 2024, 8:43pm UTC](https://hub.mender.io/t/sd-card-mender-yocto-image-nitrogen8mm/6483/5 "2024-01-29T20:43:53Z")

</div>

> [@TheYoctoJester](#):
>
> MENDER\_STORAGE\_DEVICE

@TheYoctoJester Sorry, got pulled away from this topic for a bit but I am back on it now. I am going to test this out here shortly. I see in the mender docs it mentions that MENDER\_UBOOT\_STORAGE\_DEVICE should hold all partitions (rootfs, boot, data), which makes me think it should stay as /dev/mmcblk1?  
[https://docs.mender.io/operating-system-updates-yocto-project/variables#mender\_storage\_device](https://docs.mender.io/operating-system-updates-yocto-project/variables#mender_storage_device)

FYI - I got a response from Boundary about this same inquiry. Their proposed solution was:

1. add MENDER\_UBOOT\_STORAGE\_DEVICE = “1” to local.conf
2. Modify whatever defconfig you are using in uboot and add CONFIG\_SYS\_MMC\_ENV\_DEV=1 to it. You will need to modify patches to do so:  
[meta-mender-community/meta-mender-nxp/recipes-bsp/u-boot/u-boot-boundary at kirkstone · mendersoftware/meta-mender-community · GitHub](https://github.com/mendersoftware/meta-mender-community/tree/kirkstone/meta-mender-nxp/recipes-bsp/u-boot/u-boot-boundary)

I attempted to change these two things in my yocto build and it broke the build with the following error:  
Failed to load ‘/boot/imx8mm-nitrogen8mm\_rev2.dtb’  
libfdt fdt\_check\_header(): FDT\_ERR\_BADMAGIC  
No FDT memory address configured. Please configure  
the FDT address via “fdt addr ” command.  
Aborting!
