From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6520199916203016192 X-Received: by 10.28.173.203 with SMTP id w194mr815038wme.24.1518681670361; Thu, 15 Feb 2018 00:01:10 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.223.208.133 with SMTP id y5ls5861376wrh.5.gmail; Thu, 15 Feb 2018 00:01:09 -0800 (PST) X-Google-Smtp-Source: AH8x227mD2Qcvbdbj5jVW2zbHxjMvRA/ylFDem3rrcwXv15QGzNqvTeRei7HPflVHrxoFaLmH6Ss X-Received: by 10.223.187.200 with SMTP id z8mr608290wrg.28.1518681669888; Thu, 15 Feb 2018 00:01:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518681669; cv=none; d=google.com; s=arc-20160816; b=XjhbStqefd1g6MsmrivQsBfTU9WMg6vf1Ol5RB7/EiUd0BEwkJrTCjzhmqx/H2rCRn OKdhDDqC88/XTSBtHCZd6af758+77YKGa7g8Anp6yhBKFW8xxQTpmPYZF7XLho3uKhre QzL80GoS9lf/sLoFZYNvoKDhAvl8sTewF9W23JCBqNKlytpyVvGmAIg77NF8E/uFiOSJ aqHiCnZ+kr51CaLy+7CxGnYQJ0VIwnCMWPBef7+ztmcNNxbMv3KwVwJ9O2RsJF3F8Zds o9v2rKjfT5bEulYL3jGHARwzrkBjFgC1DaGLXILFP+U4KKKJ2mLbcCCfKpJMRN2ptgcR hAdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :arc-authentication-results; bh=T/cLXb+9xSgiBgquFAdNytdeCUEce+BcjXsqWGDkjTY=; b=C30TZLdJwrkV14zPqBdjNk5yDn3XOBdH1BNYiST7kgURMpIQUdF/iCsaPpiS0/BbY4 iwL2uOKz1f/4b7UrwXiWLEcQQU68d0XJn+hbmQLw838iEfm1P8wfTBAJQ8XXNXDSgFuB W9bI18c375XVW6Lzf1m4PBwzKKuwMfWBRTr7U6TFOBHbuOlycgC9eEpNHpbUu2cFBAyW SM2tsDmVoR92BOlzyBWcFgF0D03EhUWM7VCZIiWpG42KEvVpPw0zb6bu+4WNmu+lPn+U u44x+9fNGwtHnyWOq+sp+omWzMszD8qAYNbADYBE56ufLTyXGu5aJ04oBXDbdA2lM25O 3y1A== 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 s81si760072wmd.2.2018.02.15.00.01.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Feb 2018 00:01:09 -0800 (PST) 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 [10.0.2.15] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w1F816XS013301 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 15 Feb 2018 09:01:08 +0100 Subject: Re: [PATCH v6 4/5] Provide include file for easy custom module builds To: Jan Kiszka , isar-users References: <4e502291374cbbdfd24827ad4f039517d4297e96.1518599595.git.jan.kiszka@siemens.com> <59a2a6e6-c4f9-f8d5-cfd5-7c74834a0cd1@siemens.com> <701d4870-d831-b22d-2b25-2f9ebffb88ea@ilbers.de> <45897f97-9ef1-82d2-e56b-c038c4f7161b@siemens.com> From: Alexander Smirnov Message-ID: Date: Thu, 15 Feb 2018 11:01:01 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <45897f97-9ef1-82d2-e56b-c038c4f7161b@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: SaDmp1TKOVPV On 02/15/2018 10:54 AM, Jan Kiszka wrote: > On 2018-02-15 08:54, Alexander Smirnov wrote: >> >> On 02/15/2018 10:35 AM, Jan Kiszka wrote: >>> From: Jan Kiszka >>> >>> This provides an include for custom kernel modules. We choose an include >>> over a class as we carry a couple of files to debianize the module. The >>> user just needs to specify the module SRC_URI, and those sources must be >>> then reside in a separate directory which is - as usual - defined via S. >>> >> >> Should I take then [v5 5/5]? > > Yes, that's what I meant below. > Damn, sorry, thanks :-) Alex > Jan > >> >> Alex >> >>> Signed-off-by: Jan Kiszka >>> --- >>> >>> Changes in v6: >>>   - fix module build on wheezy-arm and (upcoming) stretch-arm64 >>> >>> This allows to keep v5 of patch 5. Sorry for the mess, but I initially >>> thought it was an issue with old wheezy on special ARM hardware only. >>> But when it also popped up on stretch-arm64, I finally analyzed it. >>> >>>   .../linux-module/files/debian/changelog            |  5 +++++ >>>   .../linux-module/files/debian/compat               |  1 + >>>   .../linux-module/files/debian/control              | 11 ++++++++++ >>>   .../recipes-kernel/linux-module/files/debian/rules | 15 ++++++++++++++ >>>   meta/recipes-kernel/linux-module/module.inc        | 24 >>> ++++++++++++++++++++++ >>>   5 files changed, 56 insertions(+) >>>   create mode 100644 >>> meta/recipes-kernel/linux-module/files/debian/changelog >>>   create mode 100644 meta/recipes-kernel/linux-module/files/debian/compat >>>   create mode 100644 >>> meta/recipes-kernel/linux-module/files/debian/control >>>   create mode 100755 meta/recipes-kernel/linux-module/files/debian/rules >>>   create mode 100644 meta/recipes-kernel/linux-module/module.inc >>> >>> diff --git a/meta/recipes-kernel/linux-module/files/debian/changelog >>> b/meta/recipes-kernel/linux-module/files/debian/changelog >>> new file mode 100644 >>> index 0000000..c1c3516 >>> --- /dev/null >>> +++ b/meta/recipes-kernel/linux-module/files/debian/changelog >>> @@ -0,0 +1,5 @@ >>> +@PN@ (@PV@) unstable; urgency=low >>> + >>> +  * Generated package. >>> + >>> + -- ISAR project   Tue, 6 Feb 2018 >>> 00:00:00 +0000 >>> diff --git a/meta/recipes-kernel/linux-module/files/debian/compat >>> b/meta/recipes-kernel/linux-module/files/debian/compat >>> new file mode 100644 >>> index 0000000..ec63514 >>> --- /dev/null >>> +++ b/meta/recipes-kernel/linux-module/files/debian/compat >>> @@ -0,0 +1 @@ >>> +9 >>> diff --git a/meta/recipes-kernel/linux-module/files/debian/control >>> b/meta/recipes-kernel/linux-module/files/debian/control >>> new file mode 100644 >>> index 0000000..707f857 >>> --- /dev/null >>> +++ b/meta/recipes-kernel/linux-module/files/debian/control >>> @@ -0,0 +1,11 @@ >>> +Source: @PN@ >>> +Section: kernel >>> +Priority: optional >>> +Standards-Version: 3.9.6 >>> +Build-Depends: linux-headers-@KERNEL_NAME@ >>> +Maintainer: ISAR project >>> + >>> +Package: @PN@ >>> +Architecture: any >>> +Depends: linux-image-@KERNEL_NAME@ >>> +Description: @DESCRIPTION@ >>> diff --git a/meta/recipes-kernel/linux-module/files/debian/rules >>> b/meta/recipes-kernel/linux-module/files/debian/rules >>> new file mode 100755 >>> index 0000000..46cf977 >>> --- /dev/null >>> +++ b/meta/recipes-kernel/linux-module/files/debian/rules >>> @@ -0,0 +1,15 @@ >>> +#!/usr/bin/make -f >>> + >>> +# Debian rules for custom kernel module build >>> +# >>> +# This software is a part of ISAR. >>> +# Copyright (c) Siemens AG, 2018 >>> +# >>> +# SPDX-License-Identifier: MIT >>> + >>> +export KDIR=$(shell ls -d /lib/modules/*/build) >>> + >>> +export DEB_BUILD_OPTIONS=parallel=$(shell nproc) >>> + >>> +%: >>> +    CFLAGS= LDFLAGS= dh $@ --parallel >>> diff --git a/meta/recipes-kernel/linux-module/module.inc >>> b/meta/recipes-kernel/linux-module/module.inc >>> new file mode 100644 >>> index 0000000..aa232f7 >>> --- /dev/null >>> +++ b/meta/recipes-kernel/linux-module/module.inc >>> @@ -0,0 +1,24 @@ >>> +# Custom kernel module recipe include >>> +# >>> +# This software is a part of ISAR. >>> +# Copyright (c) Siemens AG, 2018 >>> +# >>> +# SPDX-License-Identifier: MIT >>> + >>> +FILESPATH =. "${LAYERDIR_core}/recipes-kernel/linux-module/files:" >>> + >>> +DESCRIPTION ?= "Custom kernel module ${PN}" >>> + >>> +DEPENDS += "linux-headers-${KERNEL_NAME}" >>> + >>> +SRC_URI += "file://debian/" >>> + >>> +inherit dpkg >>> + >>> +dpkg_runbuild_prepend() { >>> +    cp -r ${WORKDIR}/debian ${WORKDIR}/${S}/ >>> +    sed -i -e 's/@PN@/${PN}/g' -e 's/@PV@/${PV}/g' \ >>> +           -e 's/@KERNEL_NAME@/${KERNEL_NAME}/g' \ >>> +           -e 's/@DESCRIPTION@/${DESCRIPTION}/g' \ >>> +        ${WORKDIR}/${S}/debian/changelog ${WORKDIR}/${S}/debian/control >>> +} >>> >> > > -- With best regards, Alexander Smirnov ilbers GmbH Baierbrunner Str. 28c D-81379 Munich +49 (89) 122 67 24-0 http://ilbers.de/ Commercial register Munich, HRB 214197 General manager: Baurzhan Ismagulov