Commit af9c658 1 parent c41d8d1 commit af9c658 Copy full SHA for af9c658
File tree 3 files changed +41
-0
lines changed
3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -331,3 +331,6 @@ ASALocalRun/
331
331
332
332
# Coverity
333
333
cov-int /
334
+
335
+ # nix stuff
336
+ ** /result
Original file line number Diff line number Diff line change @@ -135,3 +135,20 @@ Starting execution at address 0x08002000... done.
135
135
Firmware flashed successfully.
136
136
137
137
```
138
+
139
+ # Using ` nix `
140
+
141
+ In case you happen to have [ ` nix ` ] ( https://nixos.org/explore.html ) installed,
142
+ you can simply use the ` default.nix ` file in the linux folder to build a
143
+ compatible derivation of both ` flash-multi ` and ` multi-bootreloader ` . To
144
+ install it in your users environment, simply run ` nix-env -f . -i ` .
145
+
146
+ Beware: This does not alter udev rules, so you likely will run into permission
147
+ problems with the DFU device and/or the serial device. Possible solution in
148
+ descending level of recommendability:
149
+
150
+ + install appropiate udev rules in your system
151
+ + run the script in question as ` root ` user
152
+ + run ` while true; do sudo chown $USER /dev/bus/usb/*; done ` while using the
153
+ script. Afterwards run ` sudo udevadm control --reload-rules && udevadm trigger ` to
154
+ reaply all udev rules in question.
Original file line number Diff line number Diff line change
1
+ { pkgs ? import <nixpkgs> { } } :
2
+
3
+ with pkgs ;
4
+
5
+ stdenv . mkDerivation rec {
6
+ name = "flash-multi" ;
7
+
8
+ src = ./. ;
9
+
10
+ nativeBuildInputs = [ autoPatchelfHook ] ;
11
+ buildInputs = [ libusb ] ;
12
+
13
+ installPhase = ''
14
+ runHook preInstall
15
+ mkdir -p $out/{bin,${ name } }
16
+ mv * $out/${ name } /
17
+ ln -s $out/${ name } /flash-multi $out/bin/
18
+ ln -s $out/${ name } /multi-bootreloader $out/bin/
19
+ runHook postInstall
20
+ '' ;
21
+ }
You can’t perform that action at this time.
0 commit comments