bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/16] kbuild: support 'userprogs' syntax
@ 2020-04-23  7:39 Masahiro Yamada
  2020-04-23  7:39 ` [PATCH 01/16] Documentation: kbuild: fix the section title format Masahiro Yamada
                   ` (16 more replies)
  0 siblings, 17 replies; 31+ messages in thread
From: Masahiro Yamada @ 2020-04-23  7:39 UTC (permalink / raw)
  To: linux-kbuild
  Cc: bpf, Sam Ravnborg, Masahiro Yamada, Alexei Starovoitov,
	Andrii Nakryiko, Christian Brauner, Daniel Borkmann,
	David S. Miller, Jakub Kicinski, John Fastabend, Jonathan Corbet,
	KP Singh, Martin KaFai Lau, Michal Marek, Song Liu,
	Tomas Winkler, Yonghong Song, linux-doc, linux-kernel, netdev


Several Makefiles use 'hostprogs' for building the code for
the host architecture is not appropriate.

This is just because Kbuild does not provide the syntax to do it.

This series introduce 'userprogs' syntax and use it from
sample and bpf Makefiles.

Sam worked on this in 2014.
https://lkml.org/lkml/2014/7/13/154

He used 'uapiprogs-y' but I just thought the meaning of
"UAPI programs" is unclear.

Naming is one the most difficult parts of this.

I chose 'userprogs'.
Anothor choice I had in my mind was 'targetprogs'.

If you can test this series quickly by
'make allmodconfig samples/'

When building objects for userspace, [U] is displayed.

masahiro@oscar:~/workspace/linux$ make allmodconfig samples/
  [snip]
  AR      samples/vfio-mdev/built-in.a
  CC [M]  samples/vfio-mdev/mtty.o
  CC [M]  samples/vfio-mdev/mdpy.o
  CC [M]  samples/vfio-mdev/mdpy-fb.o
  CC [M]  samples/vfio-mdev/mbochs.o
  AR      samples/mei/built-in.a
  CC [U]  samples/mei/mei-amt-version
  CC [U]  samples/auxdisplay/cfag12864b-example
  CC [M]  samples/configfs/configfs_sample.o
  CC [M]  samples/connector/cn_test.o
  CC [U]  samples/connector/ucon
  CC [M]  samples/ftrace/ftrace-direct.o
  CC [M]  samples/ftrace/ftrace-direct-too.o
  CC [M]  samples/ftrace/ftrace-direct-modify.o
  CC [M]  samples/ftrace/sample-trace-array.o
  CC [U]  samples/hidraw/hid-example
  CC [M]  samples/hw_breakpoint/data_breakpoint.o
  CC [M]  samples/kdb/kdb_hello.o
  CC [M]  samples/kfifo/bytestream-example.o
  CC [M]  samples/kfifo/dma-example.o
  CC [M]  samples/kfifo/inttype-example.o
  CC [M]  samples/kfifo/record-example.o
  CC [M]  samples/kobject/kobject-example.o
  CC [M]  samples/kobject/kset-example.o
  CC [M]  samples/kprobes/kprobe_example.o
  CC [M]  samples/kprobes/kretprobe_example.o
  CC [M]  samples/livepatch/livepatch-sample.o
  CC [M]  samples/livepatch/livepatch-shadow-mod.o
  CC [M]  samples/livepatch/livepatch-shadow-fix1.o
  CC [M]  samples/livepatch/livepatch-shadow-fix2.o
  CC [M]  samples/livepatch/livepatch-callbacks-demo.o
  CC [M]  samples/livepatch/livepatch-callbacks-mod.o
  CC [M]  samples/livepatch/livepatch-callbacks-busymod.o
  CC [M]  samples/rpmsg/rpmsg_client_sample.o
  CC [U]  samples/seccomp/bpf-fancy.o
  CC [U]  samples/seccomp/bpf-helper.o
  LD [U]  samples/seccomp/bpf-fancy
  CC [U]  samples/seccomp/dropper
  CC [U]  samples/seccomp/bpf-direct
  CC [U]  samples/seccomp/user-trap
  CC [U]  samples/timers/hpet_example
  CC [M]  samples/trace_events/trace-events-sample.o
  CC [M]  samples/trace_printk/trace-printk.o
  CC [U]  samples/uhid/uhid-example
  CC [M]  samples/v4l/v4l2-pci-skeleton.o
  CC [U]  samples/vfs/test-fsmount
  CC [U]  samples/vfs/test-statx
samples/vfs/test-statx.c:24:15: warning: ‘struct foo’ declared inside parameter list will not be visible outside of this definition or declaration
   24 | #define statx foo
      |               ^~~
  CC [U]  samples/watchdog/watchdog-simple
  AR      samples/built-in.a



Masahiro Yamada (15):
  Documentation: kbuild: fix the section title format
  Revert "objtool: Skip samples subdirectory"
  kbuild: add infrastructure to build userspace programs
  net: bpfilter: use 'userprogs' syntax to build bpfilter_umh
  samples: seccomp: build sample programs for target architecture
  kbuild: doc: document the new syntax 'userprogs'
  samples: uhid: build sample program for target architecture
  samples: hidraw: build sample program for target architecture
  samples: connector: build sample program for target architecture
  samples: vfs: build sample programs for target architecture
  samples: pidfd: build sample program for target architecture
  samples: mei: build sample program for target architecture
  samples: auxdisplay: use 'userprogs' syntax
  samples: timers: use 'userprogs' syntax
  samples: watchdog: use 'userprogs' syntax

Sam Ravnborg (1):
  samples: uhid: fix warnings in uhid-example

 Documentation/kbuild/makefiles.rst | 185 +++++++++++++++++++++--------
 Makefile                           |  11 +-
 net/bpfilter/Makefile              |  11 +-
 samples/Kconfig                    |  26 +++-
 samples/Makefile                   |   5 +-
 samples/auxdisplay/Makefile        |  11 +-
 samples/connector/Makefile         |  12 +-
 samples/hidraw/Makefile            |   9 +-
 samples/mei/Makefile               |   9 +-
 samples/pidfd/Makefile             |   8 +-
 samples/seccomp/Makefile           |  42 +------
 samples/timers/Makefile            |  17 +--
 samples/uhid/.gitignore            |   2 +
 samples/uhid/Makefile              |   9 +-
 samples/uhid/uhid-example.c        |   4 +-
 samples/vfs/Makefile               |  11 +-
 samples/watchdog/Makefile          |  10 +-
 scripts/Makefile.build             |   5 +
 scripts/Makefile.clean             |   2 +-
 scripts/Makefile.userprogs         |  44 +++++++
 20 files changed, 258 insertions(+), 175 deletions(-)
 create mode 100644 samples/uhid/.gitignore
 create mode 100644 scripts/Makefile.userprogs

-- 
2.25.1


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2020-06-30 16:47 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-23  7:39 [PATCH 00/16] kbuild: support 'userprogs' syntax Masahiro Yamada
2020-04-23  7:39 ` [PATCH 01/16] Documentation: kbuild: fix the section title format Masahiro Yamada
2020-04-23  7:39 ` [PATCH 02/16] Revert "objtool: Skip samples subdirectory" Masahiro Yamada
2020-04-24 20:32   ` Josh Poimboeuf
2020-04-29  2:43     ` Masahiro Yamada
2020-04-23  7:39 ` [PATCH 03/16] kbuild: add infrastructure to build userspace programs Masahiro Yamada
2020-04-23 15:15   ` Masahiro Yamada
2020-04-23  7:39 ` [PATCH 04/16] net: bpfilter: use 'userprogs' syntax to build bpfilter_umh Masahiro Yamada
2020-04-28  1:46   ` kbuild test robot
2020-04-28  5:13     ` Masahiro Yamada
2020-06-08 11:56   ` Michal Kubecek
2020-06-08 13:32     ` Masahiro Yamada
2020-06-30  6:30     ` Masahiro Yamada
2020-06-30  8:57       ` Michal Kubecek
2020-06-30 16:47       ` Alexei Starovoitov
2020-04-23  7:39 ` [PATCH 05/16] samples: seccomp: build sample programs for target architecture Masahiro Yamada
2020-04-23  7:39 ` [PATCH 06/16] kbuild: doc: document the new syntax 'userprogs' Masahiro Yamada
2020-04-23  7:39 ` [PATCH 07/16] samples: uhid: fix warnings in uhid-example Masahiro Yamada
2020-04-23  7:39 ` [PATCH 08/16] samples: uhid: build sample program for target architecture Masahiro Yamada
2020-04-23  7:39 ` [PATCH 09/16] samples: hidraw: " Masahiro Yamada
2020-04-23  7:39 ` [PATCH 10/16] samples: connector: " Masahiro Yamada
2020-04-23  7:39 ` [PATCH 11/16] samples: vfs: build sample programs " Masahiro Yamada
2020-04-23  7:39 ` [PATCH 12/16] samples: pidfd: build sample program " Masahiro Yamada
2020-04-23  7:39 ` [PATCH 13/16] samples: mei: " Masahiro Yamada
2020-04-23  7:39 ` [PATCH 14/16] samples: auxdisplay: use 'userprogs' syntax Masahiro Yamada
2020-04-23 11:50   ` Miguel Ojeda
2020-04-24  2:59     ` Masahiro Yamada
2020-04-23  7:39 ` [PATCH 15/16] samples: timers: " Masahiro Yamada
2020-04-23  7:39 ` [PATCH 16/16] samples: watchdog: " Masahiro Yamada
2020-04-25 11:53 ` [PATCH 00/16] kbuild: support " Sam Ravnborg
2020-04-29  2:38   ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).