Commit 50c16def authored by Paolo Pisati's avatar Paolo Pisati Committed by Kleber Sacilotto de Souza

UBUNTU: SAUCE: make snap-pkg support

BugLink: http://bugs.launchpad.net/bugs/1700747

This patch integrates snapcraft in the kbuild environment of the Linux kernel.

To use it:

make defconfig
make snap-pkg

or in case of cross-compilation (e.g. arm):

export ARCH=arm; export CROSS_COMPILE=arm-linux-gnueabihf-
make defconfig
make snap-pkg

The resulting kernel snap will be generated in $(objtree)/snap
Signed-off-by: default avatarPaolo Pisati <paolo.pisati@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
parent 6d6b38b5
......@@ -56,6 +56,11 @@ Module.symvers
#
#/debian/
#
# Snap directory (make snap-pkg)
#
/snap/
#
# tar directory (make tar*-pkg)
#
......
......@@ -99,6 +99,19 @@ bindeb-pkg: FORCE
clean-dirs += $(objtree)/debian/
# snap-pkg
# ---------------------------------------------------------------------------
snap-pkg: FORCE
rm -rf $(objtree)/snap
mkdir $(objtree)/snap
sed "s@KERNELRELEASE@$(KERNELRELEASE)@; \
s@SRCTREE@$(shell realpath $(srctree))@" \
$(srctree)/scripts/package/snapcraft.template > \
$(objtree)/snap/snapcraft.yaml
cd $(objtree)/snap && \
snapcraft --target-arch=$(UTS_MACHINE)
clean-dirs += $(objtree)/snap/
# tarball targets
# ---------------------------------------------------------------------------
......
name: kernel
version: KERNELRELEASE
summary: Linux kernel
description: The upstream Linux kernel
grade: stable
confinement: strict
type: kernel
parts:
kernel:
plugin: kernel
source: SRCTREE
source-type: git
kconfigfile: SRCTREE/.config
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment