-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
47 lines (37 loc) · 916 Bytes
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
KDIR ?= ~/linux
DEV ?= /dev/sda1
ARCH ?= arm64
LOG ?= LOG_WARN
DEBUG ?= n
export KDIR
export ARCH
export LOG
.PHONY: all env tools driver clean
# check if KDIR is set
ifeq ($(KDIR),)
$(error Linux kernel directory is not set. Please set environment variable 'KDIR')
endif
all: tools driver
env:
git submodule update --init --recursive
tools: env
$(MAKE) -C tools all
driver: env
$(MAKE) -C driver all
transfer: all
./trans_file.sh ./tools/hvisor
./trans_file.sh ./driver/hvisor.ko
# transfer_nxp: all
# sudo mount $(DEV) /mnt/
# sudo rm -f /mnt/home/arm64/hvisor /mnt/home/arm64/hvisor.ko
# sudo cp ./tools/hvisor /mnt/home/arm64
# sudo cp ./driver/hvisor.ko /mnt/home/arm64
# sudo umount $(DEV)
transfer_nxp: all
sudo cp ./tools/hvisor ~/tftp
sudo cp ./tools/ivc_demo ~/tftp
sudo cp ./driver/hvisor.ko ~/tftp
sudo cp ./driver/ivc.ko ~/tftp
clean:
make -C tools clean
make -C driver clean