forked from flokli/pynq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (25 loc) · 1.17 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
flash_mainline_boot:
$(eval TMP := $(shell mktemp -d))
sudo mount /dev/mmcblk0p1 $(TMP)
sudo rsync -va $(shell nix-build -A pynqBootFS --no-out-link)/. $(TMP) --delete
sudo umount $(TMP)
flash_mainline_kmods:
$(eval TMP := $(shell mktemp -d))
sudo mount /dev/mmcblk0p3 $(TMP)
sudo rsync -va $(shell nix-build -A pynqKernel --no-out-link)/lib/modules/$(shell nix eval --raw -f . pynqKernel.modDirVersion) $(TMP) --delete
sudo umount $(TMP)
flash_mainline: flash_mainline_boot flash_mainline_kmods
flash_xilinx_boot:
$(eval TMP := $(shell mktemp -d))
sudo mount /dev/mmcblk0p1 $(TMP)
sudo rsync -va $(shell nix-build -A pynqBootFSXilinx --no-out-link)/. $(TMP) --delete
sudo umount $(TMP)
flash_xilinx_kmods:
$(eval TMP := $(shell mktemp -d))
sudo mount /dev/mmcblk0p3 $(TMP)
sudo rsync -va $(shell nix-build -A pynqKernelXilinx --no-out-link)/lib/modules/$(shell nix eval --raw -f . pynqKernelXilinx.modDirVersion) $(TMP) --delete
sudo umount $(TMP)
flash_xilinx: flash_xilinx_boot flash_xilinx_kmods
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
%.bin : %.bit
nix-build nix/default.nix -A pkgs.mkXilinxBin --arg bit $(ROOT_DIR)/$< --arg bif null -o $@