From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6989231260094693376 X-Received: by 2002:a2e:9606:: with SMTP id v6mr12880330ljh.60.1627307219413; Mon, 26 Jul 2021 06:46:59 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:36c2:: with SMTP id e2ls543301lfs.3.gmail; Mon, 26 Jul 2021 06:46:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpY0A1aTbakYXz/nFBZcQJqOloO2C9veTqSfdoAJ+RZRU+LVOiM5BKL3IkaLtzFkCwFb3i X-Received: by 2002:a19:c184:: with SMTP id r126mr4321469lff.343.1627307218401; Mon, 26 Jul 2021 06:46:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627307218; cv=none; d=google.com; s=arc-20160816; b=G0xmoYn7UEzulQUenJ0y/0KutQr8ooHc7yMk1IqtKzQ06zwRghAOxYc/Y1VC54xUBc L6lgsI/khSL4Y7seLvAlna+R8IHSRXj1/gFiPMneYkeaiM19aKn38B9jRbW/x+N7do0g 9jmvvWSiqpesQvv5W/CJaQVj33rrkwCGOQT2D9ejjA4Oj07mE7NXsd1Cmx34nbOAbFbY me21LGCnbVEvVvuPm2Z0JIvj8D6i7JuAVZjupKu6Q7E4iSngFilWydWXs2xW2U3UsKPa oCoPEIS0CXM6aZ9m2mJO4pPuA9eoakomY4yKxyvS6m1Fma7tXer961ug2epjiivii88d 1NWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=/MJ8r1aiE3mG1vr0KjKwnLMhCwVoxMOcH528ZPb1cXE=; b=ZKT4G0tghnKOyKghaHQzbgFtv2ry2RtjOKXmjc5PP3EjSq6v4lNhvoy1ggqItRob3p tw7aebyKwD9dySuEjAS/oxbInRUNi7zwsef/8sSZs7zaBJzGELe6by4cCTFA1ncxXaGO kHoJfQMJgSsaygESa4VWuDR1urvER3WBLC0qrwOfJIze951U1V919FTp2Iis4hJWpymB A4quQMTZhz1GVMi7IQHUF9C4/GabK8HcisMk8z7rXvWP/u0848JJ/ni6dHJEggCsHDti L4D5fUF6sfFYZW3yuB6PW2WgoqFp8VrqkJL4AQ49hG3YW3Kwqr4BzEeSt2NpJQQZ7Gwn WuqQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id d8si128248lfa.6.2021.07.26.06.46.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jul 2021 06:46:58 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from localhost.localdomain (mm-198-62-214-37.mgts.dynamic.pppoe.byfly.by [37.214.62.198] (may be forged)) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id 16QDknux019679 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Jul 2021 15:46:57 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [RFC 07/15] optee-os: Do not use shell environment Date: Mon, 26 Jul 2021 16:46:28 +0300 Message-Id: <20210726134636.30800-8-amikan@ilbers.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726134636.30800-1-amikan@ilbers.de> References: <20210726134636.30800-1-amikan@ilbers.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: OZBSUkm+HNLh To make package build process independent of the shell environment we should remove OPTEE_PLATFORM and OPTEE_EXTRA_BUILDARGS passing through export call. So we migrate to template-based debian/rules file. Signed-off-by: Anton Mikanovich --- .../optee-os/files/debian/{rules => rules.tmpl} | 4 ++-- meta/recipes-bsp/optee-os/optee-os-custom.inc | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) rename meta/recipes-bsp/optee-os/files/debian/{rules => rules.tmpl} (75%) diff --git a/meta/recipes-bsp/optee-os/files/debian/rules b/meta/recipes-bsp/optee-os/files/debian/rules.tmpl similarity index 75% rename from meta/recipes-bsp/optee-os/files/debian/rules rename to meta/recipes-bsp/optee-os/files/debian/rules.tmpl index d2e9900..9ab80df 100755 --- a/meta/recipes-bsp/optee-os/files/debian/rules +++ b/meta/recipes-bsp/optee-os/files/debian/rules.tmpl @@ -12,8 +12,8 @@ export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- endif override_dh_auto_build: - CFLAGS= LDFLAGS= $(MAKE) $(PARALLEL_MAKE) PLATFORM=$(OPTEE_PLATFORM) \ - $(OPTEE_EXTRA_BUILDARGS) + CFLAGS= LDFLAGS= $(MAKE) $(PARALLEL_MAKE) PLATFORM=${OPTEE_PLATFORM} \ + ${OPTEE_EXTRA_BUILDARGS} %: dh $@ diff --git a/meta/recipes-bsp/optee-os/optee-os-custom.inc b/meta/recipes-bsp/optee-os/optee-os-custom.inc index 1bd5196..e9eed54 100644 --- a/meta/recipes-bsp/optee-os/optee-os-custom.inc +++ b/meta/recipes-bsp/optee-os/optee-os-custom.inc @@ -22,8 +22,8 @@ DEBIAN_BUILD_DEPENDS ?= "python3-pycryptodome:native, python3-pyelftools" PROVIDES += "optee-os-${OPTEE_NAME}" -TEMPLATE_FILES = "debian/control.tmpl" -TEMPLATE_VARS += "OPTEE_NAME DEBIAN_BUILD_DEPENDS" +TEMPLATE_FILES = "debian/control.tmpl debian/rules.tmpl" +TEMPLATE_VARS += "OPTEE_NAME DEBIAN_BUILD_DEPENDS OPTEE_PLATFORM OPTEE_EXTRA_BUILDARGS" # split strip platform flavor, if any, from the specified platform string OPTEE_PLATFORM_BASE = "${@d.getVar('OPTEE_PLATFORM').split('-')[0]}" @@ -38,9 +38,7 @@ do_prepare_build() { echo "out/arm-plat-${OPTEE_PLATFORM_BASE}/core/$binary /usr/lib/optee-os/${OPTEE_NAME}/" >> \ ${S}/debian/optee-os-${OPTEE_NAME}.install done -} -dpkg_runbuild_prepend() { - export OPTEE_PLATFORM="${OPTEE_PLATFORM}" - export OPTEE_EXTRA_BUILDARGS="${OPTEE_EXTRA_BUILDARGS}" + # restore execute permissions + chmod a+x ${S}/debian/rules } -- 2.25.1