Re: [edk2] [PATCH v5 edk2-platforms 22/22] Platform/RaspberryPi/RPi3: Add platform readme's
On Tue, Feb 05, 2019 at 04:25:37PM +, Pete Batard wrote: > Documentation is split between general plaform data and OS testing > and installation details. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Pete Batard Reviewed-by: Leif Lindholm > --- > Platform/RaspberryPi/RPi3/Readme.md | 167 > Platform/RaspberryPi/RPi3/Systems.md | 65 > Readme.md| 3 + > 3 files changed, 235 insertions(+) > > diff --git a/Platform/RaspberryPi/RPi3/Readme.md > b/Platform/RaspberryPi/RPi3/Readme.md > new file mode 100644 > index ..7434233df0fb > --- /dev/null > +++ b/Platform/RaspberryPi/RPi3/Readme.md > @@ -0,0 +1,167 @@ > +Raspberry Pi Platform > += > + > +# Summary > + > +This is a port of 64-bit Tiano Core UEFI firmware for the Raspberry Pi 3/3B+ > platforms, > +based on [Ard Bisheuvel's > 64-bit](http://www.workofard.com/2017/02/uefi-on-the-pi/) > +and [Microsoft's > 32-bit](https://github.com/ms-iot/RPi-UEFI/tree/ms-iot/Pi3BoardPkg) > +implementations, as maintained by [Andrei > Warkentin](https://github.com/andreiw/RaspberryPiPkg). > + > +This is meant as a generally useful 64-bit ATF + UEFI implementation for the > Raspberry > +Pi 3/3B+ which should be good enough for most kind of UEFI development, as > well as for > +running consummer Operating Systems in such as Linux or Windows. > + > +Raspberry Pi is a trademark of the [Raspberry Pi > Foundation](http://www.raspberrypi.org). > + > +# Status > + > +This firmware, that has been validated to compile against the current > +[edk2](https://github.com/tianocore/edk2)/[edk2-platforms](https://github.com/tianocore/edk2-platforms), > +should be able to boot Linux (SUSE, Ubuntu), NetBSD, FreeBSD as well as > Windows 10 ARM64 > +(full GUI version). > + > +It also provides support for ATF ([Arm Trusted > Platform](https://github.com/ARM-software/arm-trusted-firmware)). > + > +HDMI and the mini-UART serial port can be used for output devices, with > mirrored output. > +USB keyboards and the mini-UART serial port can be used as input. > + > +On a freshly built firmware, the default is to boot the UEFI shell. > +To change the default boot order (for instance to boot uSD media by default) > you > +will need to edit the preferences in _Boot Maintenance Manager_. > + > +For additional information about the tested systems and how to set them up, > +please see [Systems.md](./Systems.md). > + > +# Building > + > +Build instructions from the top level edk2-platforms Readme.md apply. > + > +# Booting the firmware > + > +1. Format a uSD card as FAT32 > +2. Copy the generated `RPI_EFI.fd` firmware onto the partition > +3. Download and copy the following files from > https://github.com/raspberrypi/firmware/tree/master/boot > + - `bootcode.bin` > + - `fixup.dat` > + - `start.elf` > +4. Create a `config.txt` with the following content: > + ``` > + arm_control=0x200 > + enable_uart=1 > + armstub=RPI_EFI.fd > + disable_commandline_tags=1 > + ``` > +5. Insert the uSD card and power up the Pi. > + > +Note that if you have a model 3+ or a model 3 where you enabled USB boot > through OTP > +(see > [here](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md)) > +you may also be able to boot from a FAT32 USB driver rather than uSD. > + > +# Notes > + > +## ARM Trusted Firmware (ATF) > + > +The ATF binaries being used were compiled from the latest ATF source. > +No aleration to the official source have been applied. > + > +For more details on the ATF compilation, see the > [Readme](./TrustedFirmware/Readme.md) > +in the `TrustedFirmware/` directory. > + > +## Custom Device Tree > + > +The default Device Tree included in the firmware is the one for a Raspberry > Pi 3 Model B (not B+). > +If you want to use a different Device Tree, to boot a Pi 3 Model B+ for > instance (for which a > +DTB is also provided under `DeviceTree/`), you should copy the relevant > `.dtb` into the root of > +the SD or USB, and then edit your `config.txt` so that it looks like: > + > +``` > +(...) > +disable_commandline_tags=2 > +device_tree_address=0x1 > +device_tree_end=0x2 > +device_tree=bcm2710-rpi-3-b-plus.dtb > +``` > + > +Note: the address range **must** be `[0x1:0x2]`. > +`dtoverlay` and `dtparam` parameters are also supported **when** providing a > Device Tree`. > + > +## Custom `bootargs` > + > +This firmware will honor the command line passed by the GPU via > `cmdline.txt`. > + > +Note, that the ultimate contents of `/chosen/bootargs` are a combination of > several pieces: > +- Original `/chosen/bootargs` if using the internal DTB. Seems to be > completely discarded by GPU when booting with a custom device tree. > +- GPU-passed hardware configuration. This one is always present. > +- Additional boot options passed via `cmdline.txt`. > + > +# Limitations > + > +## HDMI > + > +The UEFI HDMI video support relies o
[edk2] [PATCH v5 edk2-platforms 22/22] Platform/RaspberryPi/RPi3: Add platform readme's
Documentation is split between general plaform data and OS testing and installation details. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pete Batard --- Platform/RaspberryPi/RPi3/Readme.md | 167 Platform/RaspberryPi/RPi3/Systems.md | 65 Readme.md| 3 + 3 files changed, 235 insertions(+) diff --git a/Platform/RaspberryPi/RPi3/Readme.md b/Platform/RaspberryPi/RPi3/Readme.md new file mode 100644 index ..7434233df0fb --- /dev/null +++ b/Platform/RaspberryPi/RPi3/Readme.md @@ -0,0 +1,167 @@ +Raspberry Pi Platform += + +# Summary + +This is a port of 64-bit Tiano Core UEFI firmware for the Raspberry Pi 3/3B+ platforms, +based on [Ard Bisheuvel's 64-bit](http://www.workofard.com/2017/02/uefi-on-the-pi/) +and [Microsoft's 32-bit](https://github.com/ms-iot/RPi-UEFI/tree/ms-iot/Pi3BoardPkg) +implementations, as maintained by [Andrei Warkentin](https://github.com/andreiw/RaspberryPiPkg). + +This is meant as a generally useful 64-bit ATF + UEFI implementation for the Raspberry +Pi 3/3B+ which should be good enough for most kind of UEFI development, as well as for +running consummer Operating Systems in such as Linux or Windows. + +Raspberry Pi is a trademark of the [Raspberry Pi Foundation](http://www.raspberrypi.org). + +# Status + +This firmware, that has been validated to compile against the current +[edk2](https://github.com/tianocore/edk2)/[edk2-platforms](https://github.com/tianocore/edk2-platforms), +should be able to boot Linux (SUSE, Ubuntu), NetBSD, FreeBSD as well as Windows 10 ARM64 +(full GUI version). + +It also provides support for ATF ([Arm Trusted Platform](https://github.com/ARM-software/arm-trusted-firmware)). + +HDMI and the mini-UART serial port can be used for output devices, with mirrored output. +USB keyboards and the mini-UART serial port can be used as input. + +On a freshly built firmware, the default is to boot the UEFI shell. +To change the default boot order (for instance to boot uSD media by default) you +will need to edit the preferences in _Boot Maintenance Manager_. + +For additional information about the tested systems and how to set them up, +please see [Systems.md](./Systems.md). + +# Building + +Build instructions from the top level edk2-platforms Readme.md apply. + +# Booting the firmware + +1. Format a uSD card as FAT32 +2. Copy the generated `RPI_EFI.fd` firmware onto the partition +3. Download and copy the following files from https://github.com/raspberrypi/firmware/tree/master/boot + - `bootcode.bin` + - `fixup.dat` + - `start.elf` +4. Create a `config.txt` with the following content: + ``` + arm_control=0x200 + enable_uart=1 + armstub=RPI_EFI.fd + disable_commandline_tags=1 + ``` +5. Insert the uSD card and power up the Pi. + +Note that if you have a model 3+ or a model 3 where you enabled USB boot through OTP +(see [here](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md)) +you may also be able to boot from a FAT32 USB driver rather than uSD. + +# Notes + +## ARM Trusted Firmware (ATF) + +The ATF binaries being used were compiled from the latest ATF source. +No aleration to the official source have been applied. + +For more details on the ATF compilation, see the [Readme](./TrustedFirmware/Readme.md) +in the `TrustedFirmware/` directory. + +## Custom Device Tree + +The default Device Tree included in the firmware is the one for a Raspberry Pi 3 Model B (not B+). +If you want to use a different Device Tree, to boot a Pi 3 Model B+ for instance (for which a +DTB is also provided under `DeviceTree/`), you should copy the relevant `.dtb` into the root of +the SD or USB, and then edit your `config.txt` so that it looks like: + +``` +(...) +disable_commandline_tags=2 +device_tree_address=0x1 +device_tree_end=0x2 +device_tree=bcm2710-rpi-3-b-plus.dtb +``` + +Note: the address range **must** be `[0x1:0x2]`. +`dtoverlay` and `dtparam` parameters are also supported **when** providing a Device Tree`. + +## Custom `bootargs` + +This firmware will honor the command line passed by the GPU via `cmdline.txt`. + +Note, that the ultimate contents of `/chosen/bootargs` are a combination of several pieces: +- Original `/chosen/bootargs` if using the internal DTB. Seems to be completely discarded by GPU when booting with a custom device tree. +- GPU-passed hardware configuration. This one is always present. +- Additional boot options passed via `cmdline.txt`. + +# Limitations + +## HDMI + +The UEFI HDMI video support relies on the VC (that's the GPU) +firmware to correctly detect and configure the attached screen. +Some screens are slow, and this detection may not occur fast +enough. Finally, you may wish to be able to boot your Pi +headless, yet be able to attach a display to it later for +debugging. + +To accommodate these issues, the following extra lines +are recommended for your `config.tx