Skip to content

Commit

Permalink
rpi: Fix DTB handling for Mender-based Raspberry Pi boards.
Browse files Browse the repository at this point in the history
On the Raspberry Pi platform, the start.elf firmware loads the DTB file
from the /dev/mmcblk0p1 partition.  It then updates fields such as the
MAC address and other board-specific settings.  We no longer load the
DTB file from the root filesystem partition as that would override the
updates made by the firmware.

A similar change has been made in the meta-raspberrypi layer here:
    https://www.mail-archive.com/yocto@yoctoproject.org/msg32465.html

Additional links with details:
    https://www.raspberrypi.org/forums//viewtopic.php?f=107&t=134018
    http://dius.com.au/2015/08/19/raspberry-pi-uboot/

Changelog: Title

Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
  • Loading branch information
Drew Moseley committed Sep 19, 2017
1 parent d477968 commit 264cf2e
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 27 deletions.
2 changes: 1 addition & 1 deletion meta-mender-raspberrypi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This Yocto layers contains recipes which enables support of building Mender client for Raspberry Pi boards.

**NOTE!**. To be able to support update of Linux kernel and DTB these are installed to `/boot` on rootfs. This breaks support of user configurations based on `config.txt` because the Raspberry Pi boot firmware requires that the DTB file is in the same partition as the boot firmware files (mmcblk0p1). Boot firmware normally patches the DTB file based on configurations in `config.txt`.
**NOTE!**. To be able to support update of Linux kernel and DTB, Mender requires these to be installed in the `/boot` directory for each rootfs (normally /dev/mmcblk0p2 and /dev/mmcblk0p3). On the other hand, the Raspberry Pi boot firmware requires that the DTB file is in the same partition as the boot firmware (/dev/mmcbl0p1) and the config.txt file. For now Mender will not use the DTB that is delivered with new artifacts and will continue to boot with the original DTB that was populated using the SDIMG file.

Above should not pose any problems if you do not require any changes in `config.txt` and the default configuration certainly is enough to run Mender client.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
setenv fdtfile bcm2708-rpi-b.dtb
fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
run mender_setup
mmc dev ${mender_uboot_dev}
load ${mender_uboot_root} ${kernel_addr_r} /boot/uImage
load ${mender_uboot_root} ${fdt_addr} /boot/${fdtfile}
bootm ${kernel_addr_r} - ${fdt_addr}
run mender_try_to_recover

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 264cf2e

Please sign in to comment.