[0/3] net: bpfilter: clean-up build rules

Message ID 1528477930-7342-1-git-send-email-yamada.masahiro@socionext.com
Headers show
  • net: bpfilter: clean-up build rules
Related show


Masahiro Yamada June 8, 2018, 5:12 p.m.
I am unhappy with ugly hacks in this Makefile.
(I could understand what is the hand-crafted .bpfilter_umh.o.cmd
used for.)

Moreover, CONFIG_OUTPUT_FORMAT is causing build errors
because it is defined only for x86.

As far as I understood, what is happening here is
to embed the 'bpfilter_umh' as a blob.
Instead, we can use '.incbin' to include it into a *.S file.

Also, let's stop (ab)using host-program rules.

Only build test is done.

Masahiro Yamada (3):
  bpfilter: add bpfilter_umh to .gitignore
  bpfilter: include bpfilter_umh in assembly instead of using objcopy
  bpfilter: do not (ab)use host-program build rule

 net/bpfilter/.gitignore                 |  1 +
 net/bpfilter/Makefile                   | 30 ++++++++++++------------------
 net/bpfilter/bpfilter_kern.c            | 11 +++++------
 net/bpfilter/{main.c => bpfilter_umh.c} |  0
 net/bpfilter/bpfilter_umh_blob.S        |  7 +++++++
 5 files changed, 25 insertions(+), 24 deletions(-)
 create mode 100644 net/bpfilter/.gitignore
 rename net/bpfilter/{main.c => bpfilter_umh.c} (100%)
 create mode 100644 net/bpfilter/bpfilter_umh_blob.S