Merge remote-tracking branch 'xnox/disk-images-all-the-things' into ubuntu/master

sil2100/proposed-components
Dimitri John Ledkov 4 years ago
commit 80e98a937b
No known key found for this signature in database
GPG Key ID: 9B8EC849D5EF70ED

@ -1,7 +1,7 @@
#!/bin/bash -eux
case $ARCH in
amd64|arm64|armhf)
amd64|arm64|armhf|riscv64)
;;
*)
echo "We don't create EFI images for $ARCH."
@ -35,6 +35,15 @@ create_partitions() {
--typecode=15:ef00 \
--new=1:
;;
riscv64)
# same as arm64/armhf, but set bit 2 legacy bios bootable
# on the first partition for uboot
sgdisk "${disk_image}" \
--new=15:0:204800 \
--typecode=15:ef00 \
--new=1: \
--attributes=1:set:2
;;
amd64)
sgdisk "${disk_image}" \
--new=14::+4M \
@ -81,7 +90,7 @@ install_grub() {
# please file a bug against grub2 to include the affected module.
case $ARCH in
arm64)
chroot mountpoint apt-get -qqy install --no-install-recommends grub-efi-arm64 grub-efi-arm64-bin
chroot mountpoint apt-get -qqy install --no-install-recommends shim-signed grub-efi-arm64-signed
efi_target=arm64-efi
;;
armhf)
@ -92,6 +101,22 @@ install_grub() {
chroot mountpoint apt-get install -qqy grub-pc shim-signed
efi_target=x86_64-efi
;;
riscv64)
# TODO does not exist yet on riscv64
chroot mountpoint apt-get install -qqy u-boot-menu #grub-efi-riscv64
efi_target=riscv64-efi
chroot mountpoint u-boot-update
## TODO remove below once we have grub-efi-riscv64
rm mountpoint/tmp/device.map
umount mountpoint/boot/efi
mount
umount_partition mountpoint
rmdir mountpoint
return
##
;;
esac
chroot mountpoint apt-get autoremove --purge --assume-yes

@ -19,10 +19,6 @@ case $ARCH:$SUBARCH in
echo "POWER disk images are handled separately"
exit 0
;;
amd64|arm64|armhf)
echo "We only create EFI images for $ARCH."
exit 0
;;
armhf:raspi2)
# matches the size of the snappy image
IMAGE_SIZE=$((4*1000*1000*1000))
@ -31,6 +27,10 @@ case $ARCH:$SUBARCH in
BOOTPART_END=138M
BOOT_MOUNTPOINT=/boot/firmware
;;
arm64:*|armhf:*|riscv64:*)
echo "We only create EFI images for $ARCH."
exit 0
;;
*)
;;
esac

Loading…
Cancel
Save