[PATCH] [RFC] [SRU] [X/raspi2] UBUNTU: snapcraft.yaml: various improvements

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH] [RFC] [SRU] [X/raspi2] UBUNTU: snapcraft.yaml: various improvements

Paolo Pisati-5
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/*

I've marked this as an RFC because it requires a package[1] that is only
available in PPAs, and as such, if you try to build this kernel snap locally it
will fail - on the other hand, it works if it is built on LP using a snap
recipe[2] that depends on that PPA.

1: ppa:snappy-dev/image - raspberrypi-wireless-firmware
2: https://launchpad.net/~p-pisati/+snap/pi2-kernel

Paolo Pisati (1):
  UBUNTU: snapcraft.yaml: various improvements

 snapcraft.yaml | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH] UBUNTU: snapcraft.yaml: various improvements

Paolo Pisati-5
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 <[hidden email]>
---
 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


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] [RFC] [SRU] [X/raspi2] UBUNTU: snapcraft.yaml: various improvements

Stefan Bader-2
In reply to this post by Paolo Pisati-5
On 27.06.2017 17:56, Paolo Pisati wrote:

> 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/*
>
> I've marked this as an RFC because it requires a package[1] that is only
> available in PPAs, and as such, if you try to build this kernel snap locally it
> will fail - on the other hand, it works if it is built on LP using a snap
> recipe[2] that depends on that PPA.
>
> 1: ppa:snappy-dev/image - raspberrypi-wireless-firmware
I wonder whether the yaml file supports comments and then if it would not be
better to add info about the ppa to that file?

-Stefan

> 2: https://launchpad.net/~p-pisati/+snap/pi2-kernel
>
> Paolo Pisati (1):
>   UBUNTU: snapcraft.yaml: various improvements
>
>  snapcraft.yaml | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
>



--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Loading...