|
|
|
@ -23,12 +23,31 @@ PREFIX="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
|
|
|
|
|
if [ "${IMAGEFORMAT:-}" = "ubuntu-image" ]; then
|
|
|
|
|
# Use ubuntu-image instead of live-build
|
|
|
|
|
|
|
|
|
|
if [ "$PROJECT" = "ubuntu-core"]; then
|
|
|
|
|
CHANNEL="${CHANNEL:-edge}"
|
|
|
|
|
env SNAPPY_STORE_NO_CDN=1 \
|
|
|
|
|
ubuntu-image -c "$CHANNEL" $UBUNTU_IMAGE_ARGS \
|
|
|
|
|
-o "$PREFIX".img "$PREFIX".model-assertion
|
|
|
|
|
ubuntu-image snap -c "$CHANNEL" $UBUNTU_IMAGE_ARGS \
|
|
|
|
|
-O output "$PREFIX".model-assertion
|
|
|
|
|
# XXX: currently we only have one image generated, but really
|
|
|
|
|
# we should be supporting more than one for models that
|
|
|
|
|
# define those.
|
|
|
|
|
mv output/*.img "$PREFIX".img
|
|
|
|
|
xz -0 -T4 "$PREFIX".img
|
|
|
|
|
mv seed.manifest "$PREFIX".manifest
|
|
|
|
|
mv output/seed.manifest "$PREFIX".manifest
|
|
|
|
|
else
|
|
|
|
|
# First we need to build the gadget tree
|
|
|
|
|
make -C "config/$PREFIX-gadget" ARCH=$ARCH SERIES=$SUITE
|
|
|
|
|
ubuntu-image classic $UBUNTU_IMAGE_ARGS \
|
|
|
|
|
-s $SUITE -p $PROJECT -a $ARCH --subarch $SUBARCH \
|
|
|
|
|
-O output config/$PREFIX-gadget/install
|
|
|
|
|
# XXX: currently we only have one image generated, but really
|
|
|
|
|
# we should be supporting more than one for models that
|
|
|
|
|
# define those.
|
|
|
|
|
mv output/*.img "$PREFIX".img
|
|
|
|
|
xz -0 -T4 "$PREFIX".img
|
|
|
|
|
mv output/filesystem.manifest "$PREFIX".manifest
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
@ -800,13 +819,13 @@ done
|
|
|
|
|
NUMFLAVOURS="$(set -- $LB_LINUX_FLAVOURS; echo $#)"
|
|
|
|
|
if [ "$NUMFLAVOURS" = 1 ] && [ "$LB_LINUX_FLAVOURS" != "none" ]; then
|
|
|
|
|
# only one kernel flavour
|
|
|
|
|
if [ -e "binary/$INITFS/vmlinuz" ]; then
|
|
|
|
|
if [ -f "binary/$INITFS/vmlinuz" ] && ! [ -h "binary/$INITFS/vmlinuz" ]; then
|
|
|
|
|
ln "binary/$INITFS/vmlinuz" "$PREFIX.kernel"
|
|
|
|
|
chmod 644 "$PREFIX.kernel"
|
|
|
|
|
else
|
|
|
|
|
ln -sf "$PREFIX.kernel-$LB_LINUX_FLAVOURS" "$PREFIX.kernel"
|
|
|
|
|
fi
|
|
|
|
|
if [ -e "binary/$INITFS/initrd.lz" ]; then
|
|
|
|
|
if [ -f "binary/$INITFS/initrd.lz" ] && ! [ -h "binary/$INITFS/initrd.lz" ]; then
|
|
|
|
|
ln "binary/$INITFS/initrd.lz" "$PREFIX.initrd"
|
|
|
|
|
chmod 644 "$PREFIX.initrd"
|
|
|
|
|
else
|
|
|
|
@ -814,7 +833,8 @@ if [ "$NUMFLAVOURS" = 1 ] && [ "$LB_LINUX_FLAVOURS" != "none" ]; then
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "$SUBARCH" = "ac100" ]; then
|
|
|
|
|
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
|
|
|
|
@ -842,8 +862,23 @@ if [ "$SUBARCH" = "ac100" ]; then
|
|
|
|
|
|
|
|
|
|
cp "chroot/boot/installer-${KVERS}.img" "$PREFIX.bootimg-$FLAVOUR"
|
|
|
|
|
ln -sf "$PREFIX.bootimg-$FLAVOUR" "$PREFIX.bootimg"
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
|
|
mkdir -p $UBOOT_BOOT
|
|
|
|
|
|
|
|
|
|
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"
|
|
|
|
|