forked from pftf/RPi4
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Matthias Riegler <[email protected]>
- Loading branch information
Showing
8 changed files
with
80 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ Readme.md | |
Makefile | ||
.github/ | ||
.git/ | ||
.git* | ||
dist | ||
dist.zip | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Build and Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
|
||
jobs: | ||
release: | ||
permissions: | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Build | ||
run: make dist | ||
- uses: sigstore/[email protected] | ||
with: | ||
inputs: dist.zip | ||
- name: Upload binaries to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: dist.zip* | ||
file_glob: true | ||
tag: ${{ github.ref }} | ||
overwrite: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4/RPi4.dsc | ||
index e04c764..63b400c 100644 | ||
--- a/Platform/RaspberryPi/RPi4/RPi4.dsc | ||
+++ b/Platform/RaspberryPi/RPi4/RPi4.dsc | ||
@@ -511,8 +511,8 @@ | ||
# | ||
# Supporting > 3GB of memory. | ||
# | ||
- gRaspberryPiTokenSpaceGuid.PcdRamMoreThan3GB|L"RamMoreThan3GB"|gConfigDxeFormSetGuid|0x0|0 | ||
- gRaspberryPiTokenSpaceGuid.PcdRamLimitTo3GB|L"RamLimitTo3GB"|gConfigDxeFormSetGuid|0x0|1 | ||
+ gRaspberryPiTokenSpaceGuid.PcdRamMoreThan3GB|L"RamMoreThan3GB"|gConfigDxeFormSetGuid|0x0|1 | ||
+ gRaspberryPiTokenSpaceGuid.PcdRamLimitTo3GB|L"RamLimitTo3GB"|gConfigDxeFormSetGuid|0x0|0 | ||
|
||
# | ||
# Device Tree and ACPI selection. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4/RPi4.dsc | ||
index e04c764..6b64c7a 100644 | ||
--- a/Platform/RaspberryPi/RPi4/RPi4.dsc | ||
+++ b/Platform/RaspberryPi/RPi4/RPi4.dsc | ||
@@ -521,7 +521,7 @@ | ||
# 1 - SYSTEM_TABLE_MODE_BOTH | ||
# 2 - SYSTEM_TABLE_MODE_DT | ||
# | ||
- gRaspberryPiTokenSpaceGuid.PcdSystemTableMode|L"SystemTableMode"|gConfigDxeFormSetGuid|0x0|0 | ||
+ gRaspberryPiTokenSpaceGuid.PcdSystemTableMode|L"SystemTableMode"|gConfigDxeFormSetGuid|0x0|2 | ||
|
||
# | ||
# Enable a fan in the ACPI thermal zone on GPIO pin # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,20 @@ | ||
Raspberry Pi 4 UEFI Firmware Images | ||
=================================== | ||
# ComputeBlade/CM4 optimized UEFI Firmware Images | ||
> [!CAUTION] | ||
> ** THE CONFIGURATION IS PROBABLY NOT SANE FOR ALL USERS ** | ||
[![Build status](https://img.shields.io/github/actions/workflow/status/pftf/RPi4/linux_edk2.yml?style=flat-square)](https://github.com/pftf/RPi4/actions) | ||
[![Github stats](https://img.shields.io/github/downloads/pftf/RPi4/total.svg?style=flat-square)](https://github.com/pftf/RPi4/releases) | ||
[![Release](https://img.shields.io/github/release-pre/pftf/RPi4?style=flat-square)](https://github.com/pftf/RPi4/releases) | ||
This is a fork of the amazing [pftf/RPi4](https://github.com/pftf/RPi4) project, which brings a UEFI images for the RaspberryPi 4 Model B. | ||
|
||
# Summary | ||
# Adaptations compared to the pftf/RPi4 proejct | ||
|
||
This repository contains installable builds of the official | ||
[EDK2 Raspberry Pi 4 UEFI firmware](https://github.com/tianocore/edk2-platforms/tree/master/Platform/RaspberryPi/RPi4). | ||
## Ease of use improvements | ||
- Allow easy local builds using `make dist` | ||
|
||
# Initial Notice | ||
## Firmware specific configuration | ||
- Configure features for the [ComputeBlade](http://computeblade.com) | ||
- **Disable SD Card** (avoids modifying the UEFI image from the operating system) | ||
- Additional device-tree overlays | ||
|
||
__PLEASE READ THE FOLLOWING:__ | ||
🔻🔻🔻🔻🔻🔻🔻🔻🔻 | ||
|
||
* Ethernet networking support in Linux requires a recent enough kernel (version 5.7 or | ||
later) | ||
|
||
* SD or wireless support in Linux also requires a recent enough kernel (version 5.12 or | ||
later). | ||
Still, your mileage may vary as to whether these peripherals will actually be usable. | ||
|
||
* Many drivers (GPIO, VPU, etc) are still likely to be missing from your OS, and will | ||
have to be provided by a third party. Please do not ask for them here, as they fall | ||
outside of the scope of this project. | ||
|
||
* A 3 GB RAM limit is enforced __by default__, even if you are using a Raspberry Pi 4 | ||
model that has 4 GB or 8 GB of RAM, on account that the OS **must** patch DMA access, | ||
to work around a hardware bug that is present in the Broadcom SoC. | ||
For Linux this usually translates to using a recent kernel (version 5.8 or later) and | ||
for Windows this requires the installation of a filter driver. | ||
If you are running an OS that has been adequately patched, you can disable the 3 GB | ||
limit by going to `Device Manager` → `Raspberry Pi Configuration` → `Advanced Settings` | ||
in the UEFI settings. | ||
|
||
* This firmware is built from the | ||
[official EDK2 repository](https://github.com/tianocore/edk2-platforms/tree/master/Platform/RaspberryPi/RPi4), | ||
with the following extra patch applied: | ||
* `0001-MdeModulePkg-UefiBootManagerLib-Signal-ReadyToBoot-o.patch`, so that the | ||
Graphical console is set as default. | ||
|
||
🔺🔺🔺🔺🔺🔺🔺🔺🔺 | ||
|
||
# Installation | ||
|
||
* Download the latest archive from the [Releases](https://github.com/pftf/RPi4/releases) | ||
repository. | ||
|
||
* Create an SD card or a USB drive, with at least one partition (it can be a regular | ||
partition or an [ESP](https://en.wikipedia.org/wiki/EFI_system_partition)) and format | ||
it to FAT16 or FAT32. | ||
|
||
__Note:__ Booting from USB or from ESP requires a recent-enough version of the Pi | ||
EEPROM (as well as a recent version of the UEFI firmware). If you are using the latest | ||
UEFI firmware and find that booting from USB or from ESP doesn't work, please visit | ||
https://github.com/raspberrypi/rpi-eeprom/releases to update your EEPROM. | ||
|
||
* Extract all the files from the archive onto the partition you created above. | ||
Note that outside of this `Readme.md`, which you can safely remove, you should not | ||
change the names of the extracted files and directories. | ||
|
||
# Usage | ||
|
||
Insert the SD card/plug the USB drive and power up your Raspberry Pi. You should see a | ||
multicoloured screen (which indicates that the CPU-embedded bootloader is reading the | ||
data from the SD/USB partition) and then the Raspberry Pi black and white logo once the | ||
UEFI firmware is ready. | ||
|
||
At this stage, you can press <kbd>Esc</kbd> to enter the firmware setup, <kbd>F1</kbd> | ||
to launch the UEFI Shell, or, provided you also have an UEFI bootloader on the SD | ||
card or on a USB drive in `efi/boot/bootaa64.efi`, you can let the UEFI system run that | ||
(which will be the default if no action is taken). | ||
|
||
# Additional Notes | ||
|
||
The firmware provided in the zip archive is the `RELEASE` version but you can also find | ||
a `DEBUG` build of the firmware in the | ||
[GitHub CI artifacts](https://github.com/pftf/RPi4/actions). | ||
|
||
The provided firmwares should be able to auto-detect the UART being used (PL011 or mini | ||
UART) according to whether `config.txt` contains the relevant overlay or not. The default | ||
baudrate for serial I/O is `115200` and the console device to use under Linux is either | ||
`/dev/ttyAMA0` when using PL011 or `/dev/ttyS0` when using miniUART. | ||
|
||
At the moment, the published firmwares default to enforcing ACPI as well as a 3 GB RAM | ||
limit, which is done to ensure Linux boot. These settings can be changed by going to | ||
`Device Manager` → `Raspberry Pi Configuration` → `Advanced Configuration`. | ||
|
||
Please visit https://rpi4-uefi.dev/ for more information. | ||
|
||
# License | ||
|
||
The firmware (`RPI_EFI.fd`) is licensed under the current EDK2 license, which is | ||
[BSD-2-Clause-Patent](https://github.com/tianocore/edk2/blob/master/License.txt). | ||
|
||
The other files from the zip archives are licensed under the terms described in the | ||
[Raspberry Pi boot files README](https://github.com/raspberrypi/firmware/blob/master/README.md). | ||
|
||
The binary blobs in the `firmware/` directory are licensed under the Cypress wireless driver | ||
license that is found there. | ||
## EDK2/UEFI specific changes | ||
- Remove the default 3GB memory limit (**WARNING: this reduces compatibility**) | ||
- Use device tree as system table by default (Required for exposing the PCIe bus to Linux) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters