mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-02-12 22:07:10 +00:00
Merge lp:~sil2100/livecd-rootfs/use-ubuntu-image-classic
This commit is contained in:
commit
6ee39485dd
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -4,6 +4,12 @@ livecd-rootfs (2.547) UNRELEASED; urgency=medium
|
|||||||
* Add support for raspi3 rootfs builds (based on Ryan Finnie).
|
* Add support for raspi3 rootfs builds (based on Ryan Finnie).
|
||||||
* For ubuntu-image consumption, export the kernel and initrd to
|
* For ubuntu-image consumption, export the kernel and initrd to
|
||||||
image/boot/uboot for raspi*.
|
image/boot/uboot for raspi*.
|
||||||
|
* Avoid issues of hard-linking to a symbolic vmlinuz as this can lead to a
|
||||||
|
dangling symlink.
|
||||||
|
* 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*.
|
||||||
|
* vagrant: disabling automatic console log file
|
||||||
|
|
||||||
[ Michael Zanetti ]
|
[ Michael Zanetti ]
|
||||||
* Don't set QML2_IMPORT_PATH in environment for Ubuntu Touch images.
|
* Don't set QML2_IMPORT_PATH in environment for Ubuntu Touch images.
|
||||||
|
4
debian/control
vendored
4
debian/control
vendored
@ -23,6 +23,7 @@ Depends: ${misc:Depends},
|
|||||||
live-build (>= 3.0~a57-1ubuntu31~),
|
live-build (>= 3.0~a57-1ubuntu31~),
|
||||||
lsb-release,
|
lsb-release,
|
||||||
lzma,
|
lzma,
|
||||||
|
make,
|
||||||
parted,
|
parted,
|
||||||
procps,
|
procps,
|
||||||
python-minimal | python,
|
python-minimal | python,
|
||||||
@ -32,7 +33,8 @@ Depends: ${misc:Depends},
|
|||||||
rsync,
|
rsync,
|
||||||
snapd,
|
snapd,
|
||||||
squashfs-tools (>= 1:3.3-1),
|
squashfs-tools (>= 1:3.3-1),
|
||||||
sudo,
|
sudo
|
||||||
|
u-boot-tools [armhf arm64],
|
||||||
ubuntu-image,
|
ubuntu-image,
|
||||||
vmdk-stream-converter [amd64 i386],
|
vmdk-stream-converter [amd64 i386],
|
||||||
xz-utils,
|
xz-utils,
|
||||||
|
@ -23,12 +23,31 @@ PREFIX="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
|
|||||||
if [ "${IMAGEFORMAT:-}" = "ubuntu-image" ]; then
|
if [ "${IMAGEFORMAT:-}" = "ubuntu-image" ]; then
|
||||||
# Use ubuntu-image instead of live-build
|
# Use ubuntu-image instead of live-build
|
||||||
|
|
||||||
CHANNEL="${CHANNEL:-edge}"
|
if [ "$PROJECT" = "ubuntu-core"]; then
|
||||||
env SNAPPY_STORE_NO_CDN=1 \
|
CHANNEL="${CHANNEL:-edge}"
|
||||||
ubuntu-image -c "$CHANNEL" $UBUNTU_IMAGE_ARGS \
|
env SNAPPY_STORE_NO_CDN=1 \
|
||||||
-o "$PREFIX".img "$PREFIX".model-assertion
|
ubuntu-image snap -c "$CHANNEL" $UBUNTU_IMAGE_ARGS \
|
||||||
xz -0 -T4 "$PREFIX".img
|
-O output "$PREFIX".model-assertion
|
||||||
mv seed.manifest "$PREFIX".manifest
|
# 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/seed.manifest "$PREFIX".manifest
|
||||||
|
else
|
||||||
|
# First we need to build the gadget tree
|
||||||
|
make -C "config/$PREFIX-gadget"
|
||||||
|
ubuntu-image classic $UBUNTU_IMAGE_ARGS \
|
||||||
|
-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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -180,28 +180,46 @@ case $IMAGEFORMAT in
|
|||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
case $MODEL in
|
|
||||||
pc-amd64|pc-i386)
|
|
||||||
UBUNTU_IMAGE_ARGS="--image-size 3700M" ;;
|
|
||||||
*)
|
|
||||||
UBUNTU_IMAGE_ARGS="" ;;
|
|
||||||
esac
|
|
||||||
case $SUITE in
|
|
||||||
xenial)
|
|
||||||
# Ubuntu Core 16
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# Ubuntu Core 18
|
|
||||||
MODEL="ubuntu-core-18-${MODEL#pc-}" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo "IMAGEFORMAT=$IMAGEFORMAT" >> config/common
|
if [ $PROJECT = "ubuntu-core" ]; then
|
||||||
echo "UBUNTU_IMAGE_ARGS=\"$UBUNTU_IMAGE_ARGS\"" >> config/common
|
# snap-based core images
|
||||||
# Store model assertion in top dir to get it picked up later as a build artifact
|
|
||||||
env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 model="$MODEL" brand-id=canonical > "$PREFIX".model-assertion
|
case $MODEL in
|
||||||
echo "Configured ubuntu-image for the following model assertion:"
|
pc-amd64|pc-i386)
|
||||||
cat "$PREFIX".model-assertion
|
UBUNTU_IMAGE_ARGS="--image-size 3700M" ;;
|
||||||
echo "----------------------------------------------------------"
|
*)
|
||||||
|
UBUNTU_IMAGE_ARGS="" ;;
|
||||||
|
esac
|
||||||
|
case $SUITE in
|
||||||
|
xenial)
|
||||||
|
# Ubuntu Core 16
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# Ubuntu Core 18
|
||||||
|
MODEL="ubuntu-core-18-${MODEL#pc-}" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "IMAGEFORMAT=$IMAGEFORMAT" >> config/common
|
||||||
|
echo "UBUNTU_IMAGE_ARGS=\"$UBUNTU_IMAGE_ARGS\"" >> config/common
|
||||||
|
# Store model assertion in top dir to get it picked up later as a build artifact
|
||||||
|
env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 model="$MODEL" brand-id=canonical > "$PREFIX".model-assertion
|
||||||
|
echo "Configured ubuntu-image for the following model assertion:"
|
||||||
|
cat "$PREFIX".model-assertion
|
||||||
|
echo "----------------------------------------------------------"
|
||||||
|
else
|
||||||
|
# classic images
|
||||||
|
|
||||||
|
UBUNTU_IMAGE_ARGS=""
|
||||||
|
UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS${PROPOSED:+ --with-proposed}"
|
||||||
|
UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS${EXTRA_PPAS:+ --extra-ppas \"$EXTRA_PPAS\"}"
|
||||||
|
|
||||||
|
git clone lp:~canonical-foundations/snap-$MODEL/+git/github-mirror -b classic config/$PREFIX-gadget
|
||||||
|
|
||||||
|
echo "IMAGEFORMAT=$IMAGEFORMAT" >> config/common
|
||||||
|
echo "UBUNTU_IMAGE_ARGS=\"$UBUNTU_IMAGE_ARGS\"" >> config/common
|
||||||
|
|
||||||
|
echo "Configured ubuntu-image for the following gadget model: $MODEL"
|
||||||
|
fi
|
||||||
# Fake finished configuration for lb build
|
# Fake finished configuration for lb build
|
||||||
mkdir -p .build
|
mkdir -p .build
|
||||||
touch .build/config
|
touch .build/config
|
||||||
|
Loading…
x
Reference in New Issue
Block a user