forked from M-Labs/nix-servo
Compare commits
2 Commits
56c749eda4
...
c06ad6ef1c
Author | SHA1 | Date |
---|---|---|
Florian Agbuya | c06ad6ef1c | |
Florian Agbuya | 5b39d891b6 |
|
@ -22,8 +22,8 @@ MAP_SIZE = 0x1000
|
|||
MAP_MASK = 0xFFF
|
||||
PAGESIZE = 0x1000
|
||||
|
||||
LINIEN_OFFSET = 0x0
|
||||
# LINIEN_OFFSET = 0x300000
|
||||
# LINIEN_OFFSET = 0x0
|
||||
LINIEN_OFFSET = 0x300000
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# FRONT PANEL LEDS REGISTER ADDRESSES
|
||||
|
|
26
flake.nix
26
flake.nix
|
@ -113,7 +113,28 @@
|
|||
};
|
||||
in {
|
||||
system.build.linien-server = linien-server;
|
||||
environment.systemPackages = [ linien-server ];
|
||||
environment.systemPackages = [
|
||||
linien-server
|
||||
(pkgs.python3.withPackages(ps: [ ps.spidev ps.smbus2 ]))
|
||||
];
|
||||
});
|
||||
|
||||
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
|
||||
|
||||
# Run device init scripts
|
||||
mkdir -p /opt/pyfastservo
|
||||
cp ${./fast-servo/pyfastservo}/* /opt/pyfastservo
|
||||
python3 /opt/pyfastservo/initialize.py
|
||||
'';
|
||||
});
|
||||
|
||||
gnu-platform = "arm-none-eabi";
|
||||
|
@ -295,7 +316,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