summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2013-06-27 12:00:56 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2013-06-27 14:25:06 +0100
commit21aafa18ffd550b2d35ad70f3600bce8ef99ac05 (patch)
tree3d046be70c2b78b36eabd57edf3c99bad8cb59ba /README
parentf12464c31c9da89810088d5c9298d5e3ec4261cd (diff)
downloadmorph-21aafa18ffd550b2d35ad70f3600bce8ef99ac05.tar.gz
Rewrite morphologies in YAML
Diffstat (limited to 'README')
-rw-r--r--README137
1 files changed, 53 insertions, 84 deletions
diff --git a/README b/README
index 98ac8783..b2203b85 100644
--- a/README
+++ b/README
@@ -48,24 +48,18 @@ All of the above settings apart from `log` are the defaults, so may be omitted.
Morphology file syntax
----------------------
-JSON is used for the morphology syntax. For example, to build a chunk:
-
- {
- "name": "foo",
- "kind": "chunk",
- "configure-commands": [
- "./configure --prefix=\"$PREFIX\""
- ],
- "build-commands": [
- "make"
- ],
- "test-commands": [
- "make check"
- ],
- "install-commands": [
- "make DESTDIR=\"$DESTDIR\" install"
- ]
- }
+YAML is used for the morphology syntax. For example, to build a chunk:
+
+ name: foo
+ kind: chunk
+ configure-commands:
+ - ./configure --prefix="$PREFIX"
+ build-commands:
+ - make
+ test-commands:
+ - make check
+ install-commands:
+ - make DESTDIR="$DESTDIR" install
For all morphologies, use the following fields:
@@ -169,78 +163,53 @@ For systems, use the following fields:
Example chunk (simplified commands):
- {
- "name": "eglibc",
- "kind": "chunk",
- "configure-commands": [
- "mkdir o",
- "cd o && ../libc/configure --prefix=/usr"
- ],
- "build-commands": [
- "cd o && make"
- ],
- "install-commands": [
- "cd o && make install_root=\"$DESTDIR\" install"
- ]
- }
+ name: eglibc
+ kind: chunk
+ configure-commands:
+ - mkdir o
+ - cd o && ../libc/configure --prefix=/usr
+ build-commands:
+ - cd o && make
+ install-commands:
+ - cd o && make install_root="$DESTDIR" install
Example stratum:
- {
- "name": "foundation",
- "kind": "stratum",
- "chunks": [
- {
- "name": "fhs-dirs",
- "repo": "upstream:fhs-dirs",
- "ref": "baserock/bootstrap",
- "build-depends": [],
- },
- {
- "name": "linux-api-headers",
- "repo": "upstream:linux",
- "ref": "baserock/morph",
- "build-depends": ["fhs-dirs"]
- },
- {
- "name": "eglibc",
- "repo": "upstream:eglibc",
- "ref": "baserock/bootstrap",
- "build-depends": [
- "linux-api-headers"
- ]
- },
- {
- "name": "busybox",
- "repo": "upstream:busybox",
- "ref": "baserock/bootstrap",
- "build-depends": [
- "fhs-dirs",
- "linux-api-headers"
- ]
- }
- ]
- }
+ name: foundation
+ kind: stratum
+ chunks:
+ - name: fhs-dirs
+ repo: upstream:fhs-dirs
+ ref: baserock/bootstrap
+ build-depends: []
+ - name: linux-api-headers
+ repo: upstream:linux
+ ref: baserock/morph
+ build-depends:
+ - fhs-dirs
+ - name: eglibc
+ repo: upstream:eglibc
+ ref: baserock/bootstrap
+ build-depends:
+ - linux-api-headers
+ - name: busybox
+ repo: upstream:busybox
+ ref: baserock/bootstrap
+ build-depends:
+ - fhs-dirs
+ - linux-api-headers
Example system:
- {
- "name": "base",
- "kind": "system",
- "disk-size": "1G",
- "strata": [
- {
- "morph": "foundation",
- "repo": "baserock:baserock/morphs",
- "ref": "master"
- },
- {
- "morph": "linux-stratum",
- "repo": "baserock:baserock/morphs",
- "ref": "master"
- }
- ]
- }
+ name: base
+ kind: system
+ strata:
+ - morph: foundation
+ repo: baserock:baserock/morphs
+ ref: master
+ - morph: linux-stratum
+ repo: baserock:baserock/morphs
+ ref: master
Note that currently, unknown keys in morphologies are silently ignored.