feat: Use YAML for board definitions

This commit is contained in:
Maciej Krüger 2018-08-10 16:17:10 +02:00
parent 70f2c6deb7
commit c7fca8724c
No known key found for this signature in database
GPG Key ID: 0D948CE19CF49C5F
10 changed files with 24 additions and 21 deletions

View File

@ -3,8 +3,8 @@ CHANNEL=stable
clean:
rm -rf *.img *.model *.manifest
%.model: boards/%.json # sign a model file
cat boards/HEAD.json $< boards/FOOT.json | sed "s|TIMESTAMP|$(shell date -Iseconds --utc)|g" | snap sign -k default > $@
%.model: boards/%.yaml # sign a model file
cat definition.yaml $< | python -c "import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=2)" | sed "s|TIMESTAMP|$(shell date -Iseconds --utc)|g" | snap sign -k default > $@
%.img: %.model # build an image
sudo ubuntu-image snap -o $@ -c $(CHANNEL) $<

View File

@ -1,5 +0,0 @@
"required-snaps": ["hello", "hello-world", "nextcloud", "lxd"],
"authority-id": "7xN2sMCILuFk10e6DxrTrQWprdmV0Vi9",
"brand-id": "7xN2sMCILuFk10e6DxrTrQWprdmV0Vi9",
"timestamp": "TIMESTAMP"
}

View File

@ -1,4 +0,0 @@
{
"type": "model",
"series": "16",
"model": "hub",

View File

@ -1,3 +0,0 @@
"architecture": "amd64",
"gadget": "joule",
"kernel": "joule-linux",

3
boards/amd64.yaml Normal file
View File

@ -0,0 +1,3 @@
architecture: amd64
gadget: joule
kernel: joule-linux

View File

@ -1,3 +0,0 @@
"architecture": "armhf",
"gadget": "pi2",
"kernel": "pi2-kernel",

3
boards/rpi2.yaml Normal file
View File

@ -0,0 +1,3 @@
architecture: armhf
gadget: pi2
kernel: pi2-kernel

View File

@ -1,4 +0,0 @@
"architecture": "armhf",
"gadget": "pi2",
"kernel": "pi3-kernel",

4
boards/rpi3.yaml Normal file
View File

@ -0,0 +1,4 @@
architecture: armhf
gadget: pi3
kernel: pi2-kernel

12
definition.yaml Normal file
View File

@ -0,0 +1,12 @@
# basic
type: model
series: "16"
model: hub
# snaps to be preinstalled:
required-snaps:
- nextcloud # just for proof-of-concept
# authority meta
authority-id: 7xN2sMCILuFk10e6DxrTrQWprdmV0Vi9
brand-id: 7xN2sMCILuFk10e6DxrTrQWprdmV0Vi9
# timestamp gets filled in automatically
timestamp: TIMESTAMP