From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6581862148598661120 X-Received: by 2002:a2e:9ac3:: with SMTP id p3-v6mr1071631ljj.17.1532459206222; Tue, 24 Jul 2018 12:06:46 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:9888:: with SMTP id a130-v6ls646589lfe.0.gmail; Tue, 24 Jul 2018 12:06:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfY4iNjny3PioF9Y4/kyIvEsq5C/fPx0nQEsQJgsLrQJ09YxEYV2ZW4uwwVaJADKlQdIcJW X-Received: by 2002:a19:c995:: with SMTP id z143-v6mr811701lff.40.1532459205795; Tue, 24 Jul 2018 12:06:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532459205; cv=none; d=google.com; s=arc-20160816; b=jxF8p8KnOnNLva52PGN/pm4mx+5K4apQtbxaaSmgdTP5AYCjaFWM216HDZtcPHNPHe cb1mVZ93LCf1sJX1vRL88BoSd1ZWp0J/c0SifLVVyXuxDQjLEv5orBq1QDf41lBSB4JT YY4/i5HZ/XL+kFJ3ehXRbhhWxtKw01qYit1lXZ+x3izMAdcii28sJJZr9ga5qkw9yEVw Njq8T0z8wNeG2lYEfDgWuSDj4lnmvEZGGDB8gdqSv5bkzeeHc2b6wUMLpNIDMWnmTJaE orfHR5ClXEIPpsvE1o7ZPZiqL5l7lk+PV5rFHG+b7+9q4Q1VyS8WAi6TRMkkP6dPyJPF PQ0g== 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=oAIPkAExrAxyv7tKyXyISKKrnNGgjoH4VeyLXQhT33Y=; b=tIlTey0OsaLZhgAs6BwvE9LjpzwaPQzMRHSGuADUEm/JZ7FLJ27uHH1rnJWvnkcTYQ CBJR2vI92++KrSKtlpOR6gZXzIux/hAyiPanXWKlaGeLBChWYzz5dy26wUyVm9KuSqO+ UfEr3v73opdgst/QEOZCfDSEOQwWOftN8gCZ7BO2g9AQvDqBOjOTButepAHlq+yC9ou3 D8T5jqqpYKrteIBlYpDOd+oVtJIG0fvz8C30DhXImUHa7Hl5t5Cbi13SCuxL4zZ5mWUl GYe1XM8YFZxnkCZvSoejDUbCGdY6Ld9w1kcXL5gEsGmpaKy/sRBRyaBK6sC1Aenfm2Cc Luyg== 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 l3-v6si423328ljc.2.2018.07.24.12.06.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 12:06:45 -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 w6OJ6PE1020773 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Jul 2018 21:06:36 +0200 From: Alexander Smirnov To: isar-users@googlegroups.com Cc: Alexander Smirnov Subject: [PATCH v4 07/10] linux-module: Export ARCH and CROSS_COMPILE Date: Tue, 24 Jul 2018 22:06:15 +0300 Message-Id: <20180724190618.19155-8-asmirnov@ilbers.de> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180724190618.19155-1-asmirnov@ilbers.de> References: <20180724190618.19155-1-asmirnov@ilbers.de> X-TUID: 783aCtSztOrl 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.1.4