-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (50 loc) · 1.6 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#
# Copyright (c) 2021 OpenHisiIpCam, [email protected]
# SPDX-License-Identifier: MIT
#
# TODO brief description
#
BR_EXTERNAL = $(abspath .)
PROGRAMMER = ch341a_spi
.PHONY: usage
usage:
@echo "TODO"
vendors/buildroot:
make -C vendors buildroot
.PHONY: list-defconfigs
list-defconfigs: vendors/buildroot
make \
-C $(abspath vendors/buildroot) \
BR2_EXTERNAL=$(BR_EXTERNAL) \
list-defconfigs
.PHONY: %_defconfig
%_defconfig: vendors/buildroot
@test -f ./configs/$@ || (echo "Config $@ does not exist"; exit 1)
make \
-C $(abspath vendors/buildroot) \
BR2_EXTERNAL=$(abspath $(BR_EXTERNAL)) \
O=$(abspath output/$(subst _defconfig,,$@)) \
$@
docker-build:
docker build -t local/camera-debug-facility:last .
docker-run:
docker run -it -v $(abspath .):/home/user/camera-debug-facility --entrypoint "/bin/bash" local/camera-debug-facility:last
pack-dl:
tar -cvf dl.tar ./dl
vendors/flashrom/flashrom:
make -C vendors flashrom
flashrom16: vendors/flashrom/flashrom
vendors/flashrom/flashrom --programmer $(PROGRAMMER) -w output/camera-debug-facility/images/spi16MB.img
flashrom32: vendors/flashrom/flashrom
vendors/flashrom/flashrom --programmer $(PROGRAMMER) -w output/camera-debug-facility/images/spi32MB.img
# Run BR utils/check-package on all custom packages
.IGNORE: check-packages
check-packages: vendors/buildroot
vendors/buildroot/utils/check-package -b $(BR_EXTERNAL)/package/*/*
.PHONY: mrproper
mrproper:
make -C vendors clean
rm -rf dl
rm -rf site
rm -rf mkdocs-material
rm -rf output