From patchwork Fri Aug 24 10:53:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Pisati X-Patchwork-Id: 961825 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 41xdST6V7nz9s2P; Fri, 24 Aug 2018 20:54:01 +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 1ft9j2-0004NK-AI; Fri, 24 Aug 2018 10:53:56 +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 1ft9j0-0004N1-J6 for kernel-team@lists.ubuntu.com; Fri, 24 Aug 2018 10:53:54 +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 1ft9j0-0004Lk-Aa for kernel-team@lists.ubuntu.com; Fri, 24 Aug 2018 10:53:54 +0000 From: Paolo Pisati To: kernel-team@lists.ubuntu.com Subject: [PATCH v2] UBUNTU: snapcraft.yaml: convert prepare, build and install to override-build Date: Fri, 24 Aug 2018 12:53:53 +0200 Message-Id: <1535108033-28056-1-git-send-email-paolo.pisati@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20180824030149.plpbogvn3vduggxz@kbuntu> References: <20180824030149.plpbogvn3vduggxz@kbuntu> 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" While here, take care of a mismerge and remove the duplicated 'firmware' part. Signed-off-by: Paolo Pisati Acked-by: Kleber Sacilotto de Souza --- snapcraft.yaml | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index b873b68..f5181ce6 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -17,25 +17,11 @@ parts: 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 - firmware: - plugin: nil - stage-packages: - - linux-firmware - organize: - lib/firmware: firmware - prime: - - -usr - - -lib - build-packages: - - cpio - - libssl-dev - - dpkg-dev - kernel-image-target: zImage - install: | tar -C $SNAPCRAFT_PART_INSTALL/dtbs -f $SNAPCRAFT_PART_INSTALL/dtbs/overlays.tgz -czv overlays rm -rf $SNAPCRAFT_PART_INSTALL/dtbs/overlays firmware: @@ -56,13 +42,13 @@ parts: source: . after: - firmware - prepare: | + override-build: | PKGS="http://ppa.launchpad.net/snappy-dev/image/ubuntu/dists/xenial/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/ - install: | + 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