From patchwork Thu Nov 7 16:39:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quirin Gylstorff X-Patchwork-Id: 11233379 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 89AC713BD for ; Thu, 7 Nov 2019 16:41:16 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7265D206DF for ; Thu, 7 Nov 2019 16:41:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7265D206DF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=siemens.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=cip-dev-bounces@lists.cip-project.org Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id B3768DD2; Thu, 7 Nov 2019 16:39:56 +0000 (UTC) X-Original-To: cip-dev@lists.cip-project.org Delivered-To: cip-dev@mail.linuxfoundation.org Received: from smtp2.linuxfoundation.org (smtp2.linux-foundation.org [172.17.192.36]) by mail.linuxfoundation.org (Postfix) with ESMTPS id B3107D83 for ; Thu, 7 Nov 2019 16:39:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by smtp2.linuxfoundation.org (Postfix) with ESMTPS id 137571DE65 for ; Thu, 7 Nov 2019 16:39:52 +0000 (UTC) Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id xA7GdpvQ027451 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 Nov 2019 17:39:51 +0100 Received: from md2dvrtc.ad001.siemens.net ([139.25.69.120]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id xA7GdoW9027939; Thu, 7 Nov 2019 17:39:51 +0100 From: "Q. Gylstorff" To: cip-dev@lists.cip-project.org Date: Thu, 7 Nov 2019 17:39:40 +0100 Message-Id: <20191107163942.23513-3-Quirin.Gylstorff@siemens.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp2.linux-foundation.org Cc: Quirin Gylstorff Subject: [cip-dev] [isar-cip-core PATCH v2 2/4] classes: add wic-targz-img.bbclass X-BeenThere: cip-dev@lists.cip-project.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: cip-dev-bounces@lists.cip-project.org Errors-To: cip-dev-bounces@lists.cip-project.org From: Quirin Gylstorff The Linaro Automated Validation Architecture (LAVA) uses tarballs as root file-systems to modify the file-system during the deployment. Add a new bbclass to build tarballs and wic images at the same time to feed the build output of isar-cip-core directly into LAVA tests. Signed-off-by: Quirin Gylstorff --- classes/wic-targz-img.bbclass | 13 +++++++++++++ conf/machine/bbb.conf | 2 +- conf/machine/iwg20m.conf | 2 +- conf/machine/qemu-amd64.conf | 2 +- conf/machine/simatic-ipc227e.conf | 2 +- opt-targz-img.yml | 20 ++++++++++++++++++++ scripts/deploy-cip-core.sh | 4 ++++ 7 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 classes/wic-targz-img.bbclass create mode 100644 opt-targz-img.yml diff --git a/classes/wic-targz-img.bbclass b/classes/wic-targz-img.bbclass new file mode 100644 index 0000000..4e9f89d --- /dev/null +++ b/classes/wic-targz-img.bbclass @@ -0,0 +1,13 @@ +# +# CIP Core, generic profile +# +# Copyright (c) Siemens AG, 2019 +# +# Authors: +# Quirin Gylstorff +# +# SPDX-License-Identifier: MIT +# + +inherit wic-img +inherit targz-img diff --git a/conf/machine/bbb.conf b/conf/machine/bbb.conf index c945aac..a9b460e 100644 --- a/conf/machine/bbb.conf +++ b/conf/machine/bbb.conf @@ -8,7 +8,7 @@ DISTRO_ARCH = "armhf" -IMAGE_TYPE = "wic-img" +IMAGE_TYPE ?= "wic-img" IMAGER_INSTALL += "u-boot-omap" # On stretch, select U-Boot from buster which comes with distro-boot support diff --git a/conf/machine/iwg20m.conf b/conf/machine/iwg20m.conf index 2f91771..6c1a227 100644 --- a/conf/machine/iwg20m.conf +++ b/conf/machine/iwg20m.conf @@ -8,7 +8,7 @@ DISTRO_ARCH = "armhf" # see wic/iwg20m.wks -IMAGE_TYPE = "wic-img" +IMAGE_TYPE ?= "wic-img" # sets serial login getty MACHINE_SERIAL = "ttySC0" diff --git a/conf/machine/qemu-amd64.conf b/conf/machine/qemu-amd64.conf index 90325d6..7cbd55b 100644 --- a/conf/machine/qemu-amd64.conf +++ b/conf/machine/qemu-amd64.conf @@ -8,4 +8,4 @@ DISTRO_ARCH = "amd64" -IMAGE_TYPE = "ext4-img" +IMAGE_TYPE ?= "ext4-img" diff --git a/conf/machine/simatic-ipc227e.conf b/conf/machine/simatic-ipc227e.conf index 73dac33..473e6c5 100644 --- a/conf/machine/simatic-ipc227e.conf +++ b/conf/machine/simatic-ipc227e.conf @@ -8,5 +8,5 @@ DISTRO_ARCH = "amd64" -IMAGE_TYPE = "wic-img" +IMAGE_TYPE ?= "wic-img" IMAGER_INSTALL += "${GRUB_BOOTLOADER_INSTALL}" diff --git a/opt-targz-img.yml b/opt-targz-img.yml new file mode 100644 index 0000000..1a73024 --- /dev/null +++ b/opt-targz-img.yml @@ -0,0 +1,20 @@ +# +# CIP Core, generic profile +# +# Copyright (c) Siemens AG, 2019 +# +# Authors: +# Quirin Gylstorff +# +# SPDX-License-Identifier: MIT +# + +header: + version: 8 + +# lava uses nfs to deploy the image. For this we need a tarball instead of +# full image + +local_conf_header: + image-type: | + IMAGE_TYPE = "wic-targz-img" diff --git a/scripts/deploy-cip-core.sh b/scripts/deploy-cip-core.sh index 081dc9d..e5c09ef 100755 --- a/scripts/deploy-cip-core.sh +++ b/scripts/deploy-cip-core.sh @@ -26,6 +26,10 @@ xz -9 -k $BASE_PATH.wic.img echo "Uploading artifacts..." aws s3 cp --no-progress $BASE_PATH.wic.img.xz s3://download.cip-project.org/cip-core/$TARGET/ +if [ -f $BASE_PATH.tar.gz ]; then + aws s3 cp --no-progress $BASE_PATH.tar.gz s3://download.cip-project.org/cip-core/$TARGET/ +fi + KERNEL_IMAGE=$BASE_PATH-vmlinuz # iwg20m workaround if [ -f build/tmp/deploy/images/$TARGET/zImage ]; then