From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6520199916203016192 X-Received: by 10.46.9.80 with SMTP id 77mr84389ljj.11.1518678956352; Wed, 14 Feb 2018 23:15:56 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.54.2 with SMTP id d2ls1952515lja.10.gmail; Wed, 14 Feb 2018 23:15:55 -0800 (PST) X-Google-Smtp-Source: AH8x2267eoRikiyvKYmhyWz9+v0Mj+fARFGjM8/Eg+UJHe18g1Q2jXWegh4mZfE/PjPzN91AX4h6 X-Received: by 10.46.43.18 with SMTP id q18mr15786lje.27.1518678955753; Wed, 14 Feb 2018 23:15:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518678955; cv=none; d=google.com; s=arc-20160816; b=BAkJsO2eBDukG0X1l/2FSFCeRQ2bNBPJNH7JRKz30Pdb5nVwiba9ma+7J9QhsbQmo1 zMCddrcRErM2+YSFcY0XaOq9YdIbXbKQ2Gamk88dDoWXvjg0wOXjI7zS4dnf+NqAql1S LxbP1At5L3Cnokdbr1mQFmZ63DZBmcSPGTn24jdhzBHg3NZDfxdqcGLYUwuJV5K0dqfn nkJU5TpIUQZByP6KJmXrgV4tteOVz+0Ohte3V9B5rNhiUF0+PKV1Lw0bH1q42lQLqxG8 nAWUeo1wi1QpxQS1q6hQ6Fyo8bw7o8nyasIX2c+kUrU527qF94jiG2zbTjjGiLSJP2jX D07g== 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=IfJtIm6+LyARnQKFISAWiPVJjosSqncaGVjzmnEtwPY=; b=yrTHUyHTsq6wRQSqN5O5Y/crdDFMNyFTDkThadMtg/FRkU3hts2x8Id4jrxCBE8cTP f1u6hSHtFjT1P2TntEa2/Apems82Phm9Zy9H40oUQnq+BnfSQgj5CkaAtgTMKFzk5On7 tfAqLPD3U5xB38pDJsxkyjGI+McDUDMfOMW/qnK0tqegGsVfQESnjbdiw0jmzD5TEgvR Yz6EVLfzDp/zWR6BqzANLBnf0FjU49H0seWRKEjtFtqxtoOSV1LQKlk3xVjkDnk6Czkf EAYoKBBpBvSmsw10x2cDbzsKQYUreahpfB7uYeYgy6K8yMes+nYXxA3TEFpn+FcrpLqh fR+Q== 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 w29si1028553lfc.5.2018.02.14.23.15.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Feb 2018 23:15:55 -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 w1F7FoTA013155 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 15 Feb 2018 08:15:53 +0100 Subject: Re: [PATCH v6 5/5] Add exemplary kernel module To: Jan Kiszka , isar-users References: <4e502291374cbbdfd24827ad4f039517d4297e96.1518599595.git.jan.kiszka@siemens.com> From: Alexander Smirnov Message-ID: Date: Thu, 15 Feb 2018 10:15:45 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: jxhe+9NiWhSq On 02/14/2018 06:21 PM, Jan Kiszka wrote: > From: Jan Kiszka > > This demonstrates the usage of the new module.inc via a primitive > hello world module. > > For wheezy:vexpress, module builds unfortunately fail with > /usr/bin/ld: unrecognized option '-Wl,-z,relro' > > So disable the example on in the related multiconfig. > Any plans to fix this? Alex > Signed-off-by: Jan Kiszka > --- > > Changes in v6: > - wheezy:vexpress exception > > meta-isar/conf/local.conf.sample | 2 +- > meta-isar/conf/multiconfig/qemuarm-wheezy.conf | 3 +++ > .../recipes-kernel/example-module/example-module.bb | 12 ++++++++++++ > .../recipes-kernel/example-module/files/src/Makefile | 18 ++++++++++++++++++ > .../example-module/files/src/example-module.c | 19 +++++++++++++++++++ > 5 files changed, 53 insertions(+), 1 deletion(-) > create mode 100644 meta-isar/recipes-kernel/example-module/example-module.bb > create mode 100644 meta-isar/recipes-kernel/example-module/files/src/Makefile > create mode 100644 meta-isar/recipes-kernel/example-module/files/src/example-module.c > > diff --git a/meta-isar/conf/local.conf.sample b/meta-isar/conf/local.conf.sample > index 2ae43e7..92dea46 100644 > --- a/meta-isar/conf/local.conf.sample > +++ b/meta-isar/conf/local.conf.sample > @@ -153,7 +153,7 @@ CONF_VERSION = "1" > > # > # The default list of extra packages to be installed. > -IMAGE_INSTALL = "example-hello example-raw" > +IMAGE_INSTALL = "example-hello example-raw example-module" > > # > # Default parallel jobs for bitbake: > diff --git a/meta-isar/conf/multiconfig/qemuarm-wheezy.conf b/meta-isar/conf/multiconfig/qemuarm-wheezy.conf > index 11355a4..90e337a 100644 > --- a/meta-isar/conf/multiconfig/qemuarm-wheezy.conf > +++ b/meta-isar/conf/multiconfig/qemuarm-wheezy.conf > @@ -21,3 +21,6 @@ QEMU_ARCH ?= "arm" > QEMU_MACHINE ?= "vexpress-a9" > QEMU_CPU ?= "" > QEMU_ROOTFS_DEV ?= "-sd ##ROOTFS_IMAGE##" > + > +# module build does not work on wheezy for vexpress > +IMAGE_INSTALL_remove = "example-module" > diff --git a/meta-isar/recipes-kernel/example-module/example-module.bb b/meta-isar/recipes-kernel/example-module/example-module.bb > new file mode 100644 > index 0000000..c7042cf > --- /dev/null > +++ b/meta-isar/recipes-kernel/example-module/example-module.bb > @@ -0,0 +1,12 @@ > +# Example recipe for building a custom module > +# > +# This software is a part of ISAR. > +# Copyright (c) Siemens AG, 2018 > +# > +# SPDX-License-Identifier: MIT > + > +include recipes-kernel/linux-module/module.inc > + > +SRC_URI += "file://src" > + > +S = "src" > diff --git a/meta-isar/recipes-kernel/example-module/files/src/Makefile b/meta-isar/recipes-kernel/example-module/files/src/Makefile > new file mode 100644 > index 0000000..1625b28 > --- /dev/null > +++ b/meta-isar/recipes-kernel/example-module/files/src/Makefile > @@ -0,0 +1,18 @@ > +# Example module > +# > +# This software is a part of ISAR. > +# Copyright (c) Siemens AG, 2018 > +# > +# SPDX-License-Identifier: GPL-2.0 > + > +obj-m := example-module.o > + > +INSTALL_MOD_PATH ?= $(DESTDIR) > +export INSTALL_MOD_PATH > + > +modules modules_install clean: > + $(MAKE) -C $(KDIR) M=$(PWD) $@ > + > +install: modules_install > + > +.PHONY: modules modules_install install clean > diff --git a/meta-isar/recipes-kernel/example-module/files/src/example-module.c b/meta-isar/recipes-kernel/example-module/files/src/example-module.c > new file mode 100644 > index 0000000..07cb214 > --- /dev/null > +++ b/meta-isar/recipes-kernel/example-module/files/src/example-module.c > @@ -0,0 +1,19 @@ > +/* > + * Example modules > + * > + * Copyright (c) Siemens AG, 2018 > + * > + * SPDX-License-Identifier: GPL-2.0 > + */ > + > +#include > + > +static int __init example_module_init(void) > +{ > + printk("Just an example\n"); > + return -ENOANO; > +} > + > +module_init(example_module_init); > + > +MODULE_LICENSE("GPL"); > -- 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