174 Commits

Author SHA1 Message Date
Heinrich Schuchardt
a3a51beeaf riscv: add pre-installed image for Milk-V Mars
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-04-21 18:05:41 +02:00
Simon Poirier
b4028cf53c Re-enable disk-image-uefi for armhf. (LP:#2062024)
This reverts commit 4f51ff45 (fix: Remove UEFI booting armhf, 2024-03-12).
2024-04-17 10:46:36 -04:00
John Chittum
4f51ff4521
fix: Remove UEFI booting armhf
short-term fix, as grub2 for armhf has issues. we are investigating if
we still need an armhf VM, as there is no armhf server hardware
available.
2024-03-12 09:15:12 -04:00
Philip Roche
e65a499069 fix: Set the required debconf settings to allow for non interactive grub updates in cloud images (LP: #2054103)
As part of addressing LP: #2054103 [1] an update to grub-pc added a feature to be able to ensure that grub-pc
installation can happen noninteractively on cloud images.

This change is equivalent to running

```
debconf-set-selections grub-pc grub-efi/cloud_style_installation boolean true
debconf-set-selections grub-pc grub-pc/cloud_style_installation boolean true
```

These were introduced optionally to determine the install device using
`grub-probe` dynamically instead of having to fill the `grub-pc/install-devices`
debconf entry.

[1] https://bugs.launchpad.net/cloud-images/+bug/2054103
2024-02-23 13:54:44 +00:00
Heinrich Schuchardt
c34e3dccd7 riscv: install u-boot-starfive on VisionFive 2 preinstalled image
The StarFive VisionFive 2 board can boot from SPI flash or SD-card.
Install U-Boot to the SD card.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-08 11:24:51 +01:00
Michael Hudson-Doyle
ffe99d4008 Remove magic-proxy and all references to it as it is not used by any builds of any release newer than 18.04. 2024-01-29 14:51:54 +13:00
Steve Langasek
4a44b56857 Drop support for building armhf+raspi images; as of noble these are arm64-only. 2023-12-08 18:38:40 -08:00
Steve Langasek
4fb141bbec Merge remote-tracking branch 'dbungert/adt-hang-vagrant' into ubuntu/master 2023-12-03 21:20:22 -08:00
Brian Murray
22a26cc97a Remove part of a comment which is incorrect 2023-10-31 00:01:48 -07:00
Heinrich Schuchardt
21321ac018 arm: fix console parameter for ARM cloud-images
On armhf and arm64 the QEMU virt machine provides the serial console as an
emulated AMBA PrimeCell UART which the kernel refers to as /dev/ttyAMA0.

Consider this when constructing GRUB_CMDLINE_LINUX_DEFAULT in file
/etc/default/grub.d/50-cloudimg-settings.cfg (LP: #2036730).

Reviewed-by: Gauthier Jolly <gauthier.jolly@canonical.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-10-18 10:20:28 +02:00
Steve Langasek
fdf0091580 Merge remote-tracking branch 'philroche/bugfix/ubuntu-cpc-project-images-not-producing-all-expected-filelists-LP-2033751' into ubuntu/master 2023-10-02 17:00:28 -07:00
Philip Roche
1a884c1427 fix: Ensure that grub/shim package installs do not install recommends for minimized ubuntu-cpc image builds (LP: #2037075)
minimized cloud image policy, introduced in version 23.10.16, is to not install recommends for any package
installs during build. This is to keep the image as small as possible. This also extends to
the grub related packages.

This solves the problems detailed in LP: #2037075 and aligns other arches more with amd64 install of
grub/shim packages for both minimized and non minimized ubuntu-cpc cloud image builds.
2023-09-26 18:08:09 +01:00
Steve Langasek
16450169d9 Fix the subarch used in the hook to identify images for sifive unmatched. LP: #2037060. 2023-09-22 10:58:47 -07:00
Steve Langasek
6820ef310c Merge remote-tracking branch 'toabctl/boot-partition' into ubuntu/master 2023-09-19 08:20:12 -07:00
Philip Roche
8333dbac7a fix: armhf flavour for 6.5+ kernel is now generic (LP: #2033677)
With the introduction of the 6.5 kernel for mantic on 13th September ago we are seeing image build failures
on the armhf builds. The build failure was `No kernel output for generic-lpae!`.

Introduced in the 6.4 kernel and therefore now also in 6.5 there is no generic-lpae flavor anymore. it's just generic now.

As such this commit updates the expected flavour for armhf to generic.
2023-09-15 12:00:15 +01:00
Gauthier Jolly
51d4756700 ubuntu-cpc: increase arm64 image size
This is needed following the addition of the new boot partition. This
also gives us the opportunity to refactor the logic and use a case
statement instead of ifs
2023-09-14 22:18:31 +02:00
Gauthier Jolly
a8b2a9b01e ubuntu-cpc: create a partition for /boot on all UEFI images
In order to support better support Full Disk Encryption on the clouds,
the boot assets have to sit on an un-encrypted partition. We've tried
mounting the ESP on /boot before but it didn't work as /boot has to
support linking for DPKG to work and the ESP has to be FAT.
2023-09-14 09:50:27 +02:00
Philip Roche
57153243a6 fix: disk-image-non-cloud ubuntu-cpc build target now provides manifest and filelist (LP: #2033751)
These were being created so now they can be downloaded post launchpad image build
2023-09-01 12:21:39 +01:00
Philip Roche
7dd9b1bd84 fix: Create .filelist in ubuntu-cpc project binary hooks that do not use create_manifest shared function (LP: #2033751)
ubuntu-cpc project binary hooks were not all producing .filelist files as they were not using
the create_manifest shared function.

This commit ensures the disk-image-uefi, disk-image-ppc64el and disk-image-uefi-non-cloud hooks create
a filelist during build.
2023-09-01 12:21:34 +01:00
Łukasz 'sil2100' Zemczak
8a9ba050c3 Make canary images default for Ubuntu. 2023-08-18 12:16:28 +02:00
Philip Roche
294a65452d fix: Ensure required dependencies are installed before trying grub-install (LP: #2031640)
As a result of not installing recommended packages the packages required to run `grub-install`
are no longer installed by default.

To ensure we can successfully run `grub-install` we install both `grub-pc` and `grub2-common`
packages.
2023-08-17 11:49:11 +01:00
Philip Roche
711c5c291f fix: Remove dangling symlink /boot/initrd.img.old if exists (LP: #2031640)
As a result of not installing recommended packages we have dangling symlink `/boot/initrd.img.old`

As per the preceding `/boot/initrd.img` cleanup. Cleanup of `/boot/initrd.img.old`
only happens if it is a dangling symlink.

These `rm` commands also have `--verbose` flags now to make it easier when debugging logs
2023-08-17 11:48:22 +01:00
Dan Bungert
91641eeeec cpc/hooks: fix hang when running adt locally
While attempting to run autopkgtest locally, the test stops at the
following command:
ssh-keygen -t ed25519 -C ubuntu_vagrant_insecure_key -b 4096 -f
/tmp/tmp.VuAfnsBv1G/vagrant_insecure_key

This is found in live-build/ubuntu-cpc/hooks.d/base/vagrant.binary

It appears to be waiting for a passphrase, as running that outside of
adt gives a more helpful "Enter passphrase" prompt.

Explicitly set the passphrase to empty with the `-N` argument.
2023-08-16 17:20:54 -06:00
Heinrich Schuchardt
fd75a28558 risc-v: increase loader 2 partition for VF2
EDK II is available for the StarFive VisionFive 2 board. As it is larger
than U-Boot we need to increase the size of the loader 2 partition to
accommodate it.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-08-01 16:06:00 +02:00
Michael Hudson-Doyle
d3dfb12f85 Actually fix live-build/ubuntu-cpc/hooks.d/base/disk-image.binary to not call force_boot_without_initramfs on s390x rather than disk-image-uefi.binary which obviously would never run on s390x. 2023-07-29 13:02:56 +12:00
Michael Hudson-Doyle
37341541b4 live-build/ubuntu-cpc/hooks.d/base/disk-image.binary: Do not call force_boot_without_initramfs on s390x. 2023-07-29 07:34:35 +12:00
Michael Hudson-Doyle
c42f2ef3b1 live-build/ubuntu-cpc/hooks.d/base/disk-image-*.binary: Fix invocations of force_boot_without_initramfs to pass "mountpoint" and not "${mountpoint}" (which actually worked on most arches for VERY BAD reasons but fails on s390x). 2023-07-29 07:33:22 +12:00
Utkarsh Gupta
06defc4348 Use ubuntu-cloud-minimal metapackage in minimized CPC images
Now that we have the cloud-minimal seed for minimized cloud
image builds, we should drop all the workarounds and hacks
we once needed when we were using the server seed. We can
directly use the new metapackage and get rid of the tasks and
other autoremoves, et al.
2023-07-19 16:36:35 +05:30
Dimitri John Ledkov
c18d3f75ad
Fixup up two more places with kvm removal.
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
2023-07-14 13:16:05 +01:00
Dimitri John Ledkov
731a0b49e3
Merge remote-tracking branch 'origin/xnox/deprecate-kvm' into ubuntu/master 2023-07-14 00:24:36 +01:00
Gauthier Jolly
2929ff092e Revert "ubuntu-cpc: Make the ESP 2GiB and mount it to /boot"
Revert this change for now as /boot then becomes a FAT partition which
breaks DPKG requirements[1]. This change is going to be re-evaluated and
maybe introduced in a different way.

This is not a clean revert because of 3282efb ("ubuntu-cpc: cleanup
disk-images-uefi.binary") which we want to keep.

[1] https://wiki.debian.org/Teams/Dpkg/FAQ#Q:_What_are_the_filesystem_requirements_by_dpkg.3F

This reverts commit 6a66666e0a5ab1ad96cb0e388f278aafbd012ffe.
2023-07-06 11:12:01 +02:00
Gauthier Jolly
a3307ebdb7 Revert "ubuntu-cpc: disable kernel and initramfs symlinks in /boot"
This reverts commit b20e894a9878837ed84f9db71997f68476d632b5.
2023-07-06 11:04:20 +02:00
Dimitri John Ledkov
dc59fe83ca Deprecate linux-kvm usage
Remove kvm-image altogether.

Previously for minimal image replace_kernel function replaced virtual
images with kvm, and called force_boot_without_initramfs. Now simply
call force_boot_without_initramfs for minimal image without replacing
kernel flavour.

This also means minimal images can now be built for arm64 and armhf.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
2023-07-04 12:58:03 +01:00
Gauthier Jolly
3282efb287 ubuntu-cpc: cleanup disk-images-uefi.binary
Remove all the logic that is not related to cloud-images. Non
cloud-images should use disk-image-uefi-non-cloud.binary
2023-06-28 12:03:42 +02:00
Łukasz 'sil2100' Zemczak
99189cc727 Merge branch 'cpc/riscv/install_grub' of git+ssh://git.launchpad.net/~gjolly/livecd-rootfs into ubuntu/master 2023-06-28 10:45:13 +02:00
Łukasz 'sil2100' Zemczak
95d6a004a6 Some minor tweaks to the changes done by xypron. 2023-06-28 10:42:27 +02:00
Heinrich Schuchardt
e14379f405 RISC-V: use GRUB on Unmatched board
Up to now we have used u-boot-menu for preinstalled images for the SiFive
HiFive Unmatched and Unleashed boards and GRUB for all other RISC-V images.
The choice was made because RISC-V GRUB was not available when the SiFive
boards where released.

Let the Unmatched and Unleashed board preinstalled images use GRUB.
Simplify the code.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-06-27 14:02:37 +02:00
Gauthier Jolly
bbedffe6ec ubuntu-cpc: fix images for hardware devices
Canonical Public Cloud's project seems a bad place to build images for
hardware devices however this is how things were done a we now need to
maintain this.
The recent change to mount the ESP on /boot breaks those images, instead
of adding more hacky things in the hook, create a dedicated target for
those images and use a different hook to build UEFI images.
2023-06-23 13:55:59 +02:00
Gauthier Jolly
946c5cf90c ubuntu-cpc: install grub-efi on riscv images
grub-efi-riscv64 is in the archive and edk2 support for riscv is being
merged upstream.
2023-06-23 13:28:50 +02:00
Gauthier Jolly
b20e894a98 ubuntu-cpc: disable kernel and initramfs symlinks in /boot
This is required by the new UEFI binary hook as we mount the ESP on
/boot and the ESP filesystem doesn't support symlinks.
We keep symlinks for s390x images which do not use UEFI anyway.
2023-06-15 12:50:56 +02:00
Gauthier Jolly
6a66666e0a ubuntu-cpc: Make the ESP 2GiB and mount it to /boot
This is driven by online encryption scenarios. In order to efficiently
encrypt the root filesystem without modifying the partition layout, the
kernel should sit in an un-encrypted /boot partition.  Instead of
creating a new partition that would change the default partition layout,
we mount the ESP on /boot. We also need to then bind mount /boot on
/boot/efi because that's where Grub expects the ESP to be located.
2023-06-13 10:48:35 +02:00
Steve Langasek
6fac77b481 Revert "Revert "Revert "Revert the recent kpartx->losetup changes, as we need to put some other changes on top. Let's try to re-introduce this for MM."""
This reverts commit 1931bbcb194febe241aa82f03a6730ba82a84409.
2023-05-26 09:41:41 -07:00
Łukasz 'sil2100' Zemczak
1931bbcb19 Revert "Revert "Revert the recent kpartx->losetup changes, as we need to put some other changes on top. Let's try to re-introduce this for MM.""
This reverts commit ada1f09b39332ec828369e0a30f2870df5c4dc3e.
2023-05-24 11:06:56 +02:00
Steve Langasek
ada1f09b39 Revert "Revert the recent kpartx->losetup changes, as we need to put some other changes on top. Let's try to re-introduce this for MM."
This reverts commit 7b07db91110a3dda2723bc853a43f81c4e2a2f75.
2023-05-02 15:27:41 +02:00
Łukasz 'sil2100' Zemczak
7b07db9111 Revert the recent kpartx->losetup changes, as we need to put some other changes on top. Let's try to re-introduce this for MM. 2023-04-18 10:10:28 +01:00
Steve Langasek
1e0daf6af9 Clean up some remaining references to /dev/mapper. 2023-04-17 18:50:08 -07:00
John Chittum
c0af2ca443
fix: riscv64 efi conditional
missing a && between icicle and visionfive, led to /boot/efi still being
in place, and grub-install running instead of exiting the func.
fixes LP:2015750
2023-04-10 07:33:08 -05:00
Łukasz 'sil2100' Zemczak
4e49b4df60 Merge branch 'ubuntu/master' of git+ssh://git.launchpad.net/livecd-rootfs into canary-build 2023-04-05 20:50:27 +02:00
Łukasz 'sil2100' Zemczak
11a583d619 Initial implementation of canary image builds. 2023-04-05 20:49:16 +02:00
Heinrich Schuchardt
d42c7c5989 Add image for StarFive VisionFive 2
SUBARCH=visionfive2 is used to build images for the StarFive VisionFive 2
boards. For the device-tree we assume board revision 1.3B.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-04-05 15:08:04 +02:00