new bootpart for u-boot rpi
this needs some tweaking: it doesn't package the right dtb file. it packages the dtb for the linux kernels, whereas we want dtbs to be consumed by u-boot.
This commit is contained in:
parent
fd48880a0a
commit
0aa0334465
10
pkgs/bootpart-u-boot-rpi-aarch64/config.txt
Normal file
10
pkgs/bootpart-u-boot-rpi-aarch64/config.txt
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[pi4]
|
||||||
|
kernel=u-boot.bin
|
||||||
|
enable_gic=1
|
||||||
|
armstub=armstub8-gic.bin
|
||||||
|
disable_overscan=1
|
||||||
|
|
||||||
|
[all]
|
||||||
|
arm_64bit=1
|
||||||
|
enable_uart=1
|
||||||
|
avoid_warnings=1
|
37
pkgs/bootpart-u-boot-rpi-aarch64/default.nix
Normal file
37
pkgs/bootpart-u-boot-rpi-aarch64/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{ stdenv, pkgs }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "bootpart-tow-boot-rpi-aarch64";
|
||||||
|
version = "1";
|
||||||
|
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
ubootRaspberryPi4_64bit
|
||||||
|
raspberrypifw # for bootcode.bin, *.dat, *.elf, *.dtb
|
||||||
|
raspberrypi-armstubs # for armstub*
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
src = ./config.txt;
|
||||||
|
|
||||||
|
dontUnpack = true;
|
||||||
|
|
||||||
|
installPhase = with pkgs; ''
|
||||||
|
mkdir "$out"
|
||||||
|
cp ${ubootRaspberryPi4_64bit}/u-boot.bin "$out"/
|
||||||
|
cp -R ${raspberrypifw}/share/raspberrypi/boot/*.dtb "$out"/
|
||||||
|
cp -R ${raspberrypifw}/share/raspberrypi/boot/*.bin "$out"/
|
||||||
|
cp -R ${raspberrypifw}/share/raspberrypi/boot/*.dat "$out"/
|
||||||
|
cp -R ${raspberrypifw}/share/raspberrypi/boot/*.img "$out"/
|
||||||
|
cp -R ${raspberrypifw}/share/raspberrypi/boot/*.elf "$out"/
|
||||||
|
cp -R ${raspberrypifw}/share/raspberrypi/boot/overlays "$out"/
|
||||||
|
cp ${raspberrypi-armstubs}/* "$out"/
|
||||||
|
cp ${src} "$out"/config.txt
|
||||||
|
'';
|
||||||
|
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "unmanaged files to place in /boot on a raspberry pi system";
|
||||||
|
platforms = [ "aarch64-linux" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user