-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
110 lines (82 loc) · 3.76 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
###
### Raspbian Image
###
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
raspbian_lite_latest.img:
wget https://downloads.raspberrypi.org/raspbian_lite_latest
unzip raspbian_lite_latest
rm raspbian_lite_latest
mv *-raspbian-stretch-lite.img raspbian_lite_latest.img
piq.img: | raspbian_lite_latest.img linux-stable/arch/arm/boot/uImage linux-stable/arch/arm/boot/dts/vexpress-v2p-ca9.dtb
./prep-pi-image.sh
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
###
### Compiler Toolchains
###
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### Arm8 (64 bit) -------------------------------------------------------------
gcc-linaro-7.2.1-2017.11-i686_aarch64-linux-gnu.tar.xz:
wget https://releases.linaro.org/components/toolchain/binaries/latest/aarch64-linux-gnu/gcc-linaro-7.2.1-2017.11-i686_aarch64-linux-gnu.tar.xz
gcc-linaro-7.2.1-2017.11-i686_aarch64-linux-gnu: | gcc-linaro-7.2.1-2017.11-i686_aarch64-linux-gnu.tar.xz
unxz --keep gcc-linaro-7.2.1-2017.11-i686_aarch64-linux-gnu.tar.xz
tar xf gcc-linaro-7.2.1-2017.11-i686_aarch64-linux-gnu.tar
### Arm7 (32 bit) -------------------------------------------------------------
gcc-linaro-7.2.1-2017.11-i686_arm-linux-gnueabihf.tar.xz:
wget https://releases.linaro.org/components/toolchain/binaries/latest/arm-linux-gnueabihf/gcc-linaro-7.2.1-2017.11-i686_arm-linux-gnueabihf.tar.xz
gcc-linaro-7.2.1-2017.11-i686_arm-linux-gnueabihf: | gcc-linaro-7.2.1-2017.11-i686_arm-linux-gnueabihf.tar.xz
unxz --keep gcc-linaro-7.2.1-2017.11-i686_arm-linux-gnueabihf.tar.xz
tar xf gcc-linaro-7.2.1-2017.11-i686_arm-linux-gnueabihf.tar
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
###
### ARM Versatile Express Board for Cortex A9
###
### linux-kernel: 4.15.6 ~ vexpress_config
### device-tree: 4.15.6 ~ vexpress-v2p-ca9.dtb
### u-boot: mainline ~ vexpress_ca9x4_config
###
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### Linux Kernel --------------------------------------------------------------
linux-stable:
git clone \
--branch v4.15.6 \
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
linux-stable/arch/arm/boot/uImage linux-stable/arch/arm/boot/zImage linux-stable/arch/arm/boot/dts/vexpress-v2p-ca9.dtb: | linux-stable
./make-kernel.sh
### U-Boot --------------------------------------------------------------------
u-boot:
git clone git://git.denx.de/u-boot.git
uboot-a9: | u-boot gcc-linaro-7.2.1-2017.11-i686_arm-linux-gnueabihf
./build-uboot-a9.sh
.PHONY: prepare-a9
prepare-a9: uboot-a9 raspbian_lite_latest.img piq.img
.PHONY: install-a9
install-a9:
sudo cp img/piq.img /var/rvn/img/raspbian:a9.qcow2
sudo cp u-boot.img /var/rvn/kernel/u-boot:a9
sudo cp linux-stable/arch/arm/boot/zImage /var/rvn/kernel/zImage:a9
.PHONY: push-a9
push-a9:
scp img/piq.img mirror.deterlab.net:/space/rvn/img/raspbian:a9.qcow2
scp u-boot.img mirror.deterlab.net:/space/rvn/kernel/u-boot:a9
scp linux-stable/arch/arm/boot/zImage mirror.deterlab.net:/space/rvn/kernel/zImage:a9
.PHONY: run-a9
run-a9: prepare-a9
./launch-a9.sh
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
###
### ARM Versatile Express Board for Cortex A15 (using A53)
###
### linux-kernel: ?
### device-tree: ?
### u-boot: ?
###
### TODO WORK IN PROGRESS XXX
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
uboot-a53: | u-boot gcc-linaro-7.2.1-2017.11-i686_aarch64-linux-gnu
./build-uboot-a53.sh
.PHONY: prepare-a53
prepare-a53: uboot-a53 raspbian_lite_latest.img vexpress-v2p-ca15-tc1.dtb
.PHONY: run-a53
run-a53: prepare-a53
./launch-a53.sh