[U-Boot] pull request: raspberry pi updates

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Jun 25 04:53:59 UTC 2019


On 6/25/19 5:51 AM, Jonathan Gray wrote:
> On Mon, Jun 24, 2019 at 02:11:43PM -0400, Tom Rini wrote:
>> On Wed, Jun 12, 2019 at 04:25:33PM -0400, Tom Rini wrote:
>>> On Wed, Jun 12, 2019 at 10:21:22PM +0200, Heinrich Schuchardt wrote:
>>>> On 6/12/19 10:08 PM, Tom Rini wrote:
>>>>> On Wed, Jun 12, 2019 at 10:07:31PM +0200, Heinrich Schuchardt wrote:
>>>>>> On 6/12/19 9:56 PM, Tom Rini wrote:
>>>>>>> On Wed, Jun 12, 2019 at 03:48:06PM +0100, Peter Robinson wrote:
>>>>>>>> Hi Matthias,
>>>>>>>>
>>>>>>>> Have these been out on the list for general review? I don't remember
>>>>>>>> seeing them.
>>>>>>>>
>>>>>>>> On Wed, Jun 12, 2019 at 1:57 PM Matthias Brugger <mbrugger at suse.com> wrote:
>>>>>>>>>
>>>>>>>>> Hi Tom,
>>>>>>>>>
>>>>>>>>> Please have a look on the following patches.
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Matthias
>>>>>>>>>
>>>>>>>>> ---
>>>>>>>>> The following changes since commit fc6c0e29a28f6b71dfb728b7f78e9e770f2cd218:
>>>>>>>>>
>>>>>>>>>    Prepare v2019.07-rc4 (2019-06-10 21:27:46 -0400)
>>>>>>>>>
>>>>>>>>> are available in the Git repository at:
>>>>>>>>>
>>>>>>>>>    https://github.com/mbgg/u-boot.git tags/rpi-next-2019.07
>>>>>>>>>
>>>>>>>>> for you to fetch changes up to 38e58ff2b785b45e8c8ade8e23f916a1984016c6:
>>>>>>>>>
>>>>>>>>>    ARM: bcm283x: Fix definition of MBOX_TAG_TEST_PIXEL_ORDER (2019-06-12 12:23:46
>>>>>>>>> +0200)
>>>>>>>>>
>>>>>>>>> ----------------------------------------------------------------
>>>>>>>>> - fix complation error for CONFIG_USB
>>>>>>>>> - update RPi3 DTBs to v5.1-rc6 state
>>>>>>>>> - add defconfig for RPi3 B+
>>>>>>>>
>>>>>>>> Why do we need a separate config when it's detected and works
>>>>>>>> perfectly well with the standard rpi_3 and rpi_3_32b configs?
>>>>>>>
>>>>>>> Good question.  It came from Heinrich, so Heinrich?
>>>>>>
>>>>>> If we call the bootefi command without a OS supplied device tree the
>>>>>> U-Boot device tree is passed to the operating system.
>>>>>>
>>>>>> So we need a device tree which is a complete description of the
>>>>>> respective system.
>>>>>>
>>>>>> On the Linaro boot-architecture list there has been a lengthy discussion
>>>>>> with Linaro people thinking that it is the responsibility of the
>>>>>> hardware and firmware to provide the correct device tree and not of the OS.
>>>>>
>>>>> OK, but on Pi aren't we passed, and pass along, the dtb from the
>>>>> previous stage?
>>>>>
>>>> Currently `bootefi` uses as default what it finds in $fdt_control_addr
>>>> and provides this to GRUB, Linux, or any other payload.
>>>
>>> Right, and maybe I'm mistaken, but doesn't the previous stage on Pi pass
>>> in a device tree, that U-Boot then uses?
>>
>> I haven't taken this as I haven't gotten an answer to this part.  I
>> could have sworn that the proprietary loader passed along the device
>> tree that's passed by us to the next stage.
>
> The firmware includes device trees
>
> https://github.com/raspberrypi/firmware/tree/master/boot
>
> At least OpenSUSE, OpenBSD and Fedora change the rpi defconfigs to
> better use it:
>
> https://src.fedoraproject.org/rpms/uboot-tools/blob/master/f/rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
> https://github.com/openSUSE/u-boot/commit/121d9d775c6af6ba5d1c3f198f478404a9196f84.patch
>
>>From 121d9d775c6af6ba5d1c3f198f478404a9196f84 Mon Sep 17 00:00:00 2001
> From: Alexander Graf <agraf at suse.de>
> Date: Wed, 21 Feb 2018 17:41:13 +0100
> Subject: [PATCH] rpi: Use firmware provided device tree
>
> Currently the firmware generates a device tree for us that we could
> just use to adjust ourselves. We then on boot throw that away and
> use our own built-in device tree to configure device access.
>
> This is bad for a multitude of reasons. For starters, it breaks
> overlay support in config.txt, confusing users. Much worse however
> is that we are stuck with individual U-Boot builds per board.
> The firmware can easily give us the right DT depending on the
> target board and revision though.
>
> So let's use the firmware provided device tree instead. That way
> U-Boot as well as payloads loaded by it can automatically adapt
> to variants of RPi hardware.
>
> Signed-off-by: Alexander Graf <agraf at suse.de>
> Signed-off-by: Guillaume Gardet <guillaume.gardet at free.fr>

