[PATCH] UBUNTU: snapcraft.yaml: various improvements

Paolo Pisati paolo.pisati at canonical.com
Tue Jun 27 15:56:51 UTC 2017


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

This patch improves over the original snapcraft.yaml we ship in Xenial,
and makes the generated kernel snap nearly identical to the one we ship
in the store.
Among the different improvements, we have:

1) include the linux-firmware raspberry-wireless-firmware packages in
   the final snap
2) rename it to pi2-kernel to match the snap we have in the store
3) dynamic versioning
4) autogenerated config from debian.$DEBIAN/config/*

Signed-off-by: Paolo Pisati <paolo.pisati at canonical.com>
---
 snapcraft.yaml | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/snapcraft.yaml b/snapcraft.yaml
index 9eb3f40..c0f8375 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -1,10 +1,10 @@
-name: pc-kernel
+name: pi2-kernel
 version: null
 version-script: |
     . debian/debian.env
     dpkg-parsechangelog -l $DEBIAN/changelog -S version
-summary: The Ubuntu generic Linux kernel
-description: This Ubuntu generic Linux kernel
+summary: The Canonical raspi2 armhf kernel
+description: The Canonical raspi2 armhf kernel
 grade: stable
 confinement: strict
 type: kernel
@@ -14,18 +14,25 @@ parts:
     plugin: kernel
     source: .
     source-type: git
-    kconfigflavour: generic
+    kconfigflavour: raspi2
     kconfigs:
       - CONFIG_DEBUG_INFO=n
+    install: |
+      tar -C $SNAPCRAFT_PART_INSTALL/dtbs -f $SNAPCRAFT_PART_INSTALL/dtbs/overlays.tgz -czv overlays
+      rm -rf $SNAPCRAFT_PART_INSTALL/dtbs/overlays
   firmware:
     plugin: nil
     stage-packages:
       - linux-firmware
+      - raspberrypi-wireless-firmware
     organize:
       lib/firmware: firmware
     prime:
       - -usr
       - -lib
+    install: |
+      mv $SNAPCRAFT_PART_INSTALL/usr/share/doc/raspberrypi-wireless-firmware $SNAPCRAFT_PART_INSTALL/lib/firmware/rpi-wlanfw-licenses
+      mv $SNAPCRAFT_PART_INSTALL/lib/firmware/brcm80211/brcm/* $SNAPCRAFT_PART_INSTALL/lib/firmware/brcm
     build-packages:
       - cpio
       - libssl-dev
-- 
2.7.4





More information about the kernel-team mailing list