From 877a37d85b44df6b22ac9c853e0944dc9151e670 Mon Sep 17 00:00:00 2001 From: Philippe Coval Date: Wed, 28 Feb 2024 23:00:53 +0100 Subject: [PATCH] extra: Bump to debian-12 and support efi image for amd64 Bug: https://github.com/adoptware/pinball/issues/42 Origin: https://github.com/adoptware/pinball/pull/43 Signed-off-by: Philippe Coval Change-Id: Ia9d7b91872c0519b162f6ffc793e2747fa00d0ac --- extra/Makefile | 6 +-- extra/debos/machine/generic/actions.yaml | 38 +++++++++---------- extra/debos/machine/generic/image.yaml | 14 +++++-- .../debos/machine/generic/pinball-amd64.yaml | 6 ++- extra/debos/machine/generic/pinball-i386.yaml | 6 ++- extra/debos/machine/rpi_2/actions.yaml | 2 +- extra/debos/machine/rpi_2/pinball-rpi_2.yaml | 2 +- extra/debos/machine/rpi_3_32b/actions.yaml | 2 +- extra/debos/machine/rpi_3_32b/image.yaml | 2 +- .../machine/rpi_3_32b/pinball-rpi_3_32b.yaml | 2 +- extra/debos/machine/rpi_3_64b/actions.yaml | 2 +- extra/debos/machine/rpi_3_64b/image.yaml | 2 +- .../machine/rpi_3_64b/pinball-rpi_3_64b.yaml | 2 +- extra/debos/machine/rpi_4/actions.yaml | 2 +- extra/debos/machine/rpi_4/image.yaml | 2 +- extra/debos/machine/rpi_4/pinball-rpi_4.yaml | 2 +- extra/debos/pinball.yaml | 10 ++++- .../pinball/etc/pinball/pinball-session.sh | 7 +++- .../pinball/etc/pinball/pinball.env.sh | 2 +- .../pinball/etc/pinball/weston.service | 2 +- 20 files changed, 68 insertions(+), 45 deletions(-) diff --git a/extra/Makefile b/extra/Makefile index a91ef554..04fbf424 100644 --- a/extra/Makefile +++ b/extra/Makefile @@ -15,7 +15,7 @@ architecture?=i386 mirror?=https://deb.debian.org/debian scratchsize?=4G -suite?=bullseye +suite?=bookworm flags?=-v flags+=--scratchsize=${scratchsize} @@ -82,11 +82,11 @@ rpi_4: gzip -f -9 $< stat -c '%y: %n' $@ +port?=55522 run: pinball-i386-generic.img kvm -m 512 \ -device e1000,netdev=net0 \ - -netdev user,id=net0,hostfwd=tcp::55522-:22 \ - -net nic,model=ne2k_pci -net user \ + -netdev user,id=net0,hostfwd=tcp::${port}-:22 \ -machine pc $< cleanall: diff --git a/extra/debos/machine/generic/actions.yaml b/extra/debos/machine/generic/actions.yaml index 6ca4ea46..fb5765ee 100644 --- a/extra/debos/machine/generic/actions.yaml +++ b/extra/debos/machine/generic/actions.yaml @@ -1,7 +1,9 @@ {{- $architecture := or .architecture "i386" -}} +{{- $bootloader := or .bootloader "grub-pc" -}} {{- $machine := or .machine "generic" -}} +{{- $partitiontype := or .partitiontype "msdos" -}} {{- $project := or .project "pinball" -}} -{{- $suite := or .suite "bullseye" -}} +{{- $suite := or .suite "bookworm" -}} {{- $image := or .image (printf "%s-%s-%s.img" $project $architecture $machine) -}} architecture: {{$architecture}} @@ -11,33 +13,29 @@ actions: - action: image-partition imagename: {{$image}} imagesize: 2GB - partitiontype: msdos + partitiontype: {{$partitiontype}} mountpoints: - mountpoint: / partition: root + {{if eq $bootloader "grub-efi"}} + - mountpoint: /boot/efi + partition: efi + flags: [ boot ] + {{end}} partitions: + {{if eq $bootloader "grub-efi"}} + - name: efi + fs: vfat + start: 0% + end: 128MB + {{end}} - name: root fs: ext4 - start: 512 + start: 128MB end: 100% - flags: [boot] - action: apt packages: - {{if eq $architecture "i386" "amd64"}} - - grub-pc - {{end}} - {{if eq $suite "unstable" "sid" "testing" "bullseye"}} - - linux-image-generic - {{else}} - {{if eq $suite "buster" "stable"}} - {{if eq $architecture "i386"}} - - linux-image-686 - {{else}} - - linux-image-{{$architecture}} - {{end}} - {{end}} - {{end}} + - {{$bootloader}} + - linux-image-{{$machine}} - firmware-linux-free - - firmware-linux-nonfree - diff --git a/extra/debos/machine/generic/image.yaml b/extra/debos/machine/generic/image.yaml index ccfae168..483d4fea 100644 --- a/extra/debos/machine/generic/image.yaml +++ b/extra/debos/machine/generic/image.yaml @@ -1,4 +1,5 @@ {{- $architecture := or .architecture "i386" -}} +{{- $bootloader := or .bootloader "grub-pc" -}} architecture: {{$architecture}} @@ -7,7 +8,14 @@ actions: description: Install bootloader chroot: true command: > -{{if eq $architecture "i386" "amd64"}} - update-grub - && grub-install /dev/disk/by-id/virtio-fakedisk-0 +{{if eq $architecture "i386"}} + update-grub + && grub-install /dev/disk/by-id/virtio-fakedisk-0 +{{else}} +{{if eq $architecture "amd64"}} + update-grub + && grub-install --target=x86_64-efi --no-nvram + && mkdir -p /boot/efi/EFI/BOOT + && cp /boot/efi/EFI/debian/grubx64.efi /boot/efi/EFI/BOOT/BOOTX64.EFI +{{end}} {{end}} diff --git a/extra/debos/machine/generic/pinball-amd64.yaml b/extra/debos/machine/generic/pinball-amd64.yaml index 8e7046c5..909a113d 100644 --- a/extra/debos/machine/generic/pinball-amd64.yaml +++ b/extra/debos/machine/generic/pinball-amd64.yaml @@ -1,7 +1,9 @@ {{- $architecture := or .architecture "amd64" -}} +{{- $bootloader := or .bootloader "grub-efi" -}} {{- $machine := or .machine "generic" -}} {{- $mirror := or .mirror "https://deb.debian.org/debian" -}} -{{- $suite := or .suite "bullseye" -}} +{{- $partitiontype := or .partitiontype "gpt" -}} +{{- $suite := or .suite "bookworm" -}} architecture: {{$architecture}} @@ -11,6 +13,8 @@ actions: recipe: ../../pinball.yaml variables: architecture: {{$architecture}} + bootloader: {{$bootloader}} machine: {{$machine}} mirror: {{$mirror}} + partitiontype: {{$partitiontype}} suite: {{$suite}} diff --git a/extra/debos/machine/generic/pinball-i386.yaml b/extra/debos/machine/generic/pinball-i386.yaml index 7f968556..842a6d4f 100644 --- a/extra/debos/machine/generic/pinball-i386.yaml +++ b/extra/debos/machine/generic/pinball-i386.yaml @@ -1,7 +1,9 @@ {{- $architecture := or .architecture "i386" -}} +{{- $bootloader := or .bootloader "grub-pc" -}} {{- $machine := or .machine "generic" -}} {{- $mirror := or .mirror "https://deb.debian.org/debian" -}} -{{- $suite := or .suite "bullseye" -}} +{{- $partitiontype := or .partitiontype "msdos" -}} +{{- $suite := or .suite "bookworm" -}} architecture: {{$architecture}} @@ -11,6 +13,8 @@ actions: recipe: ../../pinball.yaml variables: architecture: {{$architecture}} + bootloader: {{$bootloader}} machine: {{$machine}} mirror: {{$mirror}} + partitiontype: {{$partitiontype}} suite: {{$suite}} diff --git a/extra/debos/machine/rpi_2/actions.yaml b/extra/debos/machine/rpi_2/actions.yaml index 581acac2..eab254fe 100644 --- a/extra/debos/machine/rpi_2/actions.yaml +++ b/extra/debos/machine/rpi_2/actions.yaml @@ -3,7 +3,7 @@ {{- $kernel := or .kernel "linux-image-armmp" -}} {{- $machine := or .machine "rpi_2" -}} {{- $project := or .project "pinball" -}} -{{- $suite := or .suite "bullseye" -}} +{{- $suite := or .suite "bookworm" -}} {{- $uboot_machine := or .uboot_machine (printf "%s" $machine) -}} {{- $image := or .image (printf "%s-%s-%s.img" $project $architecture $machine) -}} diff --git a/extra/debos/machine/rpi_2/pinball-rpi_2.yaml b/extra/debos/machine/rpi_2/pinball-rpi_2.yaml index edac3c95..d2370351 100644 --- a/extra/debos/machine/rpi_2/pinball-rpi_2.yaml +++ b/extra/debos/machine/rpi_2/pinball-rpi_2.yaml @@ -1,6 +1,6 @@ {{- $architecture := or .architecture "armhf" -}} {{- $machine := or .machine "rpi_2" -}} -{{- $suite := or .suite "bullseye" -}} +{{- $suite := or .suite "bookworm" -}} {{- $uboot_machine := or .uboot_machine "rpi_2" -}} architecture: {{$architecture}} diff --git a/extra/debos/machine/rpi_3_32b/actions.yaml b/extra/debos/machine/rpi_3_32b/actions.yaml index 34dc1325..acec08e0 100644 --- a/extra/debos/machine/rpi_3_32b/actions.yaml +++ b/extra/debos/machine/rpi_3_32b/actions.yaml @@ -1,7 +1,7 @@ {{- $architecture := or .architecture "armhf" -}} {{- $kernel := or .kernel "linux-image-armmp" -}} {{- $machine := or .machine "rpi_3_32b" -}} -{{- $suite := or .suite "bullseye" -}} +{{- $suite := or .suite "bookworm" -}} {{- $uboot_machine := or .uboot_machine "rpi_3_32b" -}} architecture: {{$architecture}} diff --git a/extra/debos/machine/rpi_3_32b/image.yaml b/extra/debos/machine/rpi_3_32b/image.yaml index 5dbd5377..16c4ed4c 100644 --- a/extra/debos/machine/rpi_3_32b/image.yaml +++ b/extra/debos/machine/rpi_3_32b/image.yaml @@ -1,7 +1,7 @@ {{- $architecture := or .architecture "armhf" -}} {{- $kernel := or .kernel "linux-image-armmp" -}} {{- $machine := or .machine "rpi_3_32b" -}} -{{- $suite := or .suite "bullseye" -}} +{{- $suite := or .suite "bookworm" -}} architecture: {{$architecture}} diff --git a/extra/debos/machine/rpi_3_32b/pinball-rpi_3_32b.yaml b/extra/debos/machine/rpi_3_32b/pinball-rpi_3_32b.yaml index ab1f2ca2..1e6e0ea1 100644 --- a/extra/debos/machine/rpi_3_32b/pinball-rpi_3_32b.yaml +++ b/extra/debos/machine/rpi_3_32b/pinball-rpi_3_32b.yaml @@ -1,7 +1,7 @@ {{- $architecture := or .architecture "armhf" -}} {{- $image := or .image "pinball-rpi_3_32b.img" -}} {{- $machine := or .machine "rpi_3_32b" -}} -{{- $suite := or .suite "bullseye" -}} +{{- $suite := or .suite "bookworm" -}} {{- $uboot_machine := or .uboot_machine "rpi_3_32b" -}} architecture: {{$architecture}} diff --git a/extra/debos/machine/rpi_3_64b/actions.yaml b/extra/debos/machine/rpi_3_64b/actions.yaml index 9e3de833..d1c4ede6 100644 --- a/extra/debos/machine/rpi_3_64b/actions.yaml +++ b/extra/debos/machine/rpi_3_64b/actions.yaml @@ -1,7 +1,7 @@ {{- $architecture := or .architecture "arm64" -}} {{- $kernel := or .kernel "linux-image-generic" -}} {{- $machine := or .machine "rpi_3_64b" -}} -{{- $suite := or .suite "bullseye" -}} +{{- $suite := or .suite "bookworm" -}} {{- $uboot_machine := or .uboot_machine "rpi_3" -}} architecture: {{$architecture}} diff --git a/extra/debos/machine/rpi_3_64b/image.yaml b/extra/debos/machine/rpi_3_64b/image.yaml index 21307b91..1c87f56f 100644 --- a/extra/debos/machine/rpi_3_64b/image.yaml +++ b/extra/debos/machine/rpi_3_64b/image.yaml @@ -1,7 +1,7 @@ {{- $architecture := or .architecture "arm64" -}} {{- $kernel := or .kernel "linux-image-generic" -}} {{- $machine := or .machine "rpi_3_64b" -}} -{{- $suite := or .suite "bullseye" -}} +{{- $suite := or .suite "bookworm" -}} architecture: {{$architecture}} diff --git a/extra/debos/machine/rpi_3_64b/pinball-rpi_3_64b.yaml b/extra/debos/machine/rpi_3_64b/pinball-rpi_3_64b.yaml index aa943889..a3278925 100644 --- a/extra/debos/machine/rpi_3_64b/pinball-rpi_3_64b.yaml +++ b/extra/debos/machine/rpi_3_64b/pinball-rpi_3_64b.yaml @@ -2,7 +2,7 @@ {{- $image := or .image "pinball-rpi_3_64b.img" -}} {{- $kernel := or .kernel "linux-image-generic" -}} {{- $machine := or .machine "rpi_3_64b" -}} -{{- $suite := or .suite "bullseye" -}} +{{- $suite := or .suite "bookworm" -}} {{- $uboot_machine := or .uboot_machine "rpi_3" -}} architecture: {{$architecture}} diff --git a/extra/debos/machine/rpi_4/actions.yaml b/extra/debos/machine/rpi_4/actions.yaml index d12c1d12..6b898165 100644 --- a/extra/debos/machine/rpi_4/actions.yaml +++ b/extra/debos/machine/rpi_4/actions.yaml @@ -1,7 +1,7 @@ {{- $architecture := or .architecture "arm64" -}} {{- $kernel := or .kernel "linux-image-generic" -}} {{- $machine := or .machine "rpi_4" -}} -{{- $suite := or .suite "bullseye" -}} +{{- $suite := or .suite "bookworm" -}} {{- $uboot_machine := or .uboot_machine "rpi4" -}} architecture: {{$architecture}} diff --git a/extra/debos/machine/rpi_4/image.yaml b/extra/debos/machine/rpi_4/image.yaml index d48a39ec..250d4010 100644 --- a/extra/debos/machine/rpi_4/image.yaml +++ b/extra/debos/machine/rpi_4/image.yaml @@ -1,7 +1,7 @@ {{- $architecture := or .architecture "arm64" -}} {{- $kernel := or .kernel "linux-image-generic" -}} {{- $machine := or .machine "rpi_4" -}} -{{- $suite := or .suite "bullseye" -}} +{{- $suite := or .suite "bookworm" -}} architecture: {{$architecture}} diff --git a/extra/debos/machine/rpi_4/pinball-rpi_4.yaml b/extra/debos/machine/rpi_4/pinball-rpi_4.yaml index a18d0346..243b8aae 100644 --- a/extra/debos/machine/rpi_4/pinball-rpi_4.yaml +++ b/extra/debos/machine/rpi_4/pinball-rpi_4.yaml @@ -1,7 +1,7 @@ {{- $architecture := or .architecture "arm64" -}} {{- $machine := or .machine "rpi_4" -}} {{- $mirror := or .mirror "https://deb.debian.org/debian" -}} -{{- $suite := or .suite "bullseye" -}} +{{- $suite := or .suite "bookworm" -}} {{- $uboot_machine := or .uboot_machine "rpi_4" -}} architecture: {{$architecture}} diff --git a/extra/debos/pinball.yaml b/extra/debos/pinball.yaml index f1a6289a..415e2afb 100644 --- a/extra/debos/pinball.yaml +++ b/extra/debos/pinball.yaml @@ -3,7 +3,9 @@ {{- $machine := or .machine "generic" -}} {{- $mirror := or .mirror "https://deb.debian.org/debian" -}} {{- $project := or .project "pinball" -}} -{{- $suite := or .suite "bullseye" -}} +{{- $suite := or .suite "bookworm" -}} +{{- $bootloader := or .bootloader "grub-pc" -}} +{{- $partitiontype := or .partitiontype "msdos" -}} {{- $uboot_machine := or .uboot_machine "generic" -}} {{- $image := or .image (printf "%s-%s-%s.img" $project $architecture $machine) -}} @@ -15,6 +17,7 @@ actions: components: - main - non-free + - non-free-firmware mirror: {{$mirror}} variant: minbase @@ -24,7 +27,7 @@ actions: cat /etc/os-release cat<&1 | tee /var/log/weston.log" +ExecStart=/usr/bin/weston --tty=2 [Install] Alias=display-manager.service