From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6584097242600177664 X-Received: by 2002:a1c:a00e:: with SMTP id j14-v6mr61519wme.24.1532979604202; Mon, 30 Jul 2018 12:40:04 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:f144:: with SMTP id y4-v6ls4021609wro.3.gmail; Mon, 30 Jul 2018 12:40:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdZNhm/WK0sImiYJwl3HbaQEUncfQ8aMHIVAMyltJ2nNgD77j1dH4qiD23VdEzQIHIGkpR0 X-Received: by 2002:adf:f101:: with SMTP id r1-v6mr2079942wro.26.1532979603826; Mon, 30 Jul 2018 12:40:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532979603; cv=none; d=google.com; s=arc-20160816; b=NnPlsSN4Jj3UnXLXrNwnWbdEQQdaEBOjWTqQPSmaL3sA9tYW/R12R020VqcPHz27C5 2E1p4dA0/pUiIdNl417hR6PsK8cHSFEPbNEElEjRt4OA9jmv1t0QKAgoFgJ6db7laYkV rIvZ/vo3yarRuXLhoKW69EBZ+gGGYKxUbI56D+KR8HTNJ3lS15TeskwUSFNISlH3WqNF efUqoHPHWnT9LdMXIEKOuDL39APYATZT+c+cxAlPCeZb52dg8JTvAyKggJ65wKugX+c/ ud3es8E0ZDowwiUt+epov+HVndMUdRf9jq04LjbLfRdRVnbssZY26ZaBCdcGHpMF/fUZ B2wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=o1Wwe1n4O7F79V2uIh6IRPswfoTBnJ4KMBvfASZlPgI=; b=Jh+wstO/KuvBpefKuXdaHa9dFE4c5Pf+JkNmf/LZKtGnLv2oOXl/PuyrnCl+M+cX3+ Xsu48QHz020EveIw2/a1H4G/sb6Osc3WpB8XVyFgRvnpJdOWhzuQm/qOmv5UalWvYCH9 CDfJBb6J6fQE3Fcxz8KrDp/bjUYOLlZPQx2i43tZG9+5krwJY5+58Jmtz77lNPG0psPB gAtzeEAxrBKOPWF07hoeYfJddxsG2X2zyQ6eTUEfA3Vnp+rlAhmcbpxBMtnObO+8afj6 oFGJ5hwVUKGQuzoX4djejJRxJJA1ZD+BKt1X4opRZMrcg4X0vdxFHYzrBS3Wsg7acfA1 twWA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id a20-v6si388519wmb.4.2018.07.30.12.40.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Jul 2018 12:40:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from localhost.localdomain ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w6UJdiYK013563 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 30 Jul 2018 21:39:54 +0200 From: Alexander Smirnov To: isar-users@googlegroups.com Cc: Alexander Smirnov Subject: [PATCH v5 09/12] linux-module: Export ARCH and CROSS_COMPILE Date: Mon, 30 Jul 2018 19:39:34 +0000 Message-Id: <20180730193937.32694-10-asmirnov@ilbers.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180730193937.32694-1-asmirnov@ilbers.de> References: <20180730193937.32694-1-asmirnov@ilbers.de> X-TUID: 5rVvuZfWJWwa Export necessary kernel variables to be able to cross-build modules. Signed-off-by: Alexander Smirnov --- meta/recipes-kernel/linux-module/files/debian/rules | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meta/recipes-kernel/linux-module/files/debian/rules b/meta/recipes-kernel/linux-module/files/debian/rules index 46cf977..95206b7 100755 --- a/meta/recipes-kernel/linux-module/files/debian/rules +++ b/meta/recipes-kernel/linux-module/files/debian/rules @@ -11,5 +11,17 @@ export KDIR=$(shell ls -d /lib/modules/*/build) export DEB_BUILD_OPTIONS=parallel=$(shell nproc) +export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- + +ifeq ($(DEB_HOST_GNU_CPU), arm) +export ARCH=arm +endif +ifeq ($(DEB_HOST_GNU_CPU), arm64) +export ARCH=arm64 +endif +ifneq (,$(findstring 86,$(DEB_HOST_GNU_CPU))) +export ARCH=x86 +endif + %: CFLAGS= LDFLAGS= dh $@ --parallel -- 2.11.0