Message ID | 1534862132-32386-2-git-send-email-paolo.pisati@canonical.com |
---|---|
State | New |
Headers | show |
Series | UBUNTU: snapcraft.yaml: fix kernel snap creation | expand |
On 21.08.2018 16:35, Paolo Pisati wrote: > BugLink: http://bugs.launchpad.net/bugs/1782121 > > Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> > --- Normally a no-brainer, the only pain might be that it can conflict with changes to the master branch as both share the same file. -Stefan > snapcraft.yaml | 33 ++++++++++++++++++++++++++++----- > 1 file changed, 28 insertions(+), 5 deletions(-) > > diff --git a/snapcraft.yaml b/snapcraft.yaml > index 2452c40..d1802df 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 Linux kernel > +description: The Canonical raspi2 Linux kernel > grade: stable > confinement: strict > type: kernel > @@ -14,14 +14,16 @@ parts: > plugin: kernel > source: . > source-type: git > - kconfigflavour: generic > + kconfigflavour: raspi2 > kconfigs: > - CONFIG_DEBUG_INFO=n > + kernel-image-target: zImage > override-build: | > cp debian/scripts/retpoline-extract-one \ > $SNAPCRAFT_PART_BUILD/scripts/ubuntu-retpoline-extract-one > snapcraftctl build > - kernel-with-firmware: false > + 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: > @@ -34,3 +36,24 @@ parts: > build-packages: > - cpio > - libssl-dev > + - dpkg-dev > + raspiwififw: > + plugin: nil > + source: . > + after: > + - firmware > + override-build: | > + PKGS="http://ppa.launchpad.net/snappy-dev/image/ubuntu/dists/bionic/main/binary-armhf/Packages.gz" > + PKGPATH="$(wget -q -O- $PKGS|zcat|grep-dctrl raspberrypi-wireless-firmware |\ > + grep Filename|tail -1| sed 's/^Filename: //')" > + wget http://ppa.launchpad.net/snappy-dev/image/ubuntu/$PKGPATH > + dpkg -x $(basename $PKGPATH) unpack/ > + snapcraftctl build > + mkdir -p $SNAPCRAFT_PART_INSTALL/firmware/brcm > + mv unpack/usr/share/doc/raspberrypi-wireless-firmware $SNAPCRAFT_PART_INSTALL/firmware/rpi-wlanfw-licenses > + mv unpack/lib/firmware/brcm/* $SNAPCRAFT_PART_INSTALL/firmware/brcm > + build-packages: > + - coreutils > + - dctrl-tools > + - sed > + - wget >
On 08/21/18 16:35, Paolo Pisati wrote: > BugLink: http://bugs.launchpad.net/bugs/1782121 > > Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> > --- > snapcraft.yaml | 33 ++++++++++++++++++++++++++++----- > 1 file changed, 28 insertions(+), 5 deletions(-) > > diff --git a/snapcraft.yaml b/snapcraft.yaml > index 2452c40..d1802df 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 Linux kernel > +description: The Canonical raspi2 Linux kernel > grade: stable > confinement: strict > type: kernel > @@ -14,14 +14,16 @@ parts: > plugin: kernel > source: . > source-type: git > - kconfigflavour: generic > + kconfigflavour: raspi2 > kconfigs: > - CONFIG_DEBUG_INFO=n > + kernel-image-target: zImage > override-build: | > cp debian/scripts/retpoline-extract-one \ > $SNAPCRAFT_PART_BUILD/scripts/ubuntu-retpoline-extract-one > snapcraftctl build > - kernel-with-firmware: false > + 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: > @@ -34,3 +36,24 @@ parts: > build-packages: > - cpio > - libssl-dev > + - dpkg-dev > + raspiwififw: > + plugin: nil > + source: . > + after: > + - firmware > + override-build: | > + PKGS="http://ppa.launchpad.net/snappy-dev/image/ubuntu/dists/bionic/main/binary-armhf/Packages.gz" > + PKGPATH="$(wget -q -O- $PKGS|zcat|grep-dctrl raspberrypi-wireless-firmware |\ > + grep Filename|tail -1| sed 's/^Filename: //')" > + wget http://ppa.launchpad.net/snappy-dev/image/ubuntu/$PKGPATH > + dpkg -x $(basename $PKGPATH) unpack/ > + snapcraftctl build > + mkdir -p $SNAPCRAFT_PART_INSTALL/firmware/brcm > + mv unpack/usr/share/doc/raspberrypi-wireless-firmware $SNAPCRAFT_PART_INSTALL/firmware/rpi-wlanfw-licenses > + mv unpack/lib/firmware/brcm/* $SNAPCRAFT_PART_INSTALL/firmware/brcm > + build-packages: > + - coreutils > + - dctrl-tools > + - sed > + - wget >
On 08/21/18 16:35, Paolo Pisati wrote: > BugLink: http://bugs.launchpad.net/bugs/1782121 Applied to bionic/raspi2 branch, with the following BugLink as provided by Paolo: BugLink: http://bugs.launchpad.net/bugs/1788191 Thanks, Kleber > > Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> > --- > snapcraft.yaml | 33 ++++++++++++++++++++++++++++----- > 1 file changed, 28 insertions(+), 5 deletions(-) > > diff --git a/snapcraft.yaml b/snapcraft.yaml > index 2452c40..d1802df 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 Linux kernel > +description: The Canonical raspi2 Linux kernel > grade: stable > confinement: strict > type: kernel > @@ -14,14 +14,16 @@ parts: > plugin: kernel > source: . > source-type: git > - kconfigflavour: generic > + kconfigflavour: raspi2 > kconfigs: > - CONFIG_DEBUG_INFO=n > + kernel-image-target: zImage > override-build: | > cp debian/scripts/retpoline-extract-one \ > $SNAPCRAFT_PART_BUILD/scripts/ubuntu-retpoline-extract-one > snapcraftctl build > - kernel-with-firmware: false > + 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: > @@ -34,3 +36,24 @@ parts: > build-packages: > - cpio > - libssl-dev > + - dpkg-dev > + raspiwififw: > + plugin: nil > + source: . > + after: > + - firmware > + override-build: | > + PKGS="http://ppa.launchpad.net/snappy-dev/image/ubuntu/dists/bionic/main/binary-armhf/Packages.gz" > + PKGPATH="$(wget -q -O- $PKGS|zcat|grep-dctrl raspberrypi-wireless-firmware |\ > + grep Filename|tail -1| sed 's/^Filename: //')" > + wget http://ppa.launchpad.net/snappy-dev/image/ubuntu/$PKGPATH > + dpkg -x $(basename $PKGPATH) unpack/ > + snapcraftctl build > + mkdir -p $SNAPCRAFT_PART_INSTALL/firmware/brcm > + mv unpack/usr/share/doc/raspberrypi-wireless-firmware $SNAPCRAFT_PART_INSTALL/firmware/rpi-wlanfw-licenses > + mv unpack/lib/firmware/brcm/* $SNAPCRAFT_PART_INSTALL/firmware/brcm > + build-packages: > + - coreutils > + - dctrl-tools > + - sed > + - wget >
diff --git a/snapcraft.yaml b/snapcraft.yaml index 2452c40..d1802df 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 Linux kernel +description: The Canonical raspi2 Linux kernel grade: stable confinement: strict type: kernel @@ -14,14 +14,16 @@ parts: plugin: kernel source: . source-type: git - kconfigflavour: generic + kconfigflavour: raspi2 kconfigs: - CONFIG_DEBUG_INFO=n + kernel-image-target: zImage override-build: | cp debian/scripts/retpoline-extract-one \ $SNAPCRAFT_PART_BUILD/scripts/ubuntu-retpoline-extract-one snapcraftctl build - kernel-with-firmware: false + 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: @@ -34,3 +36,24 @@ parts: build-packages: - cpio - libssl-dev + - dpkg-dev + raspiwififw: + plugin: nil + source: . + after: + - firmware + override-build: | + PKGS="http://ppa.launchpad.net/snappy-dev/image/ubuntu/dists/bionic/main/binary-armhf/Packages.gz" + PKGPATH="$(wget -q -O- $PKGS|zcat|grep-dctrl raspberrypi-wireless-firmware |\ + grep Filename|tail -1| sed 's/^Filename: //')" + wget http://ppa.launchpad.net/snappy-dev/image/ubuntu/$PKGPATH + dpkg -x $(basename $PKGPATH) unpack/ + snapcraftctl build + mkdir -p $SNAPCRAFT_PART_INSTALL/firmware/brcm + mv unpack/usr/share/doc/raspberrypi-wireless-firmware $SNAPCRAFT_PART_INSTALL/firmware/rpi-wlanfw-licenses + mv unpack/lib/firmware/brcm/* $SNAPCRAFT_PART_INSTALL/firmware/brcm + build-packages: + - coreutils + - dctrl-tools + - sed + - wget
BugLink: http://bugs.launchpad.net/bugs/1782121 Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> --- snapcraft.yaml | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-)