diff options
| -rw-r--r-- | .gitignore | 5 | ||||
| -rw-r--r-- | scripts/package/Makefile | 16 | ||||
| -rw-r--r-- | scripts/package/snapcraft.template | 14 |
3 files changed, 35 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index f6050b88e95b..705e09913dc2 100644 --- a/.gitignore +++ b/.gitignore | |||
| @@ -66,6 +66,11 @@ modules.builtin | |||
| 66 | /debian/ | 66 | /debian/ |
| 67 | 67 | ||
| 68 | # | 68 | # |
| 69 | # Snap directory (make snap-pkg) | ||
| 70 | # | ||
| 71 | /snap/ | ||
| 72 | |||
| 73 | # | ||
| 69 | # tar directory (make tar*-pkg) | 74 | # tar directory (make tar*-pkg) |
| 70 | # | 75 | # |
| 71 | /tar-install/ | 76 | /tar-install/ |
diff --git a/scripts/package/Makefile b/scripts/package/Makefile index c23534925b38..61e29da374cc 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile | |||
| @@ -94,6 +94,21 @@ bindeb-pkg: FORCE | |||
| 94 | 94 | ||
| 95 | clean-dirs += $(objtree)/debian/ | 95 | clean-dirs += $(objtree)/debian/ |
| 96 | 96 | ||
| 97 | # snap-pkg | ||
| 98 | # --------------------------------------------------------------------------- | ||
| 99 | snap-pkg: FORCE | ||
| 100 | rm -rf $(objtree)/snap | ||
| 101 | mkdir $(objtree)/snap | ||
| 102 | $(MAKE) clean | ||
| 103 | $(call cmd,src_tar,$(KERNELPATH)) | ||
| 104 | sed "s@KERNELRELEASE@$(KERNELRELEASE)@; \ | ||
| 105 | s@SRCTREE@$(shell realpath $(KERNELPATH).tar.gz)@" \ | ||
| 106 | $(srctree)/scripts/package/snapcraft.template > \ | ||
| 107 | $(objtree)/snap/snapcraft.yaml | ||
| 108 | cd $(objtree)/snap && \ | ||
| 109 | snapcraft --target-arch=$(UTS_MACHINE) | ||
| 110 | |||
| 111 | clean-dirs += $(objtree)/snap/ | ||
| 97 | 112 | ||
| 98 | # tarball targets | 113 | # tarball targets |
| 99 | # --------------------------------------------------------------------------- | 114 | # --------------------------------------------------------------------------- |
| @@ -138,6 +153,7 @@ help: FORCE | |||
| 138 | @echo ' binrpm-pkg - Build only the binary kernel RPM package' | 153 | @echo ' binrpm-pkg - Build only the binary kernel RPM package' |
| 139 | @echo ' deb-pkg - Build both source and binary deb kernel packages' | 154 | @echo ' deb-pkg - Build both source and binary deb kernel packages' |
| 140 | @echo ' bindeb-pkg - Build only the binary kernel deb package' | 155 | @echo ' bindeb-pkg - Build only the binary kernel deb package' |
| 156 | @echo ' snap-pkg - Build only the binary kernel snap package (will connect to external hosts)' | ||
| 141 | @echo ' tar-pkg - Build the kernel as an uncompressed tarball' | 157 | @echo ' tar-pkg - Build the kernel as an uncompressed tarball' |
| 142 | @echo ' targz-pkg - Build the kernel as a gzip compressed tarball' | 158 | @echo ' targz-pkg - Build the kernel as a gzip compressed tarball' |
| 143 | @echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball' | 159 | @echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball' |
diff --git a/scripts/package/snapcraft.template b/scripts/package/snapcraft.template new file mode 100644 index 000000000000..626d278e4a5a --- /dev/null +++ b/scripts/package/snapcraft.template | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | name: kernel | ||
| 2 | version: KERNELRELEASE | ||
| 3 | summary: Linux kernel | ||
| 4 | description: The upstream Linux kernel | ||
| 5 | grade: stable | ||
| 6 | confinement: strict | ||
| 7 | type: kernel | ||
| 8 | |||
| 9 | parts: | ||
| 10 | kernel: | ||
| 11 | plugin: kernel | ||
| 12 | source: SRCTREE | ||
| 13 | source-type: tar | ||
| 14 | kernel-with-firmware: false | ||
