141 Commits

Author SHA1 Message Date
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
Michael Hudson-Doyle
1ecd1320d6 Merge remote-tracking branch 'xypron/required_partition' into ubuntu/master 2023-02-27 21:47:54 +13:00
Dimitri John Ledkov
ef072ea77a
Merge branch 'tune2fs' of git+ssh://git.launchpad.net/livecd-rootfs into ubuntu/master 2023-02-24 12:01:43 +00: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
Dimitri John Ledkov
dc3f8a6ea0
ubuntu-cpc: set default ext4 mount option commit=30
This allows to consolidate linux-kvm and linux-generic kernel
flavours. This brings the perfomance benefit of linux-kvm flavour to
all cloud and pre-installed images. It does trade data-safety.

LP: #2006511

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
2023-02-07 20:58:53 +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
Thomas Bechtold
480d5b26ea fix: don't modify ssh_config for ubuntu-cpc projects (LP:1968873)
The cloud-init bug (see LP:1968873) got fixed now so using a sshd
config snippet should work now.

This partly reverts commit aa1be5eaaa1fdbb4c31104cc49e54b15f66c3343
but uses now 60-cloudimg-settings.conf instead of
10-cloudimg-settings.conf .
2022-09-09 12:08:45 +02:00
Steve Langasek
239453d644 Remove modemmanager and udisks2 from cloud images in addition to fwupd. The use of tasks at install means all packages are marked manually installed in the apt database, so removing fwupd does not remove its dependencies. LP: #1981109. 2022-08-04 11:24:53 -07: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
Steve Langasek
941cd3c64a Remove fwupd from the cloud images. LP: #1981109. 2022-07-25 13:02:06 -07: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
Łukasz 'sil2100' Zemczak
c5571b17a2 Merge branch 'int/alex/riscv_no_beaglev_container' of https://git.launchpad.net/~alexghiti/livecd-rootfs into ubuntu/master 2022-07-14 14:33:25 +02:00
Thomas Bechtold
aa1be5eaaa Revert "fix: don't modify ssh_config for ubuntu-cpc projects (LP:1968873)"
This change triggered a bug in cloud-init (see LP:1968873). cloud-init
does not recongnize sshd options set in /etc/ssh/sshd_config.d/ and
cloud-init modifies directly /etc/ssh/sshd_config which gets then
overwritten by settings from /etc/ssh/sshd_config.d/ .

This reverts commit b54d24ff3310f7ace00ab08e0dacfdc89e026f1c.
2022-07-11 14:08:48 +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
Utkarsh Gupta
cb099966b2 Merge remote-tracking branch 'simpoir/lp1970795-jammy-ova-cdrom' into ubuntu/master
* simpoir/lp1970795-jammy-ova-cdrom:
  fix: VMware cdrom OVF import requires to be on IDE
2022-06-29 13:30:26 +05:30