~mil/sxmo-image-builder

8eb12bfca390ba470bcf73a9699694e1462268be — Miles Alan 10 months ago 123e242 master
Add note about repository location move
2 files changed, 1 insertions(+), 53 deletions(-)

D .build.yml
M README.md
D .build.yml => .build.yml +0 -52
@@ 1,52 0,0 @@
image: alpine/3.12
packages: [coreutils, procps, py3-requests, xz]

environment:
  #DEVICE: pinebookpro
  DEVICE: pinephone
  VERSION: 0.1.10

secrets:
  - bcf1e9cf-4494-40f4-a725-87088afbf3b5
  - 1645c273-d954-436f-8898-11fc8cad4601

sources:
  - "https://gitlab.com/postmarketOS/pmaports.git/"
  - "https://gitlab.com/postmarketOS/pmbootstrap.git/"

tasks:
  - setup_device: |
      sed -i s/DEVICE/$DEVICE/ sxmo-image-builder/pmbootstrap.cfg

  - setup_binfmt: |
      sudo modprobe binfmt_misc
      sudo mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
    
  - setup_pmbootstrap: |
      mkdir -p ~/.config && cp sxmo-image-builder/pmbootstrap.cfg ~/.config/
      yes "" | ./pmbootstrap/pmbootstrap.py  --aports=$PWD/pmaports -q init   

  - build_image: |
      ./pmbootstrap/pmbootstrap.py chroot -b aarch64 ls
      ./pmbootstrap/pmbootstrap.py -mp=http://postmarketos1.brixit.nl/postmarketos/ update --arch aarch64 
      yes "mo" | ./pmbootstrap/pmbootstrap.py --details-to-stdout -mp=http://postmarketos1.brixit.nl/postmarketos/ install
      ./pmbootstrap/pmbootstrap.py export images
      sudo losetup /dev/loop0 images/pine64-$DEVICE.img
      sudo mkdir bootpart
      sudo mount -o loop /dev/loop0p1 bootpart
      sudo umount bootpart

  - compress_image: |
      du -h $(readlink images/pine64-$DEVICE.img)
      date
      sh -c 'xz -c $(readlink images/pine64-$DEVICE.img) > /home/build/compressed.img.xz'
      du -h /home/build/compressed.img.xz
      date
      
  - upload_image: |
      export TIME=$(date +%Y%m%d)
      ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $(cat ~/.user_at_server) "mkdir -p /home/public/images.lrdu.org/$DEVICE/"
      scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null /home/build/compressed.img.xz $(cat ~/.user_at_server):/home/public/images.lrdu.org/$DEVICE/sxmo_$DEVICE-sd.$VERSION-$TIME.img.xz

  - set_htaccess: |
      scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null sxmo-image-builder/.htaccess $(cat ~/.user_at_server):/home/public/images.lrdu.org/.htaccess

M README.md => README.md +1 -1
@@ 1,6 1,6 @@
# Sxmo image builder

[![builds.sr.ht status](https://builds.sr.ht/~mil/sxmo-image-builder.svg)](https://builds.sr.ht/~mil/sxmo-image-builder?)
**This project has moved to [git.sr.ht/~sxmo-infra/sxmo-image-builder](http://git.sr.ht/~sxmo-infra/sxmo-image-builder).**

Builds images through sr.ht CI that can be dd'd directly to an sd card.
Uses pmbootstrap to build the image for the pinephone.