bootpart-edk2-rpi: init
have not deployed this yet; untested
This commit is contained in:
13
pkgs/by-name/bootpart-edk2-rpi/config.txt
Normal file
13
pkgs/by-name/bootpart-edk2-rpi/config.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# sourced, with modifications, from <https://github.com/pftf/RPi4/blob/master/config.txt>
|
||||||
|
arm_64bit=1
|
||||||
|
arm_boost=1
|
||||||
|
enable_uart=1
|
||||||
|
uart_2ndstage=1
|
||||||
|
enable_gic=1
|
||||||
|
armstub=RPI_EFI.fd
|
||||||
|
disable_commandline_tags=1
|
||||||
|
disable_overscan=1
|
||||||
|
device_tree_address=0x3e0000
|
||||||
|
device_tree_end=0x400000
|
||||||
|
# dtoverlay=miniuart-bt
|
||||||
|
# dtoverlay=upstream-pi4
|
26
pkgs/by-name/bootpart-edk2-rpi/package.nix
Normal file
26
pkgs/by-name/bootpart-edk2-rpi/package.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
edk2-rpi4,
|
||||||
|
raspberrypifw,
|
||||||
|
runCommandLocal,
|
||||||
|
}:
|
||||||
|
runCommandLocal "bootpart-edk2-rpi" {
|
||||||
|
meta = {
|
||||||
|
description = ''
|
||||||
|
unmanaged files to place in /boot on a Raspberry Pi 400 system.
|
||||||
|
these files are not enough on their own to boot a kernel,
|
||||||
|
but only to boot an EFI application.
|
||||||
|
best paired with systemd-boot (via `bootpart-systemd-boot`), or perhaps u-boot (untested).
|
||||||
|
'';
|
||||||
|
platforms = [
|
||||||
|
"aarch64-linux"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
} ''
|
||||||
|
install -Dm644 ${edk2-rpi4}/RPI_EFI.fd $out/RPI_EFI.fd
|
||||||
|
install -Dm644 ${./config.txt} $out/config.txt
|
||||||
|
install -Dm644 ${raspberrypifw}/share/raspberrypi/boot/bcm2711-rpi-400.dtb $out/bcm2711-rpi-400.dtb
|
||||||
|
# install -Dm644 ${raspberrypifw}/share/raspberrypi/boot/bcm2711-rpi-4-b.dtb $out/bcm2711-rpi-4-b.dtb
|
||||||
|
# install -Dm644 ${raspberrypifw}/share/raspberrypi/boot/bcm2711-rpi-cm4.dtb $out/bcm2711-rpi-cm4.dtb
|
||||||
|
install -Dm644 ${raspberrypifw}/share/raspberrypi/boot/fixup4.dat $out/fixup4.dat
|
||||||
|
install -Dm644 ${raspberrypifw}/share/raspberrypi/boot/start4.elf $out/start4.elf
|
||||||
|
''
|
Reference in New Issue
Block a user