From patchwork Tue Aug 21 14:35:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Pisati X-Patchwork-Id: 960416 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41vtWc4ms8z9s4v; Wed, 22 Aug 2018 00:35:40 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1fs7ks-0005hr-NN; Tue, 21 Aug 2018 14:35:34 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1fs7kr-0005hQ-8j for kernel-team@lists.ubuntu.com; Tue, 21 Aug 2018 14:35:33 +0000 Received: from 1.general.ppisati.uk.vpn ([10.172.193.134] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1fs7kr-0008Fc-0F for kernel-team@lists.ubuntu.com; Tue, 21 Aug 2018 14:35:33 +0000 From: Paolo Pisati To: kernel-team@lists.ubuntu.com Subject: [PATCH] UBUNTU: snapcraft.yaml: fix kernel snap creation Date: Tue, 21 Aug 2018 16:35:32 +0200 Message-Id: <1534862132-32386-2-git-send-email-paolo.pisati@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534862132-32386-1-git-send-email-paolo.pisati@canonical.com> References: <1534862132-32386-1-git-send-email-paolo.pisati@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: http://bugs.launchpad.net/bugs/1782121 Signed-off-by: Paolo Pisati Acked-by: Stefan Bader Acked-by: Kleber Sacilotto de Souza --- 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