mirror of
https://gitlab.com/alemaire/image-specs.git
synced 2025-01-11 04:53:31 +00:00
commit
b785c4837f
41
raspi3.yaml
41
raspi3.yaml
@ -12,29 +12,31 @@ steps:
|
|||||||
device: "{{ output }}"
|
device: "{{ output }}"
|
||||||
start: 0%
|
start: 0%
|
||||||
end: 20%
|
end: 20%
|
||||||
part-tag: boot-part
|
tag: /boot
|
||||||
|
|
||||||
- mkpart: primary
|
- mkpart: primary
|
||||||
device: "{{ output }}"
|
device: "{{ output }}"
|
||||||
start: 20%
|
start: 20%
|
||||||
end: 100%
|
end: 100%
|
||||||
part-tag: root-part
|
tag: /
|
||||||
|
|
||||||
|
- kpartx: "{{ output }}"
|
||||||
|
|
||||||
- mkfs: vfat
|
- mkfs: vfat
|
||||||
partition: boot-part
|
partition: /boot
|
||||||
label: RASPIFIRM
|
label: RASPIFIRM
|
||||||
|
|
||||||
- mkfs: ext4
|
- mkfs: ext4
|
||||||
partition: root-part
|
partition: /
|
||||||
label: RASPIROOT
|
label: RASPIROOT
|
||||||
|
|
||||||
- mount: root-part
|
- mount: /
|
||||||
fs-tag: root-fs
|
|
||||||
|
|
||||||
- mount: boot-part
|
- mount: /boot
|
||||||
mount-on: root-fs
|
mount-on: /
|
||||||
dirname: '/boot/firmware'
|
dirname: '/boot/firmware'
|
||||||
fs-tag: boot-fs
|
|
||||||
|
- unpack-rootfs: /
|
||||||
|
|
||||||
# We need to use Debian buster (currently testing) instead of Debian stretch
|
# We need to use Debian buster (currently testing) instead of Debian stretch
|
||||||
# (currently stable) for:
|
# (currently stable) for:
|
||||||
@ -51,19 +53,21 @@ steps:
|
|||||||
# required by the WiFi driver.
|
# required by the WiFi driver.
|
||||||
- qemu-debootstrap: buster
|
- qemu-debootstrap: buster
|
||||||
mirror: http://deb.debian.org/debian
|
mirror: http://deb.debian.org/debian
|
||||||
target: root-fs
|
target: /
|
||||||
arch: arm64
|
arch: arm64
|
||||||
components:
|
components:
|
||||||
- main
|
- main
|
||||||
- contrib
|
- contrib
|
||||||
- non-free
|
- non-free
|
||||||
|
unless: rootfs_unpacked
|
||||||
|
|
||||||
# TODO(https://bugs.debian.org/877855): remove this workaround once
|
# TODO(https://bugs.debian.org/877855): remove this workaround once
|
||||||
# debootstrap is fixed
|
# debootstrap is fixed
|
||||||
- chroot: root-fs
|
- chroot: /
|
||||||
shell: |
|
shell: |
|
||||||
echo 'deb http://deb.debian.org/debian buster main contrib non-free' > /etc/apt/sources.list
|
echo 'deb http://deb.debian.org/debian buster main contrib non-free' > /etc/apt/sources.list
|
||||||
apt-get update
|
apt-get update
|
||||||
|
unless: rootfs_unpacked
|
||||||
|
|
||||||
- apt: install
|
- apt: install
|
||||||
packages:
|
packages:
|
||||||
@ -76,7 +80,11 @@ steps:
|
|||||||
- wpasupplicant
|
- wpasupplicant
|
||||||
- raspi3-firmware
|
- raspi3-firmware
|
||||||
- linux-image-arm64
|
- linux-image-arm64
|
||||||
fs-tag: root-fs
|
tag: /
|
||||||
|
unless: rootfs_unpacked
|
||||||
|
|
||||||
|
- cache-rootfs: /
|
||||||
|
unless: rootfs_unpacked
|
||||||
|
|
||||||
- shell: |
|
- shell: |
|
||||||
echo "rpi3" > "${ROOT?}/etc/hostname"
|
echo "rpi3" > "${ROOT?}/etc/hostname"
|
||||||
@ -108,23 +116,24 @@ steps:
|
|||||||
|
|
||||||
Please change the root password by running passwd
|
Please change the root password by running passwd
|
||||||
EOT
|
EOT
|
||||||
root-fs: root-fs
|
root-fs: /
|
||||||
|
|
||||||
# Clean up archive cache (likely not useful) and lists (likely outdated) to
|
# Clean up archive cache (likely not useful) and lists (likely outdated) to
|
||||||
# reduce image size by several hundred megabytes.
|
# reduce image size by several hundred megabytes.
|
||||||
- chroot: root-fs
|
- chroot: /
|
||||||
shell: |
|
shell: |
|
||||||
apt-get clean
|
apt-get clean
|
||||||
rm -rf /var/lib/apt/lists
|
rm -rf /var/lib/apt/lists
|
||||||
|
|
||||||
# Modify the kernel commandline we take from the firmware to boot from
|
# Modify the kernel commandline we take from the firmware to boot from
|
||||||
# the partition labeled raspiroot instead of forcing it to mmcblk0p2
|
# the partition labeled raspiroot instead of forcing it to mmcblk0p2
|
||||||
- chroot: root-fs
|
- chroot: /
|
||||||
shell: |
|
shell: |
|
||||||
|
ls -aR /boot
|
||||||
sed -i 's/.dev.mmcblk0p2/LABEL=RASPIROOT/' /boot/firmware/cmdline.txt
|
sed -i 's/.dev.mmcblk0p2/LABEL=RASPIROOT/' /boot/firmware/cmdline.txt
|
||||||
|
|
||||||
# TODO(https://github.com/larswirzenius/vmdb2/issues/24): remove once vmdb
|
# TODO(https://github.com/larswirzenius/vmdb2/issues/24): remove once vmdb
|
||||||
# clears /etc/resolv.conf on its own.
|
# clears /etc/resolv.conf on its own.
|
||||||
- shell: |
|
- shell: |
|
||||||
rm "${ROOT?}/etc/resolv.conf"
|
rm "${ROOT?}/etc/resolv.conf"
|
||||||
root-fs: root-fs
|
root-fs: /
|
||||||
|
Loading…
Reference in New Issue
Block a user