Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arenekosreal/raspberrypi4-uefi
UEFI, firmware and other packages for Raspberry Pi 4B in UEFI mode
https://github.com/arenekosreal/raspberrypi4-uefi
arch-linux archlinux linux raspberry-pi-4 raspberrypi uefi
Last synced: 3 months ago
JSON representation
UEFI, firmware and other packages for Raspberry Pi 4B in UEFI mode
- Host: GitHub
- URL: https://github.com/arenekosreal/raspberrypi4-uefi
- Owner: arenekosreal
- License: wtfpl
- Created: 2021-01-17T09:50:04.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-25T02:21:43.000Z (9 months ago)
- Last Synced: 2024-04-26T02:39:59.143Z (9 months ago)
- Topics: arch-linux, archlinux, linux, raspberry-pi-4, raspberrypi, uefi
- Language: Shell
- Homepage:
- Size: 726 KB
- Stars: 8
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Files for Booting Raspberry Pi in UEFI mode
![LICENCE.WTFPL](https://img.shields.io/github/license/zhanghua000/raspberrypi-uefi-boot?logoColor=9cf&style=flat-square "WTFPL LICENCE")
![Auto Build Arch Packages](https://github.com/zhanghua000/raspberrypi-uefi-boot/workflows/Auto%20Build%20Arch%20Packages/badge.svg)## What is this?
Files needed for booting Raspberry Pi 4 in UEFI mode.
## How to use?
`PKGBUILD` file is designed for Arch Build System (ABS), you can know more about it at [there](https://wiki.archlinux.org/index.php/Arch_Build_System). Here are the steps for using these files correctly:
- Clone this repository.
- If you are using Arch Linux or other distributions based on it such as Manjaro, you can run `bash start-build.sh` command in the root directory of this repo after installed requirements (see [start-build.sh](./start-build.sh) for more info), finally, you can find software packages generated by makepkg program at `out` folder.
If you are not using Arch Linux, you may have to understand Arch Build System and do the same when the `makepkg` program is run. You can also use docker, see [CI config](./.github/workflows/build-packages.yml) for more info. CI is running on Ubuntu x86_64 host and you can use it as a reference. Note: final artifacts in `out` folder is Arch Linux Package, if you want to create package for your distribution, you shouldn't use docker and you should turn to read `makepkg` files.
- Choose packages you need to install. Normally, packages provide `uefi-raspberrypi4` and `raspberrypi-overlays` are needed to be installed. You may have to remove `uboot-raspberrypi` in your original Arch Linux ARM Distribution.
- Install bootloader. You can choose any bootloader you like such as grub, systemd-boot, rEFInd and so on, please take a look at [#NOTE](#note) about how to make the bootloader you chose work.
- Migrate your kernel parameters. They should be in the file `/boot/cmdline.txt` or `/boot/cmdline.txt.pacsave`, please add them to your bootloader. The old file is useless after this, you can remove them as you like.## Why not upload to AUR or Arch Linux ARM repository?
~~UEFI firmware needs root privilege to build on my Arch Distribution. So I think it can't be treated as a valid PKGBUILD because a valid one needs no manual interaction.~~ This problem has been fixed.
UEFI firmware needs `gcc10` to build, which is not provided on Arch Linux ARM. This problem will only be solved when pftf upgrade `BrotilCompress` to newer version which supports GCC 12 or Arch Linux ARM provides `gcc10` package. **Update:** This can be workarounded by using clang as compiler, this is also the default behavior now.
As for other aspects, there should be no issue to upload, I have even set `buildarch` to meet Arch Linux ARM's requirements.
If you think pacman or other wrapper complains about not found these packages, please add them to `IgnorePkg` in `/etc/pacman.conf`## NOTE
1. Backup your Pi's files or at least backup boot partition. Or you may have to reinstall your original system.
2. UEFI firmware is experimental, that means maybe some features may not work properly. You can get more infomation at [there](https://github.com/pftf/RPi4)
3. Install grub with `--removeable` flag, or you have to choose boot from `/EFI/grub/grubaa64.efi` file in UEFI manually when your Pi is powering on. Also you can add a boot entry in UEFI manualy to solve this. For systemd-boot, `--no-variables` should be OK.
4. According to kernel [documentation](https://www.kernel.org/doc/Documentation/arm64/booting.rst), a compressed aarch64 kernel does not have a decompressor, so you have to choose a bootloader which can do the decompression job. GRUB works well on Raspberry Pi 4B even with the compressed vmlinuz kernel.
5. GRUB may create some useless entries in advanced menu, like booting from vmlinux without initramfs, booting from Image without initramfs and so on, you can remove them as you like, booting from vmlinuz with initramfs works well.## References
UEFI provided by [this](https://github.com/pftf/RPi4) project. Thanks to [pftf](https://github.com/pftf) and others' contribution, we can use UEFI Firmware in RaspberryPi.
Overlays provided by [raspberrypi/firmware](https://github.com/raspberrypi/firmware).