71 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Michael Hudson-Doyle
1ecd1320d6 Merge remote-tracking branch 'xypron/required_partition' into ubuntu/master 2023-02-27 21:47:54 +13:00
Heinrich Schuchardt
eea1308301 RISC-V: avoid soft lockup Radeon GPUs with u-boot-menu
For the SiFive HiFive Unmatched board we create a pre-installed image using
u-boot-menu. Increase the watchdog threshold in this case too.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-02-13 22:05:22 +00:00
Heinrich Schuchardt
0924d50aee RISC-V: avoid soft lockup Radeon GPUs with GRUB
With Radeon GPUs and kernel 5.19 a soft lockup was observed.
Increase the watchdog threshold.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-02-10 20:55:11 +00:00
Heinrich Schuchardt
ee843c14de RISC-V: rename cmdline.cfg to 10_cmdline.cfg
Using numbered configuration fragments makes the order of application
easier to track

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-02-10 20:55:11 +00:00
Heinrich Schuchardt
536cd09b73 riscv64: set attribute required partition for firmware
According to the EBBR specification the GPT partitions for firmware should
have attribute bit 0 (Required Partition) set.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-16 21:52:36 +01:00
Heinrich Schuchardt
71308d500b riscv64: adjust U-Boot installation for Nezha D1 and LicheeRV
Since version 2022.10 U-Boot SPL and U-Boot are installed onto the same partition.
Package nezha-boot0 is not needed anymore.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-09 11:52:44 +01:00
Heinrich Schuchardt
c6ad92c0f4 riscv64: use efi=debug earlycon
RISC-V boards tend to boot slowly.
We should provide progress information when booting.

