From: "Leif Lindholm" <leif.lindholm@linaro.org>
To: Michael Brown <mbrown@fensystems.co.uk>
Cc: devel@edk2.groups.io, ard.biesheuvel@linaro.org, pete@akeo.ie
Subject: Re: [edk2-platforms: PATCH 1/1] Platform/RPi3: Accept "ethernet" or "ethernet0" aliases in device tree
Date: Tue, 23 Jul 2019 12:17:27 +0100 [thread overview]
Message-ID: <20190723111727.GG11541@bivouac.eciton.net> (raw)
In-Reply-To: <19dd2d90-18b0-7ff2-cc21-a3d33a32d5e1@fensystems.co.uk>
On Tue, Jul 23, 2019 at 12:00:04PM +0100, Michael Brown wrote:
> > Why is this patch useful?
> > I understand the problem, but we include the .dtb from our own
> > edk2-non-osi tree. And it seems that device tree already provides an
> > alias to support both:
> > https://github.com/tianocore/edk2-non-osi/blob/master/Platform/RaspberryPi/RPi3/DeviceTree/bcm2710-rpi-3-b.dts
> >
> > Would it be more useful to warn loudly if "ethernet" isn't present?
> > (And just *replace* ethernet[0] with ethernet below.)
>
> The device tree can also be provided by the VC4 firmware, e.g. with a
> config.txt containing e.g.
>
> device_tree_address=0x10000
> device_tree_end=0x20000
> device_tree=bcm2710-rpi-3-b-plus.dtb
Ah, right.
> It is also possible to omit the explicit "device_tree=..." and have just
>
> device_tree_address=0x10000
> device_tree_end=0x20000
>
> This configuration will cause the VC4 firmware to automatically load the
> appropriate device tree file. I have tested that this allows me to boot
> from a 3B or 3B+ using a single SD card image that contains all of the .dtb
> files from
>
> https://github.com/raspberrypi/firmware/tree/master/boot
>
> These "official" raspberrypi-firmware .dtb files are built from the stock
> Linux kernel .dts files, and contain only "ethernet0".
*facepalm*
> To address your specific questions:
>
> > Why is this patch useful?
>
> It allows us to boot using the "official" .dtb files without any unexpected
> behaviour.
>
> This in turn allows us to boot with the VC4 firmware automatically selecting
> the appropriate .dtb file for the hardware. This is extremely useful when
> trying to provide a single SD card image that will work on a wide range of
> hardware.
Yeah, understood. I just have a poor understanding of the esoteric boot
architecture of the Pis.
> > Would it be more useful to warn loudly if "ethernet" isn't present?
> > (And just *replace* ethernet[0] with ethernet below.)
>
> This would also solve the problem. I would find it mildly surprising
> behaviour if I were debugging around it, since the "official" .dtb files
> have moved in the other direction (going from "ethernet" to "ethernet0"),
> but I would not expect it to break anything.
>
> Another option would be to have UpdateMacAddress() ensure that both
> "ethernet" and "ethernet0" aliases exist.
Yeah, that would probably be my preferred option.
> I am happy to work up a new version of the patch: just let me know which
> option you prefer.
As mentioned.
And thank you for the explanation.
Best Regards,
Leif
next prev parent reply other threads:[~2019-07-23 11:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-19 17:29 [edk2-platforms: PATCH 0/1] Handle RPi device trees using "ethernet0" Michael Brown
2019-07-19 17:29 ` [edk2-platforms: PATCH 1/1] Platform/RPi3: Accept "ethernet" or "ethernet0" aliases in device tree Michael Brown
2019-07-23 10:34 ` Leif Lindholm
2019-07-23 11:00 ` Michael Brown
2019-07-23 11:17 ` Leif Lindholm [this message]
2019-07-24 14:31 ` [edk2-platforms: PATCHv2 0/1] Platform/RPi3: Provide "ethernet[0]" " Michael Brown
2019-07-24 14:31 ` [edk2-platforms: PATCHv2 1/1] " Michael Brown
2019-07-24 18:53 ` Leif Lindholm
2019-07-24 20:53 ` [edk2-devel] " Michael Brown
2019-07-24 21:43 ` Leif Lindholm
2019-07-25 10:27 ` [edk2-platforms: PATCH 0/1] Report device tree modification errors using Print() Michael Brown
2019-07-25 10:27 ` [edk2-platforms: PATCH 1/1] Platform/RPi3: " Michael Brown
2019-08-06 17:07 ` Leif Lindholm
2019-08-08 23:16 ` [edk2-platforms: PATCH v2 0/1] Platform/RPi3: Report device tree Michael Brown
2019-08-09 10:07 ` Leif Lindholm
2019-08-08 23:16 ` [edk2-platforms: PATCH v2 1/1] Platform/RPi3: Report device tree modification errors using Print() Michael Brown
2019-07-25 12:51 ` [edk2-devel] [edk2-platforms: PATCHv2 1/1] Platform/RPi3: Provide "ethernet[0]" aliases in device tree Leif Lindholm
2019-07-23 11:19 ` [edk2-platforms: PATCH 1/1] Platform/RPi3: Accept "ethernet" or "ethernet0" " Pete Batard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190723111727.GG11541@bivouac.eciton.net \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox