rockpi4.yml 3.13 KB
Newer Older
Rohan Garg's avatar
Rohan Garg committed
1
{{- $ubootPath := or .ubootPath "/usr/lib/u-boot/rockpi4-rk3399" -}}
Rohan Garg's avatar
Rohan Garg committed
2
{{- $linuxVersion := or .linuxVersion "5.3.0-rc1-g2a94dce2d0ff_5.3.0-rc1-g2a94dce2d0ff-1" -}}
Rohan Garg's avatar
Rohan Garg committed
3
{{- $image := or .image "debian-rockpi4.img" -}}
Rohan Garg's avatar
Rohan Garg committed
4 5 6 7 8 9 10 11

architecture: arm64

actions:
  - action: debootstrap
    suite: testing
    components:
      - main
Rohan Garg's avatar
Rohan Garg committed
12
    mirror: https://deb.debian.org/debian
Rohan Garg's avatar
Rohan Garg committed
13 14 15
    variant: minbase

  - action: apt
16 17 18
    packages: [ libc6, sudo, adduser, systemd-sysv, initramfs-tools,
                u-boot-tools, u-boot-menu, util-linux, unzip, weston,
                policykit-1, kbd, locales, network-manager,
19
                libsensors5, libllvm8, ssh, ssh-import-id ]
Rohan Garg's avatar
Rohan Garg committed
20 21

  - action: image-partition
Rohan Garg's avatar
Rohan Garg committed
22
    imagename: {{$image}}
Rohan Garg's avatar
Rohan Garg committed
23 24 25 26 27 28 29 30
    imagesize: 4GB
    partitiontype: gpt
    mountpoints:
      - mountpoint: /
        partition: root
    partitions:
      - name: root
        fs: ext4
31
        start: 32768s
Rohan Garg's avatar
Rohan Garg committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
        end: 100%
        flags: [ boot ]

  # Deploy the filesystem to an image
  - action: filesystem-deploy
    description: Deploying filesystem onto image

  - action: download
    url: https://gitlab.collabora.com/rockpi/u-boot/-/jobs/artifacts/panfrost/ci/raw/rkbin/idbloader.img?job=pack
    name: idbloader.img

  - action: download
    url: https://gitlab.collabora.com/rockpi/u-boot/-/jobs/artifacts/panfrost/ci/raw/rkbin/uboot.img?job=pack
    name: uboot.img

  - action: download
    url: https://gitlab.collabora.com/rockpi/u-boot/-/jobs/artifacts/panfrost/ci/raw/rkbin/trust.img?job=pack
    name: trust.img

  - action: download
    url: https://gitlab.collabora.com/rockpi/linux/-/jobs/artifacts/panfrost/ci/raw/artifacts/linux-image-{{$linuxVersion}}_arm64.deb?job=build
    name: kernel.deb

55 56 57 58 59
  - action: download
    url: https://gitlab.collabora.com/rockpi/mesa/-/jobs/artifacts/panfrost/ci/download?job=build
    name: mesa.zip
    filename: mesa.zip

Rohan Garg's avatar
Rohan Garg committed
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
  - action: overlay
    source: overlays/
    destination: /

  - action: run
    chroot: true
    command: mkdir -p {{$ubootPath}}

  - action: overlay
    origin: idbloader.img
    destination: {{$ubootPath}}/idbloader.img

  - action: overlay
    origin: uboot.img
    destination: {{$ubootPath}}/uboot.img

  - action: overlay
    origin: trust.img
    destination: {{$ubootPath}}/trust.img

  - action: overlay
    origin: kernel.deb
    destination: /kernel.deb

84 85 86 87
  - action: overlay
    origin: mesa.zip
    destination: /mesa.zip

Rohan Garg's avatar
Rohan Garg committed
88 89 90 91
  - action: run
    chroot: true
    command: dpkg -i /kernel.deb && rm /kernel.deb

92 93
  - action: run
    chroot: true
94
    command: unzip /mesa.zip -d / && rm /mesa.zip && cp -aR /artifacts/* / && ldconfig && rm -rf /artifacts
95

96 97 98 99
  - action: run
    chroot: true
    script: scripts/setup-user.sh

Rohan Garg's avatar
Rohan Garg committed
100 101 102 103
  - action: run
    chroot: true
    command: systemctl enable weston

104 105 106 107 108
  - action: run
    description: Set hostname
    chroot: true
    command: echo debian > /etc/hostname

Rohan Garg's avatar
Rohan Garg committed
109 110 111 112 113 114 115 116 117 118 119 120 121 122
  - action: raw
    origin: filesystem
    source: {{$ubootPath}}/idbloader.img
    offset: '{{ sector 64 }}'

  - action: raw
    origin: filesystem
    source: {{$ubootPath}}/uboot.img
    offset: '{{ sector 16384 }}'

  - action: raw
    origin: filesystem
    source: {{$ubootPath}}/trust.img
    offset: '{{ sector 24576 }}'