diff --git a/debian/changelog b/debian/changelog index c7d1a82f..abe53a68 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.385) UNRELEASED; urgency=medium + + * add snap building for kernel snaps + + -- Oliver Grawert Wed, 09 Mar 2016 15:58:35 +0100 + livecd-rootfs (2.384) xenial; urgency=medium * slightly adjust the naming of the OS snap for snappy builds so it becomes diff --git a/live-build/auto/build b/live-build/auto/build index 4596789c..e4a3d9de 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -507,7 +507,52 @@ EOF if [ "$ARCH" = "amd64" ]; then cp $HERE/$PREFIX.$tarname $HERE/$PREFIX.azure.$tarname fi - cd $HERE) + + # create snap + snapname="kernel.snap" + metaname=canonical-pc-linux + + if [ "$devarch" = "raspi2" ];then + metaname=canonical-pi2-linux + snapname="$devarch.kernel.snap" + elif [ "$devarch" = "generic" ] && [ "$ARCH" = "armhf" ];then + metaname=canonical-bbb-linux + fi + + rm -rf $HERE/snap || true + mkdir -p $HERE/snap/meta + cp -a $TMPDIR/assets/* $HERE/snap + cp -a $TMPDIR/system/* $HERE/snap + + cd $HERE/snap + kernel="$(ls vmlinuz-*)" + initrd="$(ls initrd.img-*)" + ln -s $kernel vmlinuz + ln -s $initrd initrd.img + kvers="$(ls vmlinuz-*|sed 's/^.*vmlinuz-//;s/-[a-z.]*$//')" + + VERSION=$kvers-$(date +20%y%m%d-%H-%M) + + cat > meta/snap.yaml <