forked from M-Labs/nix-servo
configure loading of bitstream at boot time
This commit is contained in:
parent
bb61f0f9eb
commit
bda5ec0523
16
flake.nix
16
flake.nix
|
@ -116,6 +116,19 @@
|
|||
environment.systemPackages = [ linien-server ];
|
||||
});
|
||||
|
||||
fast-servo-init = ({ config, pkgs, lib, ... }: {
|
||||
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
|
||||
'';
|
||||
});
|
||||
|
||||
gnu-platform = "arm-none-eabi";
|
||||
|
||||
binutils-pkg = { zlib, extraConfigureFlags ? [] }: pkgs.stdenv.mkDerivation rec {
|
||||
|
@ -295,7 +308,8 @@
|
|||
inherit nixpkgs;
|
||||
extraModules = [
|
||||
"${patched-not-os}/zynq_image.nix"
|
||||
] ++ pkgs.lib.optional (board == "fast-servo") fast-servo-extrapkg;
|
||||
] ++ pkgs.lib.optional (board == "fast-servo") fast-servo-extrapkg
|
||||
++ pkgs.lib.optional (board == "fast-servo") fast-servo-init;
|
||||
system = "x86_64-linux";
|
||||
crossSystem.system = "armv7l-linux";
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue