public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Alexander Smirnov <asmirnov@ilbers.de>
To: Jan Kiszka <jan.kiszka@siemens.com>,
	isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH v6 5/5] Add exemplary kernel module
Date: Thu, 15 Feb 2018 10:15:45 +0300	[thread overview]
Message-ID: <bdd3215a-b24c-5a45-1454-8c2b622e681c@ilbers.de> (raw)
In-Reply-To: <ff2d6d2e-8edf-6fd1-5c88-238ee96cbc01@siemens.com>

On 02/14/2018 06:21 PM, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> 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 <jan.kiszka@siemens.com>
> ---
> 
> 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 <linux/module.h>
> +
> +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

  reply	other threads:[~2018-02-15  7:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14  9:13 [PATCH v5 0/5] Provide infrastructure and examples for custom kernels and modules Jan Kiszka
2018-02-14  9:13 ` [PATCH v5 1/5] Make distro kernel replaceable Jan Kiszka
2018-02-14  9:13 ` [PATCH v5 2/5] Provide include for easy custom kernel builds Jan Kiszka
2018-02-14 19:35   ` [PATCH v6 " Jan Kiszka
2018-02-14  9:13 ` [PATCH v5 3/5] Add custom kernel examples Jan Kiszka
2018-02-14  9:13 ` [PATCH v5 4/5] Provide include file for easy custom module builds Jan Kiszka
2018-02-14  9:13 ` [PATCH v5 5/5] Add exemplary kernel module Jan Kiszka
2018-02-14 15:21   ` [PATCH v6 " Jan Kiszka
2018-02-15  7:15     ` Alexander Smirnov [this message]
2018-02-15  7:35       ` [PATCH v6 4/5] Provide include file for easy custom module builds Jan Kiszka
2018-02-15  7:54         ` Alexander Smirnov
2018-02-15  7:54           ` Jan Kiszka
2018-02-15  8:01             ` Alexander Smirnov
2018-02-15 11:24 ` [PATCH v5 0/5] Provide infrastructure and examples for custom kernels and modules Alexander Smirnov
2018-02-15 15:14   ` Jan Kiszka
2018-02-15 14:43 ` Alexander Smirnov
2018-02-15 15:00   ` Jan Kiszka
2018-02-15 15:04     ` Alexander Smirnov
2018-02-15 15:13       ` Jan Kiszka
2018-02-15 15:27         ` Alexander Smirnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bdd3215a-b24c-5a45-1454-8c2b622e681c@ilbers.de \
    --to=asmirnov@ilbers.de \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox