-
Notifications
You must be signed in to change notification settings - Fork 2
/
snapcraft.yaml
164 lines (161 loc) · 3.51 KB
/
snapcraft.yaml
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: pi4-devel
base: core18
version: '0.1'
summary: Raspberry Pi 4 gadget
description: |
Support files for booting Raspberry Pi.
This gadget snap supports the Pi4 and is highly experimental
grade: stable
confinement: strict
type: gadget
architectures:
- build-on: amd64
run-on: armhf
parts:
uboot-pi4:
source: https://github.com/agherzan/u-boot.git
source-branch: ag/rpi4
source-depth: 1
plugin: nil
override-build: |
git apply -v $SNAPCRAFT_PROJECT_DIR/uboot4.patch
make rpi_4_32b_defconfig
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j4
mkdir -p $SNAPCRAFT_PART_INSTALL/boot-assets
cp -av u-boot.bin $SNAPCRAFT_PART_INSTALL/boot-assets/uboot4.bin
tools/mkenvimage -r -s 131072 -o $SNAPCRAFT_PART_INSTALL/uboot.env $SNAPCRAFT_PROJECT_DIR/uboot.env.in
ln -s uboot.env $SNAPCRAFT_PART_INSTALL/uboot.conf
build-packages:
- bc
- bison
- build-essential
- device-tree-compiler
- flex
- html2text
- libpython2.7-dev
- python-minimal
- gcc-arm-linux-gnueabihf
boot-firmware:
plugin: nil
source: .
after:
- uboot-pi4
override-build: |
git clone --depth=1 https://github.com/raspberrypi/firmware.git
mkdir -p $SNAPCRAFT_PART_INSTALL/boot-assets
cp -av firmware/boot/fixup* $SNAPCRAFT_PART_INSTALL/boot-assets
cp -av firmware/boot/start* $SNAPCRAFT_PART_INSTALL/boot-assets
cp -av firmware/boot/COPYING.linux $SNAPCRAFT_PART_INSTALL/boot-assets
cp -av firmware/boot/LICENCE.broadcom $SNAPCRAFT_PART_INSTALL/boot-assets
cp -av $SNAPCRAFT_PROJECT_DIR/devicetrees/* $SNAPCRAFT_PART_INSTALL/boot-assets/
configs:
plugin: dump
source: configs
after:
- boot-firmware
organize:
config.txt: boot-assets/config.txt
cmdline.txt: boot-assets/cmdline.txt
slots:
bcm-gpio-0:
interface: gpio
number: 0
bcm-gpio-1:
interface: gpio
number: 1
bcm-gpio-2:
interface: gpio
number: 2
bcm-gpio-3:
interface: gpio
number: 3
bcm-gpio-4:
interface: gpio
number: 4
bcm-gpio-5:
interface: gpio
number: 5
bcm-gpio-6:
interface: gpio
number: 6
bcm-gpio-7:
interface: gpio
number: 7
bcm-gpio-8:
interface: gpio
number: 8
bcm-gpio-9:
interface: gpio
number: 9
bcm-gpio-10:
interface: gpio
number: 10
bcm-gpio-11:
interface: gpio
number: 11
bcm-gpio-12:
interface: gpio
number: 12
bcm-gpio-13:
interface: gpio
number: 13
bcm-gpio-14:
interface: gpio
number: 14
bcm-gpio-15:
interface: gpio
number: 15
bcm-gpio-16:
interface: gpio
number: 16
bcm-gpio-17:
interface: gpio
number: 17
bcm-gpio-18:
interface: gpio
number: 18
bcm-gpio-19:
interface: gpio
number: 19
bcm-gpio-20:
interface: gpio
number: 20
bcm-gpio-21:
interface: gpio
number: 21
bcm-gpio-22:
interface: gpio
number: 22
bcm-gpio-23:
interface: gpio
number: 23
bcm-gpio-24:
interface: gpio
number: 24
bcm-gpio-25:
interface: gpio
number: 25
bcm-gpio-26:
interface: gpio
number: 26
bcm-gpio-27:
interface: gpio
number: 27
i2c-0:
interface: i2c
path: /dev/i2c-0
i2c-1:
interface: i2c
path: /dev/i2c-1
i2c-2:
interface: i2c
path: /dev/i2c-2
bt-serial:
interface: serial-port
path: /dev/ttyAMA0
spidev0:
interface: spi
path: /dev/spidev0.0
spidev1:
interface: spi
path: /dev/spidev0.1