forked from M-Labs/nix-servo
configure loading of bitstream at boot time
This commit is contained in:
parent
0ff299aa55
commit
f06638a39a
21
flake.nix
21
flake.nix
|
@ -180,6 +180,22 @@
|
|||
'';
|
||||
};
|
||||
|
||||
fast-servo-config = { config, pkgs, lib, ... }: {
|
||||
environment.systemPackages = [
|
||||
linien-server
|
||||
];
|
||||
boot.postBootCommands = lib.mkAfter ''
|
||||
|
||||
# Program the FPGA
|
||||
set +x
|
||||
echo Flashing bitstream...
|
||||
echo 0 > /sys/class/fpga_manager/fpga0/flags
|
||||
mkdir -p /lib/firmware
|
||||
cp ${fast-servo-gateware}/gateware.bin /lib/firmware/
|
||||
echo gateware.bin > /sys/class/fpga_manager/fpga0/firmware
|
||||
'';
|
||||
};
|
||||
|
||||
mkbootimage = pkgs.stdenv.mkDerivation {
|
||||
pname = "mkbootimage";
|
||||
version = "2.3dev";
|
||||
|
@ -208,10 +224,7 @@
|
|||
inherit nixpkgs;
|
||||
extraModules = [
|
||||
"${patched-not-os}/zynq_image.nix"
|
||||
] ++ pkgs.lib.optionals (board == "fast-servo") [
|
||||
({ config, pkgs, ... }: {
|
||||
environment.systemPackages = [ linien-server ];
|
||||
})];
|
||||
] ++ pkgs.lib.optionals (board == "fast-servo") [ fast-servo-config ];
|
||||
system = "x86_64-linux";
|
||||
inherit crossSystem;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue