-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathMakefile
74 lines (64 loc) · 1.54 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
64
65
66
67
68
69
70
71
72
73
74
.PHONY: all custom
# Default build for Pi5
all: clean Pi5
# 64 bits
Pi3 Pi4 Pi400 PiZero2 PiCM3 PiCM4: clean
$(MAKE) build \
raspios=raspios_lite_arm64 \
defconfig=bcm2711_defconfig \
kernel=kernel8 \
arch=arm64 \
compiler=aarch64-linux-gnu- \
target=$@
Pi5: clean
$(MAKE) build \
raspios=raspios_lite_arm64 \
defconfig=bcm2712_defconfig \
kernel=kernel_2712 \
arch=arm64 \
compiler=aarch64-linux-gnu- \
target=$@
# 32 bits
Pi1 PiZero PiCM1: clean
$(MAKE) build \
raspios=raspios_lite_armhf \
defconfig=bcmrpi_defconfig \
kernel=kernel \
arch=arm \
compiler=arm-linux-gnueabihf- \
target=$@
Pi2: clean
$(MAKE) build \
raspios=raspios_lite_armhf \
defconfig=bcm2709_defconfig \
kernel=kernel7 \
arch=arm \
compiler=arm-linux-gnueabihf- \
target=$@
Pi3-32 PiCM3-32 PiZero2-32: clean Pi2
Pi4-32 Pi400-32 PiCM4-32: clean
$(MAKE) build \
raspios=raspios_lite_armhf \
defconfig=bcm2711_defconfig \
kernel=kernel7l \
arch=arm \
compiler=arm-linux-gnueabihf- \
target=$@
build:
mkdir -p build
docker build \
--build-arg RASPIOS=$(raspios) \
--build-arg DEFCONFIG=$(defconfig) \
--build-arg KERNEL=$(kernel) \
--build-arg ARCH=$(arch) \
--build-arg CROSS_COMPILE=$(compiler) \
--build-arg TARGET=$(target) \
-t rpi-rt-linux .
docker rm tmp-rpi-rt-linux || true
docker run --privileged --name tmp-rpi-rt-linux rpi-rt-linux /raspios/build.sh
docker cp tmp-rpi-rt-linux:/raspios/build/ ./
docker rm tmp-rpi-rt-linux
custom:
docker run --rm --privileged -it rpi-rt-linux bash
clean:
rm -fr build