# MENDER\_PARTITION\_ALIGNMENT, Raspberry Pi and historical reasons

**URL:** <https://hub.mender.io/t/mender-partition-alignment-raspberry-pi-and-historical-reasons/2293>\
**Category:** General Discussions\
**Created:** [August 7, 2020, 9:54am UTC](https://hub.mender.io/t/mender-partition-alignment-raspberry-pi-and-historical-reasons/2293 "2020-08-07T09:54:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WeZzyNL](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/wezzynl/32/46_2.png) [@WeZzyNL](https://hub.mender.io/u/WeZzyNL)\
**Post date:** [August 7, 2020, 9:54am UTC](https://hub.mender.io/t/mender-partition-alignment-raspberry-pi-and-historical-reasons/2293/1 "2020-08-07T09:54:12Z")

</div>

Hi,

Moving a small discussion with @mirzak from [https://github.com/mendersoftware/meta-mender/pull/975#issuecomment-670377457](https://github.com/mendersoftware/meta-mender/pull/975#issuecomment-670377457) to here as I feel it makes more sense over here. It’s about Yocto not building for Raspberry Pi 3B+ when I set `MENDER_PARTITION_ALIGNMENT = "4194304"` - the build process will complain that `CONFIG_ENV_OFFSET` is incorrect. To fix this I need to patch the patch 🙂 so that the below values are used:

```auto
CONFIG_ENV_OFFSET=0x400000
CONFIG_ENV_OFFSET_REDUND=0x800000

```

Though I understand from @mirzak , one should not set `MENDER_PARTITION_ALIGNMENT` anymore for the `dunfell` branch and without that set, it should build. While that is indeed correct, I cannot upgrade with the generated mender artifact, it will fail because the partitions don’t align.

So, seeing that in the past `MENDER_PARTITION_ALIGNMENT` needed to be set, and I actually did set it back then, doesn’t this mean I need to keep it set now? And if so, how would I go about telling Mender to use different values for `CONFIG_ENV_OFFSET` and `CONFIG_ENV_OFFSET_REDUND`?

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [August 7, 2020, 11:55am UTC](https://hub.mender.io/t/mender-partition-alignment-raspberry-pi-and-historical-reasons/2293/2 "2020-08-07T11:55:11Z")

</div>

Hi @WeZzyNL,

Thanks for moving the discussion here.

> I cannot upgrade with the generated mender artifact, it will fail because the partitions don’t align.

Alignment should not matter in Mender Artifacts. Can you share an error log?

> And if so, how would I go about telling Mender to use different values for `CONFIG_ENV_OFFSET` and `CONFIG_ENV_OFFSET_REDUND` ?

Due to changes in U-Boot, we could not longer provide these automatically and one needs to update the patch to align with values in `MENDER_PARTITION_ALIGNMENT`, if you change this from the defaults.

---

<div class="post-metadata">

**Author:** ![WeZzyNL](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/wezzynl/32/46_2.png) [@WeZzyNL](https://hub.mender.io/u/WeZzyNL)\
**Post date:** [August 7, 2020, 1:19pm UTC](https://hub.mender.io/t/mender-partition-alignment-raspberry-pi-and-historical-reasons/2293/3 "2020-08-07T13:19:09Z")

</div>

Hmm. I’ve removed `MENDER_PARTITION_ALIGNMENT` and removed my patch that changed the `CONFIG_ENV_OFFSET` and `CONFIG_ENV_OFFSET_REDUND`. Tried a fresh build and roll-out on multiple test machines here locally and it seems to work now.

I guess I had an incorrect configuration or was working with a different artifact than I thought I was working with… This was at the end of the day yesterday, so who knows.

Thanks for the quick answers and I think it’s safe to assume all is well and I just garbled things up.

`dunfell`, here we go!

Wes