This patch never made it into mainline U-Boot but it is still applicable.

So what is your suggestion? Drop all RPI device trees and apply this
patch? (CCing Alex)

Why does the patch not remove CONFIG_DEFAULT_DEVICE_TREE?
Why does the patch not reduce the number of config files to 2: one for
32bit and one for 64bit if everything else is given by the board
provided DTB?

Regards

Heinrich

> ---
>   configs/rpi_0_w_defconfig   | 2 +-
>   configs/rpi_2_defconfig     | 2 +-
>   configs/rpi_3_32b_defconfig | 2 +-
>   configs/rpi_3_defconfig     | 2 +-
>   configs/rpi_defconfig       | 2 +-
>   5 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig
> index 1ab35f1b253..d26010efac1 100644
> --- a/configs/rpi_0_w_defconfig
> +++ b/configs/rpi_0_w_defconfig
> @@ -14,7 +14,7 @@ CONFIG_CMD_GPIO=y
>   CONFIG_CMD_MMC=y
>   CONFIG_CMD_USB=y
>   CONFIG_CMD_FS_UUID=y
> -CONFIG_OF_EMBED=y
> +CONFIG_OF_BOARD=y
>   CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-zero-w"
>   CONFIG_ENV_FAT_INTERFACE="mmc"
>   CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
> diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
> index 53aa554cc74..2b6bbf1b4b4 100644
> --- a/configs/rpi_2_defconfig
> +++ b/configs/rpi_2_defconfig
> @@ -14,7 +14,7 @@ CONFIG_CMD_GPIO=y
>   CONFIG_CMD_MMC=y
>   CONFIG_CMD_USB=y
>   CONFIG_CMD_FS_UUID=y
> -CONFIG_OF_EMBED=y
> +CONFIG_OF_BOARD=y
>   CONFIG_DEFAULT_DEVICE_TREE="bcm2836-rpi-2-b"
>   CONFIG_ENV_FAT_INTERFACE="mmc"
>   CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
> diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
> index c33ea58438a..c3fe878aa36 100644
> --- a/configs/rpi_3_32b_defconfig
> +++ b/configs/rpi_3_32b_defconfig
> @@ -15,7 +15,7 @@ CONFIG_CMD_GPIO=y
>   CONFIG_CMD_MMC=y
>   CONFIG_CMD_USB=y
>   CONFIG_CMD_FS_UUID=y
> -CONFIG_OF_EMBED=y
> +CONFIG_OF_BOARD=y
>   CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"
>   CONFIG_ENV_FAT_INTERFACE="mmc"
>   CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
> diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
> index 98573bb89a4..6895228bdb5 100644
> --- a/configs/rpi_3_defconfig
> +++ b/configs/rpi_3_defconfig
> @@ -15,7 +15,7 @@ CONFIG_CMD_GPIO=y
>   CONFIG_CMD_MMC=y
>   CONFIG_CMD_USB=y
>   CONFIG_CMD_FS_UUID=y
> -CONFIG_OF_EMBED=y
> +CONFIG_OF_BOARD=y
>   CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"
>   CONFIG_ENV_FAT_INTERFACE="mmc"
>   CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
> diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
> index bd15c98697b..477a1bf789f 100644
> --- a/configs/rpi_defconfig
> +++ b/configs/rpi_defconfig
> @@ -14,7 +14,7 @@ CONFIG_CMD_GPIO=y
>   CONFIG_CMD_MMC=y
>   CONFIG_CMD_USB=y
>   CONFIG_CMD_FS_UUID=y
> -CONFIG_OF_EMBED=y
> +CONFIG_OF_BOARD=y
>   CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-b"
>   CONFIG_ENV_FAT_INTERFACE="mmc"
>   CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
>



More information about the U-Boot mailing list