forked from M-Labs/nix-servo
configure loading of bitstream at boot time
This commit is contained in:
parent
3d98549fd1
commit
7c6320f66d
12
flake.nix
12
flake.nix
@ -209,8 +209,18 @@
|
|||||||
extraModules = [
|
extraModules = [
|
||||||
"${patched-not-os}/zynq_image.nix"
|
"${patched-not-os}/zynq_image.nix"
|
||||||
] ++ pkgs.lib.optionals (board == "fast-servo") [
|
] ++ pkgs.lib.optionals (board == "fast-servo") [
|
||||||
({ config, pkgs, ... }: {
|
({ config, pkgs, lib, ... }: {
|
||||||
environment.systemPackages = [ linien-server ];
|
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
|
||||||
|
'';
|
||||||
})];
|
})];
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
inherit crossSystem;
|
inherit crossSystem;
|
||||||
|
Loading…
Reference in New Issue
Block a user