diff --git a/debian/changelog b/debian/changelog index 8dac96e1..0c7f4e75 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +livecd-rootfs (2.547) UNRELEASED; urgency=medium + + [ Ɓukasz Zemczak ] + * Add support for raspi3 rootfs builds (based on Ryan Finnie). + * For ubuntu-image consumption, export the kernel and initrd to + image/boot/uboot for raspi*. + + -- Steve Langasek Mon, 19 Nov 2018 10:39:33 -0800 + livecd-rootfs (2.546) disco; urgency=medium * Revert "Do not mount result, on top of lowerdir, appears to fail in diff --git a/live-build/auto/build b/live-build/auto/build index dd59c30a..801d3e36 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -863,36 +863,52 @@ if [ "$NUMFLAVOURS" = 1 ] && [ "$LB_LINUX_FLAVOURS" != "none" ]; then fi fi -if [ "$SUBARCH" = "ac100" ]; then - # create the md5sum and size files for which we are actually doing all this - md5sum $PREFIX.rootfs.tar.gz >chroot/installer.md5 - wc -c $PREFIX.rootfs.tar.gz >chroot/installer.size - - INFO_DESC="$(lsb_release -d -s)" - INFO_STAMP=$(date +20%y%m%d-%H:%M) - - echo "$INFO_DESC - $ARCH ($INFO_STAMP)" >chroot/media-info - - # make sure update-initramfs feels cosy and warm in the environment - lb chroot_proc install "$@" - lb chroot_sysfs install "$@" - lb chroot_devpts install "$@" - - # re-create initrd to contain the installer.md5 file - Chroot chroot "env FLASH_KERNEL_SKIP=1 update-initramfs -k all -t -u -v" - - # create boot.img - Chroot chroot "abootimg --create /boot/installer-${KVERS}.img -f /boot/bootimg.cfg-$SUBARCH -r /boot/initrd.img-${KVERS} -k /boot/vmlinuz-${KVERS}" +case $SUBARCH in + ac100) + # create the md5sum and size files for which we are actually doing all this + md5sum $PREFIX.rootfs.tar.gz >chroot/installer.md5 + wc -c $PREFIX.rootfs.tar.gz >chroot/installer.size + + INFO_DESC="$(lsb_release -d -s)" + INFO_STAMP=$(date +20%y%m%d-%H:%M) + + echo "$INFO_DESC - $ARCH ($INFO_STAMP)" >chroot/media-info + + # make sure update-initramfs feels cosy and warm in the environment + lb chroot_proc install "$@" + lb chroot_sysfs install "$@" + lb chroot_devpts install "$@" + + # re-create initrd to contain the installer.md5 file + Chroot chroot "env FLASH_KERNEL_SKIP=1 update-initramfs -k all -t -u -v" + + # create boot.img + Chroot chroot "abootimg --create /boot/installer-${KVERS}.img -f /boot/bootimg.cfg-$SUBARCH -r /boot/initrd.img-${KVERS} -k /boot/vmlinuz-${KVERS}" + + # clean up + lb chroot_devpts remove "$@" + lb chroot_sysfs remove "$@" + lb chroot_proc remove "$@" + + cp "chroot/boot/installer-${KVERS}.img" "$PREFIX.bootimg-$FLAVOUR" + ln -sf "$PREFIX.bootimg-$FLAVOUR" "$PREFIX.bootimg" + ;; - # clean up - lb chroot_devpts remove "$@" - lb chroot_sysfs remove "$@" - lb chroot_proc remove "$@" + raspi2|raspi3) + # copy the kernel and initrd to a predictable directory for + # ubuntu-image consumption. In some cases, like in pi2/3 + # u-boot, the bootloader needs to contain the kernel and initrd, + # so during rootfs build we copy it over to a directory that + # ubuntu-image looks for and shoves into the bootloader + # partition. + UBOOT_BOOT="image/boot/uboot" - cp "chroot/boot/installer-${KVERS}.img" "$PREFIX.bootimg-$FLAVOUR" - ln -sf "$PREFIX.bootimg-$FLAVOUR" "$PREFIX.bootimg" + mkdir -p $UBOOT_BOOT -fi + cp $PREFIX.initrd $UBOOT_BOOT/initrd.img || true + cp $PREFIX.kernel $UBOOT_BOOT/vmlinuz || true + ;; +esac if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; then sourceslist="chroot/etc/apt/sources.list" diff --git a/live-build/auto/config b/live-build/auto/config index bffbb7f7..703df61a 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -801,7 +801,7 @@ case $ARCH in add_package live ac100-tarball-installer BINARY_REMOVE_LINUX=false ;; - raspi2) + raspi2|raspi3) COMPONENTS='main restricted universe multiverse' add_package install linux-firmware-raspi2 u-boot-rpi flash-kernel u-boot-tools BINARY_REMOVE_LINUX=false