summaryrefslogtreecommitdiffstats
path: root/examples/rootfs.yml
blob: ae831dad994410f1f00bad8f970efd26cd6b2b7e (plain)
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
tasks:
  install:
    args:
      host: 'platform'
    depends:
      - recipe: 'busybox'
        task: 'install'
    output:
      default: {}
    run: |
      mkdir -p \
        {{destdir}}/dev \
        {{destdir}}/proc \
        {{destdir}}/sys \
        {{destdir}}/root \
        {{destdir}}/run \
        {{destdir}}/var \
        {{destdir}}/usr/bin \
        {{destdir}}/usr/lib

      ln -s bin {{destdir}}/usr/sbin
      ln -s usr/bin {{destdir}}/bin
      ln -s usr/bin {{destdir}}/sbin
      ln -s usr/lib {{destdir}}/lib
      ln -s ../run {{destdir}}/var/run

      rsync -aK {{sysroot}}/ {{destdir}}


  image-ext4:
    args:
      host: 'platform'
    build_depends:
      - recipe: 'e2fsprogs'
        task: 'install'
    depends:
      - task: 'install'
    output:
      default: {}
    run: |
      mkdir {{destdir}}

      IMAGE={{destdir}}/{{pn}}.ext4
      truncate -s 1G "$IMAGE"
      {{build.prefix}}/sbin/mkfs.ext4 -d {{sysroot}} "$IMAGE"