Warning, /plasma-bigscreen/bigscreen-debos-image-rpi4/recipes/rpi4.yml is written in an unsupported language. File is not indexed.

0001 {{- $architecture := or .architecture "arm64" -}}
0002 {{- $firmware_version := or .firmware_version "stable" -}}
0003 {{ $suite :=  or .suite "bionic" }}
0004 {{- $image := or .image "mycroft-mark2-rpi4.img" -}}
0005 
0006 architecture: {{ $architecture }}
0007 
0008 actions:
0009     # Hardware specific parts
0010   - action: download
0011     description: Fetch latest kernel ci build
0012 {{ if eq $architecture "armhf" }}
0013     url: https://bshah.in/linux-pi4-armhf.zip
0014 {{ else }}
0015     url: https://bshah.in/linux-pi4-5.4-arm64.zip
0016 {{ end }}
0017     name: kernel
0018     filename: kernel.zip
0019     unpack: true
0020     compression: zip
0021 
0022   # Download all needed proprietary stuff first
0023   - action: download
0024     description: Download latest version of the firmware from GitHub
0025     url: https://github.com/raspberrypi/firmware/archive/{{ $firmware_version }}.tar.gz
0026     unpack: true
0027     name: firmware
0028 
0029   - action: download
0030     description: Download latest version of the nonfree firmware from GitHub
0031     url: https://github.com/RPi-Distro/firmware-nonfree/archive/buster.tar.gz
0032     unpack: true
0033     name: firmwarenonfree
0034 
0035   - action: run
0036     description: Add ubuntu-x-swat ppa
0037     chroot: true
0038     command: add-apt-repository ppa:ubuntu-x-swat/updates -yn
0039 
0040 {{ if eq $suite "bionic" }}
0041   - action: run
0042     description: Add ubuntu-raspi2 ppa
0043     chroot: true
0044     command: add-apt-repository ppa:ubuntu-raspi2/ppa -yn
0045 {{ end }}
0046 
0047   - action: overlay
0048     origin: kernel
0049     source: .
0050     destination: /var/tmp/
0051 
0052   # add firmware
0053   - action: overlay
0054     origin: firmware
0055     source: firmware-{{ $firmware_version }}/boot
0056     destination: /boot/firmware
0057 
0058   - action: run
0059     chroot: true
0060     command: rm -rvf /boot/firmware/kernel*.img /boot/firmware/*.dtb /boot/firmware/overlays
0061 
0062   - action: run
0063     origin: kernel
0064     chroot: true
0065     description: Install kernel
0066     label: dpkg
0067     command: dpkg -i /var/tmp/*.deb && rm /var/tmp/* -r
0068 
0069   - action: run
0070     description: Copy dtb to boot firmware partition
0071     chroot: true
0072 {{ if eq $architecture "armhf" }}
0073     command: mkdir -p /boot/firmware/overlays && cp -v /usr/lib/linux-image-*/*.dtb /boot/firmware && cp -v /usr/lib/linux-image-*/overlays/* /boot/firmware/overlays/
0074 {{ else }}
0075     command: mkdir -p /boot/firmware/overlays && cp -v /usr/lib/linux-image-*/broadcom/*.dtb /boot/firmware && cp -v /usr/lib/linux-image-*/overlays/* /boot/firmware/overlays/
0076 {{ end }}
0077 
0078   - action: overlay
0079 {{ if eq $architecture "armhf" }}
0080     source: ../overlays/rpi4-config-armhf
0081 {{ else }}
0082     source: ../overlays/rpi4-config
0083 {{ end }}
0084     destination: /boot/firmware
0085 
0086   - action: overlay
0087     origin: firmwarenonfree
0088     source: firmware-nonfree-buster
0089     destination: /var/tmp
0090 
0091   - action: run
0092     description: Copy broadcom firmware
0093     chroot: true
0094     command: cp -r /var/tmp/brcm/brcmfmac43455-sdio.* /lib/firmware/brcm/
0095 
0096   - action: run
0097     description: Copy kernel to where bootloader expects it
0098     chroot: true
0099     script: ../scripts/01-pi_copy_kernel.sh {{ $architecture }}
0100 
0101   - action: image-partition
0102     imagename: {{ $image }}
0103     imagesize: 10GB
0104     partitiontype: msdos
0105     mountpoints:
0106       - mountpoint: /
0107         partition: root
0108       - mountpoint: /boot/firmware
0109         partition: firmware
0110         options: [ x-systemd.automount ]
0111     partitions:
0112       - name: firmware
0113         fs: fat32
0114         start: 0%
0115         end: 64MB
0116       - name: root
0117         fs: ext4
0118         start: 64MB
0119         end: 100%
0120         flags: [boot]
0121 
0122   - action: run
0123     description: Set hostname
0124     chroot: true
0125     command: echo raspberrypi4 > /etc/hostname
0126