Use 'efi=debug earlycon' on the Linux command line via new file
/etc/default/grub.d/cmdline.cfg.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-11-14 14:04:42 +01:00
Brian Murray
151f73e8b0 Finish the rename of FK_FORCE_CONTAINER into FK_FORCE. (LP: #1989194) 2022-10-17 13:01:45 -07:00
Łukasz 'sil2100' Zemczak
e8938fc610 Add an additional subdir. 2022-10-14 10:49:25 +02:00
Heinrich Schuchardt
b39824539c riscv: reduce initrd size for Nezha and LicheeRV boards
The Nezha and the LicheeRV boards do not have enough memory for an initrd
with most modules. Therefore the number of included modules has to be
reduced.

Create file /etc/initramfs-tools/conf.d/modules_list.conf
to set MODULES=list.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-13 08:05:47 +02:00
Heinrich Schuchardt
1555f5f46b riscv: remove invalid redirections
Remove redirections of type

    command &1>2

Executing the command in the background and creating and empty file '2'
was never intended.

As the messages are information only redirecting to stderr would not make
sense either.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-13 08:05:47 +02:00
Alexandre Ghiti
a752a99ad8 riscv: LicheeRV must use u-boot-nezha package
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-09-20 13:49:40 +02:00
Alexandre Ghiti
f68433098d riscv: Add support to build Microchip Icicle Kit image
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-09-20 13:49:40 +02:00
Alexandre Ghiti
e8ea6335d5 riscv: Add support to build LicheeRV Dock images
The LicheeRV Dock board comes with only 512MB of DRAM so the only difference
with a Nezha image is the fact that we have to remove
cryptsetup-initramfs package which makes the initrd too big for the
board to boot.

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-09-20 13:49:39 +02:00
Ivan Kapelyukhin
76d794664a
Bump UEFI disk image size for amd64 to 3.5 GB
Current Kinetic GCE image builds are failing with the following error:

update-initramfs: Generating /boot/initrd.img-5.19.0-1004-gcp
zstd: error 25 : Write error : No space left on device (cannot write compressed block)
E: mkinitramfs failure zstd -q -1 -T0 25

Seems like after `linux-gcp` update from 5.15 to 5.19 `linux-modules` package
has gotten ~40MB larger and with that GCE image builds are over the edge wrt
available disk space in chroot.

Bumped up disk image size for amd64 to 3.5GB to match the sizes used by armhf
and generic images.
2022-09-14 22:30:54 +02:00
William Wilson
ee40e951f2 releasing package livecd-rootfs version 2.778 2022-09-14 10:16:52 -05:00
Łukasz 'sil2100' Zemczak
e760da3284 When adding the new RISC-V platforms, some of the generic non-SUBARCH code went missing and some invalid assumptions have been made, causing cloud images to fail building. 2022-07-29 17:44:33 +02:00
Alexandre Ghiti
17e659ddf8 riscv: Fix SiFive Unmatched build
While merging the VisionFive support, we removed the installation of
u-boot-menu for the Unmatched by mistake: fix this by reinstating it.

Fixes: ce9f5caccadf ("riscv: Add support for StarFive VisionFive")
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-25 09:36:43 +02:00
Alexandre Ghiti
00f35ae9bf riscv: Use FK_FORCE_CONTAINER to force flash-kernel to run in a container
As explained in LP: #1980929, we need this in order to build RISC-V
images.

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-11 12:47:16 +02:00
Alexandre Ghiti
7a1b5f67dd disk-image-uefi.binary: Fix wrong parenthesis
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-08 15:00:05 +02:00
Alexandre Ghiti
42b68d5d0f riscv: Bump image size to 4.5G
3.5G is not enough for riscv64 preinstalled as the creation of the initrd fails
with the following error:

Creating config file /etc/default/grub with new version
Processing triggers for initramfs-tools (0.140ubuntu13) ...
update-initramfs: Generating /boot/initrd.img-5.15.0-1011-generic
zstd: error 25 : Write error : No space left on device (cannot write compressed block)
E: mkinitramfs failure zstd -q -1 -T0 25
update-initramfs: failed for /boot/initrd.img-5.15.0-1011-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-05 11:40:24 +02:00
Alexandre Ghiti
74e9088bbc riscv: Use UEFI bootflow for the Nezha Board
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-05 11:40:24 +02:00
Alexandre Ghiti
6224b11fc0 riscv: Add support for StarFive VisionFive
The image created uses a UEFI bootflow, so we install grub for this board
only. We also need flash-kernel to install the dtb where grub can find
it.

This image is specifically architectured so that it can be installed on
a "factory" board, meaning using the u-boot firmware which was
originally implemented for Fedora, so we need the p3 partition that
embeds a uEnv.txt file to tell u-boot what/where to load next stage.

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-05 11:40:24 +02:00
Alexandre Ghiti
f751ff7218 RISC-V: enable building for Nezha board
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-07-05 11:40:24 +02:00
Heinrich Schuchardt
46711a9af6 riscv: define partitioning scheme for Nezha board
Define the image layout for the Nezha board.

The U-Boot SPL based boot0 may be installed starting in sector 16 or 256.
As sector 16 is incompatible with GPT partitioning use sector 256.

The primary U-Boot image is expected to start at sector 32800 and its
backup in sector 24576.

Cf. https://linux-sunxi.org/index.php?title=Allwinner_Nezha&oldid=24469

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-07-05 11:40:24 +02:00
Heinrich Schuchardt
b6701e556f riscv64: ensure reasonable partition alignment
Currently the RISC-V preinstalled server images come with partitions that
are only 1 KiB aligned. Ext4 may use 4 KiB block size. The existing
misalignment leads to decreased performance.

Decrease the size of the loader2 partition by 34 512-byte blocks. This
results in 1 MiB alignment of the EFI and root partitions.

The remaining loader2 partition size of close to 4 MiB is still large
enough for U-Boot or a future EDK II.

Fixes: a808b28d47ec ("riscv64: build preinstalled riscv64 image with uboot SPL and CIDATA.")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-12-01 18:22:02 +01:00
Thomas Bechtold
1a7e9ca8c9 Bump UEFI disk image size for armhf to 3.5 GB
Current jammy builds fail with:
dpkg: error processing archive /var/cache/\
  apt/archives/grub-common_2.04-1ubuntu48_armhf.deb (--unpack):
cannot copy extracted data for './usr/share/grub/unicode.pf2' \
  to '/usr/share/grub/unicode.pf2.dpkg-new': \
  failed to write (No space left on device)
2021-11-23 11:30:47 +01:00