mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-02-14 06:38:28 +00:00
[ Steve Langasek ] * Add hooks to ubuntu-cpc to divert /bin/sync in the chroot and undivert it at the end. This is a general-purpose change that should be applied to all flavors and archs, but at the moment it's only needed on armhf+raspi2 to work around the raspberrypi2-firmware postinst calling sync, which is actually warranted in the normal case. * If a subarch is specified for a cloud image build, don't build rootfs artifacts; these should come from the 'generic' build. * Fix architecture handling in hooks. We know we're always being invoked from a launchpad-buildd-like setup, which passes ARCH and SUBARCH in the environment, because auto/config and auto/build both rely on this. So don't scatter dpkg --print-architecture calls throughout, especially when many of these are not cross-build-aware. * Refactor ubuntu-cpc hooks to allow us to handle images where the root partition should not be partition 1. [ Ben Howard ] * ubuntu-cpc: fix hooks/032-disk-image.binary call to create_empty_partition, which requires five args due to "-u" * ubuntu-cpc: in hooks/030-root-tarball.binary create /lib/modules to fix (LP: 1543204). [ Steve Langasek ] * Refactor ubuntu-cpc hooks to always produce a 'plain' rootfs via live-build and reuse this for the tarball, instead of lb_binary_rootfs creating some artifact that we ignore / throw away. * Initial support for raspi2 subarch. * Import live-build/ubuntu-cpc/hooks/raspi2/mkknlimg from https://github.com/raspberrypi/linux/blob/rpi-4.1.y/scripts/mkknlimg and use it to install a bootable uboot.bin.
24 lines
611 B
Bash
24 lines
611 B
Bash
#!/bin/bash -ex
|
|
|
|
case $ARCH:$SUBARCH in
|
|
# Not sure if any other cloud images use subarch for something that
|
|
# should take qcow2 format, so only skipping this on raspi2 for now.
|
|
armhf:raspi2)
|
|
apt-get install -qqy pxz
|
|
pxz -T4 -c binary/boot/disk.ext4 > livecd.ubuntu-cpc.disk1.img.xz
|
|
exit 0
|
|
;;
|
|
esac
|
|
|
|
apt-get install -qqy qemu-utils
|
|
|
|
. /build/config/functions
|
|
|
|
if [ -f binary/boot/disk.ext4 ]; then
|
|
convert_to_qcow2 binary/boot/disk.ext4 livecd.ubuntu-cpc.disk1.img
|
|
fi
|
|
|
|
if [ -f binary/boot/disk-uefi.ext4 ]; then
|
|
convert_to_qcow2 binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.uefi1.img
|
|
fi
|