All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Sam Ravnborg <sam@ravnborg.org>, Michal Marek <mmarek@suse.cz>,
	linux-kbuild <linux-kbuild@vger.kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	David Herrmann <dh.herrmann@googlemail.com>,
	Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH 1/6] kbuild: add support for building userspace api programs
Date: Sun, 13 Jul 2014 12:23:50 -0700	[thread overview]
Message-ID: <53C2DCC6.4070209@infradead.org> (raw)
In-Reply-To: <1405276974-17323-1-git-send-email-sam@ravnborg.org>

Hi Sam,

On 07/13/14 11:42, Sam Ravnborg wrote:
> 
> diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
> index c600e2f..713ea10 100644
> --- a/Documentation/kbuild/makefiles.txt
> +++ b/Documentation/kbuild/makefiles.txt
> @@ -761,7 +763,43 @@ Both possibilities are described in the following.
>  	like hostprogs-y. But only hostprogs-y is recommended to be used
>  	when no CONFIG symbols are involved.
>  
> -=== 5 Kbuild clean infrastructure
> +=== 5 Samples support (uapiprogs-y)
> +
> +Kbuild support building sample modules and sample binaries.

          supports

> +To build sample modules the existing infrastructure is used, but
> +to build sample binaries kbuild adds dedicated suppport.
> +
> +The sample binaries are build for the same host and bit-size as the kernel.

                           built

> +
> +The samples may demonstrate facilities not yet available
> +in the installed libc therefore they are build so they include

                    libc;                   built

> +headers from the exported uapi headers before the libc headers
> +are searched.
> +
> +The sample binaries are usually placed in sub-directories
> +below samples/ and specified in samples/Makefile.
> +The directories containing sample binaries are listed using
> +subdir-y - usually like this: subdir-$(CONFIG_SAMPLES) += dir
> +
> +The individual binaries may be defined as single .c file per binary
> +or several .c files for a single binary.
> +See the following examples.
> +
> +	Example:
> +		# samples/hid/Makefile
> +		uapiprogs-y := hid-example
> +
> +	This will compile hid-example.c and create an executable named hid-example.
> +
> +	Example:
> +		# samples/seccomp/Makefile
> +		uapiprogs-y := bpf-fancy
> +		bpf-fancy-y := bpf-fancy.o bpf-helper.o
> +
> +This will compile bpf-fancy.c and bpf-helper.c, and then link the executable
> +bpf-fancy, based on bpf-fancy.o bpf-helper.o.
> +
> +=== 6 Kbuild clean infrastructure
>  
>  "make clean" deletes most generated files in the obj tree where the kernel
>  is compiled. This includes generated files such as host programs.


-- 
~Randy

  parent reply	other threads:[~2014-07-13 19:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-13 18:36 [PATCH v2 0/6] kbuild: use target compiler for user binaries in samples/ Sam Ravnborg
2014-07-13 18:42 ` [PATCH 1/6] kbuild: add support for building userspace api programs Sam Ravnborg
2014-07-13 18:42   ` [PATCH 2/6] samples: refactor Makefile Sam Ravnborg
2014-07-13 19:25     ` Randy Dunlap
2014-07-13 19:52       ` Sam Ravnborg
2014-07-13 20:13         ` Randy Dunlap
2014-07-14  0:26         ` Stephen Rothwell
2014-07-13 18:42   ` [PATCH 3/6] samples: use uapiprogs support for seccomp Sam Ravnborg
2014-07-16  9:43     ` Masahiro Yamada
2014-07-16 10:31       ` Sam Ravnborg
2014-07-17  3:40         ` Masahiro Yamada
2014-07-13 18:42   ` [PATCH 4/6] samples: use uapiprogs support for hidraw Sam Ravnborg
2014-07-13 18:42   ` [PATCH 5/6] samples: fix warnings in uhid-example Sam Ravnborg
2014-07-13 18:42   ` [PATCH 6/6] samples: use uapiprogs support for uhid Sam Ravnborg
2014-07-13 19:23   ` Randy Dunlap [this message]
2014-07-13 19:53     ` [PATCH 1/6] kbuild: add support for building userspace api programs Sam Ravnborg
2014-07-14  0:29 ` [PATCH v2 0/6] kbuild: use target compiler for user binaries in samples/ Stephen Rothwell
2014-07-14  0:33   ` Stephen Rothwell
2014-07-17 15:22     ` Michal Marek
2014-08-21 13:46       ` Michal Marek

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=53C2DCC6.4070209@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=dh.herrmann@googlemail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=sam@ravnborg.org \
    --cc=sfr@canb.auug.org.au \
    --cc=thierry.reding@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.