# Issues with Raspberry Pi when updating rocko -\> thud

**URL:** https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712
**Category:** General Discussions
**Created:** [June 14, 2019, 11:29am UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712 "2019-06-14T11:29:20Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)
#### Post date: [June 14, 2019, 11:29am UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/1 "2019-06-14T11:29:20Z")

</div>

I have a device here now, so can do more checks.

I compared both boot partition contents. All seem ok.  
See attachment for a screenshot of what happens on the device that doesn’t boot anymore.

 ![20190614_132133](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/6ddcd3357782c8d4f79489053ff72bf60f19428d.jpeg)

---

<div class="post-metadata">

### Author: ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)
#### Post date: [June 14, 2019, 11:41am UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/2 "2019-06-14T11:41:34Z")

</div>

Cannot find valid devicetree. This is a problem. Do you have in /boot/ some dtb files?

---

<div class="post-metadata">

### Author: ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)
#### Post date: [June 14, 2019, 11:53am UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/3 "2019-06-14T11:53:48Z")

</div>

I compared the contents of the first partition. ALl were exactly the same.  
Are they stored in a subfolder?

---

<div class="post-metadata">

### Author: ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)
#### Post date: [June 14, 2019, 12:16pm UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/4 "2019-06-14T12:16:29Z")

</div>

It cannto find valid fdt\_header. I guess it’s similar problem which we face on rpi0w. Can you try in u-boot console run `setenv fdt_addr_r ''` and reboot board if it help? Thanks.

---

<div class="post-metadata">

### Author: ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)
#### Post date: [June 14, 2019, 1:53pm UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/5 "2019-06-14T13:53:15Z")

</div>

No change.

---

<div class="post-metadata">

### Author: ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)
#### Post date: [June 14, 2019, 1:55pm UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/6 "2019-06-14T13:55:27Z")

</div>

Sorry you need to run also `saveenv` after changing variable otherwise variable won’t be stored.

---

<div class="post-metadata">

### Author: ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)
#### Post date: [June 14, 2019, 1:56pm UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/7 "2019-06-14T13:56:51Z")

</div>

no diff either.

---

<div class="post-metadata">

### Author: ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)
#### Post date: [June 14, 2019, 1:58pm UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/8 "2019-06-14T13:58:32Z")

</div>

Can you please post output of :

```auto
pri $fdt_addr_r

md.l $fdt_addr_r

```

---

<div class="post-metadata">

### Author: ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)
#### Post date: [June 14, 2019, 2:13pm UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/9 "2019-06-14T14:13:16Z")

</div>

I sent you a private message.

---

<div class="post-metadata">

### Author: ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)
#### Post date: [June 16, 2019, 12:07pm UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/10 "2019-06-16T12:07:27Z")

</div>

A bit more info. I moved from a rocko build to a thud build.  
Maybe that triggers some suggestions?

I’m pretty much dead in the water with my project right now…

---

<div class="post-metadata">

### Author: ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)
#### Post date: [June 17, 2019, 6:16am UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/11 "2019-06-17T06:16:33Z")

</div>

OK fine. Did you please try what I’ve suggested above? I think issue can be that if you update from rocko to thud there could be update on rpi firmware (if you are doing only mende update and not whole sdimg) it could happen that fdt\_addr in u-boot detected by firmware (it’s written first time to uboot env)is changed and then board cannot boot. My test should clear it so new updated image should set it to proper value. We have seen this on rpi0w raspbian that on first boot it increase data partition to then end of flash and then after reboot we have same symptoms like you have. Maybe can you try to add [this](https://github.com/mendersoftware/uboot-mender/commit/884893e54a05a501c6e7ab54fc920355acef7b4f) commit to your thud yocto to see if it helps. Or if you can share old and new image somewhere I can try to play with it here. Thanks.

---

<div class="post-metadata">

### Author: ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)
#### Post date: [June 17, 2019, 6:29am UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/12 "2019-06-17T06:29:38Z")

</div>

I did that command, but nothing changed.

---

<div class="post-metadata">

### Author: ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)
#### Post date: [June 17, 2019, 6:45am UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/13 "2019-06-17T06:45:52Z")

</div>

OK can you please try and post me log when command is executed:

```auto
setenv fdt_addr ''
saveenv
reset

```

---

<div class="post-metadata">

### Author: ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)
#### Post date: [June 13, 2019, 7:39am UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/14 "2019-06-13T07:39:59Z")

</div>

I’m using mender to update yocto-based images on Raspberry Pi3B’s.  
This works great, except for the firmware files.  
I’m using the workaround script, but this still results in not-booting pi’s.  
The pi’s are normally powered, no power outages are happening etc.

Am I missing something?

---

<div class="post-metadata">

### Author: ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)
#### Post date: [June 13, 2019, 4:53pm UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/15 "2019-06-13T16:53:13Z")

</div>

I’m not following @mterwoord what workaround script are you referring to? What version of Yocto are you running? What is the symptom when your boards do not boot?

---

<div class="post-metadata">

### Author: ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)
#### Post date: [June 13, 2019, 5:08pm UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/16 "2019-06-13T17:08:46Z")

</div>

I mean the script at: [https://github.com/mirzak/meta-mender/commit/9d6211d585ecd7c73f11a10d503b9005516fc755](https://github.com/mirzak/meta-mender/commit/9d6211d585ecd7c73f11a10d503b9005516fc755)

I have devices in the field, I’m updating to a new kernel etc, and then those don’t come online.

---

<div class="post-metadata">

### Author: ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)
#### Post date: [June 13, 2019, 6:44pm UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/17 "2019-06-13T18:44:09Z")

</div>

It’s difficult to say what the issue is. Do you have any means to have someone with physical access to the board provide a serial console log or at least a description of what happens on the HDMI?

---

<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: [June 17, 2019, 6:57am UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/19 "2019-06-17T06:57:13Z")

</div>

I moved these posts to a separate topic in [https://hub.mender.io/c/general-discussions](https://hub.mender.io/c/general-discussions)

---

<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: [June 17, 2019, 7:01am UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/20 "2019-06-17T07:01:49Z")

</div>

`FDT_ERR_BADMAGIC` means that it can not find the devicetree binary file. It has been observed that the boot firmware (which initially loads the devicetree binary) can change address of where it loads it.

It does provide a variable to U-boot where it stored it, but this variable is not always read and depends on if `fdt_addr` is set and I believe that this is what you are experiencing as well.

You could try this patch,

> <https://github.com/mendersoftware/uboot-mender/commit/884893e54a05a501c6e7ab54fc920355acef7b4f>

Some history of the change can be found here,

> <https://github.com/mendersoftware/uboot-mender/pull/3>

---

<div class="post-metadata">

### Author: ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)
#### Post date: [June 17, 2019, 4:08pm UTC](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/21 "2019-06-17T16:08:23Z")

</div>

Awesome. This seems to work!

Edit: By manually removing the fdt\_addr value.  
Next step is integrated that comit and see if it works.

[Next page](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712.md?page=2)
