tools/ because I do not know the
requirements for building tools. I do not find any GNU Make version
checks under tools/.
Signed-off-by: Masahiro Yamada
---
Documentation/process/changes.rst | 4 ++--
Makefile | 22 +++---
scripts/Kbuild.include
ON to select an algorithm other than gzip.
>
> While FIT supports a ramdisk / initrd, no attempt is made to support
> this here, since it must be built separately from the Linux build.
>
> Signed-off-by: Simon Glass
> ---
>
> Changes in v12:
> - Avoid showing FIT message if V=0
Acked-by: Masahiro Yamada
--
Best Regards
Masahiro Yamada
override the compression algorithm
> +FIT_COMPRESSION ?= gzip
> +
> +quiet_cmd_fit = FIT $@
> + cmd_fit = $(MAKE_FIT) -o $@ --arch $(UIMAGE_ARCH) --os linux \
> + --name '$(UIMAGE_NAME)' $(if $(V),-v) \
> + --compress $(FIT_COMPRESSION) -k $< @$(word 2,$^)
> +
A nit in your new code.
$(if $(V),-v) does not work for KBUILD_VERBOSE env variable.
It should be
$(if $(findstring 1,$(KBUILD_VERBOSE)),-v)
--
Best Regards
Masahiro Yamada
On Fri, Mar 8, 2024 at 12:55 PM Simon Glass wrote:
>
> Hi Masahiro,
>
> On Thu, 22 Feb 2024 at 01:38, Masahiro Yamada wrote:
> >
> > On Sat, Feb 3, 2024 at 2:30 AM Simon Glass wrote:
> > >
> > > Add a script which produces a Flat Image Tree (FIT), a sin
On Wed, Feb 21, 2024 at 9:37 PM Masahiro Yamada wrote:
>
> On Sat, Feb 3, 2024 at 2:30 AM Simon Glass wrote:
> >
> > Add a script which produces a Flat Image Tree (FIT), a single file
> > containing the built kernel and associated devicetree files.
> > Compression
rue
> +
> +seq = 0
> +size = 0
> +fsw = libfdt.FdtSw()
> +setup_fit(fsw, args.name)
> +entries = []
> +
> +# Handle the kernel
> +with open(args.kernel, 'rb') as inf:
> +comp_data = compress_data(inf, args.compress)
> +size += os.path.getsize(args.kernel)
> +write_kernel(fsw, comp_data, args)
> +
> +for path in args.srcdir:
> +# Handle a list of devicetree files
> +if path.startswith('@'):
> +with open(path[1:], 'r', encoding='utf-8') as inf:
> +for fname in inf.read().splitlines():
> +add_file(fname)
You missed the point of my suggestion.
I did not mean the "@file" syntax
specifically for containing the device trees.
It is common for tools to support the "@file" syntax
to avoid "Argument list too long" error.
See "man ar", "man ld", etc. for example.
@file
Read command‐line options from file. The options read are inserted in
place of the original @file option. If file does not exist, or cannot
be read, then the option will be treated literally, and not removed.
It must be generic enough to contain any command line parameters.
And, you do not even implement it yourself because
it is just a matter of adding fromfile_prefix_chars='@'
See the document.
https://docs.python.org/3/library/argparse.html#fromfile-prefix-chars
> +else:
> +add_file(path)
> +
> +finish_fit(fsw, entries)
> +
> +# Include the kernel itself in the returned file count
> +return fsw.as_fdt().as_bytearray(), seq + 1, size
> +
> +
> +def run_make_fit():
> +"""Run the tool's main logic"""
> +args = parse_args()
> +
> +out_data, count, size = build_fit(args)
> +with open(args.fit, 'wb') as outf:
> +outf.write(out_data)
> +
> +ext_fit_size = None
> +if args.external:
> +mkimage = os.environ.get('MKIMAGE', 'mkimage')
> +subprocess.check_call([mkimage, '-E', '-F', args.fit],
> + stdout=subprocess.DEVNULL)
> +
> +with open(args.fit, 'rb') as inf:
> +data = inf.read()
> +ext_fit = libfdt.FdtRo(data)
> +ext_fit_size = ext_fit.totalsize()
I still do not understand why mkimage is needed.
When external data is used, you can insert "data-size"
and "data-offset" to the dt structure,
and at the same time, concatenate the payload data.
Finally, you can combine the two.
Is it complex to implement?
> +
> +comp_size = len(out_data)
> +print(f'FIT size {comp_size:#x}/{comp_size / 1024 / 1024:.1f} MB',
> end='')
> +if ext_fit_size:
> +print(f', header {ext_fit_size:#x}/{ext_fit_size / 1024:.1f} KB',
> end='')
> +print(f', {count} files, uncompressed {size / 1024 / 1024:.1f} MB')
Maybe, you can print this only when args.verbose == True ?
At last, I still do not know how to distinguish the nodes
when the compatible strings are the same.
> +
> +if __name__ == "__main__":
> +sys.exit(run_make_fit())
> --
> 2.34.1
>
--
Best Regards
Masahiro Yamada
On Fri, Feb 2, 2024 at 6:03 AM Rob Herring wrote:
>
> On Wed, Jan 31, 2024 at 8:09 PM Masahiro Yamada wrote:
> >
> > On Thu, Feb 1, 2024 at 7:03 AM Rob Herring wrote:
> > >
> > > On Tue, Jan 30, 2024 at 3:16 AM Masahiro Yamada
> > > wrote:
> >
On Thu, Feb 1, 2024 at 7:03 AM Rob Herring wrote:
>
> On Tue, Jan 30, 2024 at 3:16 AM Masahiro Yamada wrote:
> >
> > On Fri, Jan 26, 2024 at 1:04 AM Simon Glass wrote:
> > >
> > > Hi,
> > >
> > > On Wed, 17 Jan 2024 at 06:14
On Fri, Jan 26, 2024 at 1:04 AM Simon Glass wrote:
>
> Hi,
>
> On Wed, 17 Jan 2024 at 06:14, Simon Glass wrote:
> >
> > Hi Masahiro, Tom,
> >
> > On Tue, 9 Jan 2024 at 07:33, Tom Rini wrote:
> > >
> > > On Tue, Jan 09, 2024 at 11:
t; > one.
>
> Any thoughts on this request, please?
>
> Regards,
> Simon
>
As I mentioned before, I am concerned with having
the same "compatible" entries, with different contents,
as you use the "compatible" string as an ID to selecting
the target config node, right?
$ fdtdump arch/arm64/boot/image.fit
...
conf-10 {
compatible = "tq,am642-tqma6442l-mbax4xxl",
"tq,am642-tqma6442l", "ti,am642";
description = "TQ-Systems TQMa64xxL SoM on MBax4xxL carrier board";
fdt = "fdt-10";
kernel = "kernel";
};
...
conf-25 {
compatible = "tq,am642-tqma6442l-mbax4xxl",
"tq,am642-tqma6442l", "ti,am642";
description = "TQ-Systems TQMa64xxL SoM on MBax4xxL carrier board";
fdt = "fdt-25";
kernel = "kernel";
};
--
Best Regards
Masahiro Yamada
On Fri, Dec 29, 2023 at 3:39 PM Simon Glass wrote:
>
> Hi Masahiro,
>
> On Thu, Dec 14, 2023 at 7:34 AM Masahiro Yamada wrote:
> >
> > On Thu, Dec 14, 2023 at 3:12 PM Masahiro Yamada
> > wrote:
> > >
> > > On Thu, Dec 14, 2023 at 1:03 PM Che
On Thu, Dec 14, 2023 at 3:12 PM Masahiro Yamada wrote:
>
> On Thu, Dec 14, 2023 at 1:03 PM Chen-Yu Tsai wrote:
> >
> > On Sun, Dec 10, 2023 at 1:31 AM Geert Uytterhoeven
> > wrote:
> > >
> > > Hi Laurent,
> > >
> > > On Sat, Dec 9, 2
s because applying
an overlay does not change the compatible string.
With this code in arch/arm64/boot/dts/ti/Makefile:
k3-am642-tqma64xxl-mbax4xxl-sdcard-dtbs := \
k3-am642-tqma64xxl-mbax4xxl.dtb k3-am64-tqma64xxl-mbax4xxl-sdcard.dtbo
k3-am642-tqma64xxl-mbax4xxl-wlan-dtbs := \
k3-am642-tqma64xxl-mbax4xxl.dtb k3-am64-tqma64xxl-mbax4xxl-wlan.dtbo
$ fdtdump arch/arm64/boot/dts/ti/k3-am642-tqma64xxl-mbax4xxl-sdcard.dtb
2>/dev/null| head -n15 | tail -n2
model = "TQ-Systems TQMa64xxL SoM on MBax4xxL carrier board";
compatible = "tq,am642-tqma6442l-mbax4xxl", "tq,am642-tqma6442l",
"ti,am642";
$ fdtdump arch/arm64/boot/dts/ti/k3-am642-tqma64xxl-mbax4xxl-wlan.dtb
2>/dev/null| head -n15 | tail -n2
model = "TQ-Systems TQMa64xxL SoM on MBax4xxL carrier board";
compatible = "tq,am642-tqma6442l-mbax4xxl", "tq,am642-tqma6442l",
"ti,am642";
These two go into image.fit, but one of them is completely dead
since there is no way to distinguish them.
$ fdtdump arch/arm64/boot/image.fit
...
conf-10 {
compatible = "tq,am642-tqma6442l-mbax4xxl",
"tq,am642-tqma6442l", "ti,am642";
description = "TQ-Systems TQMa64xxL SoM on MBax4xxL carrier board";
fdt = "fdt-10";
kernel = "kernel";
};
...
conf-25 {
compatible = "tq,am642-tqma6442l-mbax4xxl",
"tq,am642-tqma6442l", "ti,am642";
description = "TQ-Systems TQMa64xxL SoM on MBax4xxL carrier board";
fdt = "fdt-25";
kernel = "kernel";
};
I agree with Chen-Yu.
FIT should not include full DTBs.
Bootloaders should assemble the final DTB
from base and overlays on-the-fly.
The FIT spec allows the "fdt" property to list
multiple image nodes.
o config-1
|- description = "configuration description"
|- kernel = "kernel sub-node unit name"
|- fdt = "fdt sub-node unit-name" [, "fdt overlay sub-node unit-name", ...]
|- loadables = "loadables sub-node unit-name"
|- script = "
|- compatible = "vendor
>
> ChenYu
>
>
> > Gr{oetje,eeting}s,
> >
> > Geert
> >
> > --
> > Geert Uytterhoeven -- There's lots of Linux beyond ia32 --
> > ge...@linux-m68k.org
> >
> > In personal conversations with technical people, I call myself a hacker. But
> > when I'm talking to journalists I just say "programmer" or something like
> > that.
> > -- Linus Torvalds
--
Best Regards
Masahiro Yamada
On Sat, Dec 2, 2023 at 3:09 AM Simon Glass wrote:
>
> Hi Masahiro,
>
> On Fri, 1 Dec 2023 at 10:30, Masahiro Yamada wrote:
> >
> > On Fri, Dec 1, 2023 at 5:34 AM Simon Glass wrote:
> > >
> > > Add a script which produces a Flat Image Tree (FIT), a sin
On Fri, Dec 1, 2023 at 5:34 AM Simon Glass wrote:
>
> Add a script which produces a Flat Image Tree (FIT), a single file
> containing the built kernel and associated devicetree files.
> Compression defaults to gzip which gives a good balance of size and
> performance.
>
> The files compress from a
We discussed a better location for this file, and agreed that
core-api/ is a good fit. Rename it to symbol-namespaces.rst
for disambiguation, and also add it to index.rst and MAINTAINERS.
Signed-off-by: Masahiro Yamada
---
Documentation/core-api/index.rst | 1
I did not notice this document was added to Documentation/kbuild/,
and I do not understand how it is related to the build system.
Kick it out of the kbuild directory.
I am not sure if this is the perfect place, but I added its index
close to the module-signing.
Signed-off-by: Masahiro Yamada
Capitalize the first word in the sentence.
Use obj-m instead of obj-y. obj-y still works, but we have no built-in
objects in external module builds. So, obj-m is better IMHO.
Signed-off-by: Masahiro Yamada
---
Documentation/kbuild/modules.rst | 4 ++--
1 file changed, 2 insertions(+), 2
ads it automatically.
With the -I option removed, there is no one to set the external_module
flag unless KBUILD_EXTRA_SYMBOLS is passed. Now the -i option does it
instead.
Signed-off-by: Masahiro Yamada
---
Documentation/kbuild/modules.rst | 13 +
scripts/Makefile.modpost
s always supported. Not only GNU ar but also llvm-ar supports it.
With the 'D' option hard-coded, there is no more user of ar-option
or KBUILD_ARFLAGS.
Signed-off-by: Masahiro Yamada
---
Documentation/kbuild/makefiles.rst | 5 -
Makefile | 4
arch/
be
> documented in one place. This document lists the issues I know about
> and the settings needed to ensure reproducibility.
>
> Signed-off-by: Ben Hutchings
Acked-by: Masahiro Yamada
Thanks.
> ---
> v2:
> * Delete extra "the" in the first paragraph.
> *
On Wed, Sep 11, 2019 at 10:15 PM Ben Hutchings wrote:
>
> On Wed, 2019-09-11 at 14:04 +0100, Ben Hutchings wrote:
> > On Wed, 2019-09-11 at 21:17 +0900, Masahiro Yamada wrote:
> > > Hi Ben,
> > >
> > >
> > > Thanks for this.
> > > Please l
debug information
> +packages for the different kernel versions.
> +
> +To avoid this, you can make the vDSO different for different
> +kernel versions by including an arbitrary string of "salt" in it.
> +This is specified by the Kconfig symbol ``CONFIG_BUILD_SALT``.
> +
> +.. _KBUILD_BUILD_TIMESTAMP: kbuild.html#kbuild-build-timestamp
> +.. _KBUILD_BUILD_USER and KBUILD_BUILD_HOST:
> kbuild.html#kbuild-build-user-kbuild-build-host
> +.. _KCFLAGS: kbuild.html#kcflags
> +.. _prefix-map options: https://reproducible-builds.org/docs/build-path/
> +.. _Reproducible Builds project: https://reproducible-builds.org/
> +.. _SOURCE_DATE_EPOCH:
> https://reproducible-builds.org/docs/source-date-epoch/
--
Best Regards
Masahiro Yamada
x27; make W=n [targets] Enable extra *compiler* checks, n=1,2,3
> > where'
> >
>
> +KBUILD_EXTRA_WARN
> +-----
> +Specify the extra build checks. The same value can be assigned by passing
> +W=... from the command line.
>
> For consistency reasons might be better:
>
> - @echo ' make W=n [targets] Enable extra gcc checks, n=1,2,3 where'
> + @echo ' make W=n [targets] Enable extra build checks, n=1,2,3 where'
>
OK, I will squash this. Thanks.
--
Best Regards
Masahiro Yamada
, KBUILD_ENABLE_EXTRA_GCC_CHECKS is still
supported (but not advertised in the documentation).
I also fixed up 'make help', and updated the documentation.
Signed-off-by: Masahiro Yamada
---
Changes in v3:
- new patch
Changes in v2: None
Documentation/kbuild/kbuild.rst | 14 +-
On Wed, Aug 14, 2019 at 7:54 PM Masahiro Yamada
wrote:
>
> I see the following warnings when I open this document with a ReST
> viewer, retext:
>
> /home/masahiro/ref/linux/Documentation/kbuild/makefiles.rst:1142: (WARNING/2)
> Inline emphasis start-string without end-string
The only the difference between clean-files and clean-dirs is the -r
option passed to the 'rm' command.
You can always pass -r, and then remove the clean-dirs syntax.
Signed-off-by: Masahiro Yamada
---
Documentation/kbuild/makefiles.rst | 16
scripts/Make
scripts/package/Makefile does not use $(obj) or $(src) at all.
It actually generates files and directories in the top of $(objtree).
I do not see much sense in descending into scripts/package/.
Signed-off-by: Masahiro Yamada
---
Documentation/kbuild/makefiles.rst | 16
On Wed, Aug 14, 2019 at 9:53 PM Knut Omang wrote:
>
> On Wed, 2019-08-14 at 07:52 +0200, Knut Omang wrote:
> > On Wed, 2019-08-14 at 11:02 +0900, Masahiro Yamada wrote:
> > > Hi Knut,
> > >
> > > On Wed, Aug 14, 2019 at 1:19 AM Knut Omang wrote:
&g
On Thu, Aug 15, 2019 at 1:06 AM Masahiro Yamada
wrote:
>
> These three variables are not intended to be tweaked by users.
> Move them from kbuild.rst to makefiles.rst.
>
> Signed-off-by: Masahiro Yamada
> ---
>
Applied to linux-kbuild.
> I will apply to linux-kbuild t
Currently, the timestamp of module linker scripts are not checked.
Add them to the dependency of modules so they are correctly rebuilt.
Signed-off-by: Masahiro Yamada
---
Documentation/kbuild/makefiles.rst | 5 +
Makefile | 3 ++-
arch/arm/Makefile
These three variables are not intended to be tweaked by users.
Move them from kbuild.rst to makefiles.rst.
Signed-off-by: Masahiro Yamada
---
I will apply to linux-kbuild this
to avoid conflicts.
Documentation/kbuild/kbuild.rst| 14 --
Documentation/kbuild/makefiles.rst | 14
The ReST conversion was merged in the previous merge window.
Iron out some issues.
Masahiro Yamada (2):
docs: kbuild: fix invalid ReST syntax
docs: kbuild: remove cc-ldoption from document again
Documentation/kbuild/makefiles.rst | 23 ---
1 file changed, 4 insertions
ove it again.
Fixes: cd238effefa2 ("docs: kbuild: convert docs to ReST and rename to *.rst")
Signed-off-by: Masahiro Yamada
---
Documentation/kbuild/makefiles.rst | 15 ---
1 file changed, 15 deletions(-)
diff --git a/Documentation/kbuild/makefiles.rst
b/Documentation/kbuild/ma
of
git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild")
Signed-off-by: Masahiro Yamada
---
Documentation/kbuild/makefiles.rst | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/kbuild/makefiles.rst
b/Documentation/kbuild/make
Hi Knut,
On Wed, Aug 14, 2019 at 1:19 AM Knut Omang wrote:
>
> On Tue, 2019-08-13 at 23:01 +0900, Masahiro Yamada wrote:
> > On Tue, Aug 13, 2019 at 3:13 PM Knut Omang wrote:
> > >
> > > C++ libraries interfacing to C APIs might sometimes need some glue
> &
C-plugins.
Did you really compile-test this patch before the submission?
--
Best Regards
Masahiro Yamada
On Tue, Aug 13, 2019 at 2:34 AM Shaun Tancheff wrote:
>
> On Mon, Aug 12, 2019 at 10:24 AM Masahiro Yamada
> wrote:
> >
> > On Fri, Aug 9, 2019 at 9:21 AM Shaun Tancheff wrote:
> > >
> > > When building a tree of external modules stage 2 fails
> >
at $m, echo $m);) :; } \
> - | $(AWK) '!x[$$0]++' - > $@
> + | $(AWK) '!x[$$0]++' - $(modorder-add) $@
>
> #
> # Rule to compile a set of .o files into one .a file (with symbol table)
> --
> 2.20.1
>
--
Best Regards
Masahiro Yamada
Hi Joe,
On Fri, Jul 19, 2019 at 5:18 AM Joe Lawrence wrote:
> > Perhaps, adding a new field
> > to *.mod files might be cleaner.
>
> I can look into that. By "field" you mean a new row in the file?
Yes.
--
Best Regards
Masahiro Yamada
consisting a module is
renamed, or when a single-obj module is turned into a multi-obj module or
vice versa.
Signed-off-by: Masahiro Yamada
Acked-by: Nicolas Pitre
---
Changes in v3:
- Fix build error of allnoconfig
- Remove cmd_secanalysis
- Fix up comment in scripts/adjust_autoksyms.sh
simpler.
Masahiro Yamada (12):
kbuild: do not create empty modules.order in the prepare stage
kbuild: get rid of kernel/ prefix from in-tree modules.{order,builtin}
kbuild: remove duplication from modules.order in sub-directories
scsi: remove pointless $(MODVERDIR)/$(obj)/53c700.ver
Hi Joe
On Wed, Jul 17, 2019 at 6:40 AM Joe Lawrence wrote:
>
> On Thu, Jul 11, 2019 at 02:44:31PM +0900, Masahiro Yamada wrote:
> > While descending directories, Kbuild produces objects for modules,
> > but do not link final *.ko files; it is done in the modpost.
> >
>
On Sat, Jul 13, 2019 at 11:46 AM Masahiro Yamada
wrote:
>
> The assembler files in the kernel are *.S instead of *.s, so they must
> be preprocessed. Since 'as' of GNU binutils is not able to preprocess,
> we always use $(CC) as an assembler driver.
>
> $(AS) is al
.
$ git grep -e '$(AS)' -e '${AS}' -e '$AS' -e '$(AS:' -e '${AS:' --
:^Documentation
drivers/net/wan/Makefile: AS68K = $(AS)
The documentation about *_AFLAGS* sounds like the flags were passed
to $(AS). This is somewhat misleading.
Si
me directory as
*.ko so that two threads never attempt to write to the same file.
$(MODVERDIR) is no longer needed.
Since modules with directory paths are listed in modules.order, Kbuild
is still able to find *.mod files without additional descending.
Signed-off-by: Masahiro Yamada
Ack
simpler.
Masahiro Yamada (11):
kbuild: do not create empty modules.order in the prepare stage
kbuild: get rid of kernel/ prefix from in-tree modules.{order,builtin}
kbuild: remove duplication from modules.order in sub-directories
scsi: remove pointless $(MODVERDIR)/$(obj)/53c700.ver
On Wed, Jul 10, 2019 at 2:37 AM Nicolas Pitre wrote:
>
> On Tue, 9 Jul 2019, Masahiro Yamada wrote:
>
> > --- a/scripts/adjust_autoksyms.sh
> > +++ b/scripts/adjust_autoksyms.sh
> > @@ -47,13 +47,10 @@ cat > "$new_ksyms_file" << EOT
>
simpler.
Masahiro Yamada (11):
kbuild: do not create empty modules.order in the prepare stage
kbuild: get rid of kernel/ prefix from in-tree modules.{order,builtin}
kbuild: remove duplication from modules.order in sub-directories
scsi: remove pointless $(MODVERDIR)/$(obj)/53c700.ver
VERDIR) is no longer needed.
Since modules with directory paths are listed in modules.order, Kbuild
is still able to find *.mod files without additional descending.
Signed-off-by: Masahiro Yamada
---
.gitignore | 1 +
Documentation/dontdiff | 1 +
Makefile
On Mon, Jul 1, 2019 at 10:00 AM Masahiro Yamada
wrote:
>
> header-test-y does not work with headers in sub-directories.
>
> For example, you may want to write a Makefile, like this:
>
> include/linux/Kbuild:
>
> header-test-y += mtd/nand.h
>
> This entry will crea
On Tue, Jul 9, 2019 at 5:02 AM Jonathan Corbet wrote:
>
> On Sun, 7 Jul 2019 01:25:08 +0900
> Masahiro Yamada wrote:
>
> > The assembler files in the kernel are *.S instead of *.s, so they must
> > be preprocessed. Since 'as' of GNU binutils is not able to prep
.
$ git grep -e '$(AS)' -e '${AS}' -e '$AS' -e '$(AS:' -e '${AS:' --
:^Documentation
drivers/net/wan/Makefile: AS68K = $(AS)
The documentation about *_AFLAGS* sounds like the flags were passed
to $(AS). This is somewhat misleading.
Si
since that commit broke some users' workflow.
Fixes: 25b146c5b8ce ("kbuild: allow Kbuild to start from any directory")
Reported-by: Pawan Gupta
Signed-off-by: Masahiro Yamada
---
Documentation/kbuild/kbuild.txt | 9 +
Makefile| 4
gen_kheaders.sh
6/7: Exclude all files without ".h" extension
from the kheaders_data.tar.xz
This will be needed by 7/7 because we need to
exclude "*.h.s" from the archive
7/7: Compile-test kernel-space headers in include/.
Masahiro Yamada (7):
init/Kconfig: ad
ecause this is evaluated
by $(filter-out ...) whereas header-test-pattern-y is evaluated by
$(wildcard ...). This is a kludge, but seems useful in some places...
Signed-off-by: Masahiro Yamada
Tested-by: Jani Nikula
---
Changes in v4: None
Changes in v3: None
Changes in v2:
- New patch
hould handle headers as
headers, not as source files.
In fact, this has been hidden since commit abb2ea7dfd82 ("compiler,
clang: suppress warning for unused static inline functions"), but we
should not rely on that.
Signed-off-by: Masahiro Yamada
Acked-by: Jani Nikula
Tested-by: Jani Niku
On Fri, Jun 28, 2019 at 11:06 AM Masahiro Yamada
wrote:
>
> The assembler files in the kernel are *.S instead of *.s, so they must
> be preprocessed. Hence, we always use $(CC) as an assembler driver.
>
> $(AS) is almost unused in Kbuild. As of writing, there is just one user.
&
On Fri, Jun 28, 2019 at 1:41 AM Masahiro Yamada
wrote:
>
> 1/4: Compile-test exported headers (reworked in v2)
>
> 2/4: fix a flaw I noticed when I was working on this series.
> Avoid generating intermediate wrappers.
>
> 3/4: maybe useful for 4/4 and in some other plac
68K = $(AS)
The documentation about *_AFLAGS* sounds like the flags were passed
to $(AS). This is somewhat misleading since we do not invoke $(AS)
directly.
Signed-off-by: Masahiro Yamada
---
Documentation/kbuild/kbuild.txt| 5 ++---
Documentation/kbuild/makefiles.txt | 12 ++--
2 fil
On Thu, Jun 27, 2019 at 8:36 PM Jani Nikula wrote:
>
> On Thu, 27 Jun 2019, Masahiro Yamada wrote:
> > 1/4: reworked v2.
> >
> > 2/4: fix a flaw I noticed when I was working on this series
> >
> > 3/4: maybe useful for 4/4 and in some other places
> &g
include/.
v2: compile as many headers as possible.
v3: exclude more headers causing build errors
Masahiro Yamada (4):
kbuild: compile-test UAPI headers to ensure they are self-contained
kbuild: do not create wrappers for header-test-y
kbuild: support header-test-pattern-y
kbuild
hould handle headers as
headers, not as source files.
In fact, this has been hidden since commit abb2ea7dfd82 ("compiler,
clang: suppress warning for unused static inline functions"), but we
should not rely on that.
Signed-off-by: Masahiro Yamada
Acked-by: Jani Nikula
Tested-by: Jani Nikul
ecause this is evaluated
by $(filter-out ...) whereas header-test-pattern-y is evaluated by
$(wildcard ...). This is a kludge, but seems useful in some places...
Signed-off-by: Masahiro Yamada
Tested-by: Jani Nikula
---
Changes in v3: None
Changes in v2:
- New patch
Documentation/kbuild/makefiles.t
On Thu, Jun 27, 2019 at 10:49 AM Masahiro Yamada
wrote:
>
>
> 1/4: reworked v2.
>
> 2/4: fix a flaw I noticed when I was working on this series
>
> 3/4: maybe useful for 4/4 and in some other places
>
> 4/4: v2. compile as many headers as possible.
>
If you wa
ead of 'no-header-test'
- Avoid weird 'find' warning when cleaning
- New patch
- New patch
- Add everything to test coverage, and exclude broken ones
- Rename 'Makefile' to 'Kbuild'
- Add CONFIG_KERNEL_HEADER_TEST option
Masahiro Yamada (4):
kb
rd character is '%' instead of '*' because this is evaluated by
$(filter-out ...) whereas header-test-pattern-y is evaluated by
$(wildcard ...). This is a kludge, but seems useful in some places...
Signed-off-by: Masahiro Yamada
---
Changes in v2:
- New patch
Documenta
s
headers, not as source files.
In fact, this has been hidden since commit abb2ea7dfd82 ("compiler,
clang: suppress warning for unused static inline functions"), but we
should not rely on that.
Signed-off-by: Masahiro Yamada
---
Changes in v2:
- New patch
.gitignore
On Tue, Jun 4, 2019 at 7:15 PM Masahiro Yamada
wrote:
>
>
> Multiple people have suggested to compile-test UAPI headers.
>
> Currently, Kbuild provides simple sanity checks by headers_check
> but they are not enough to catch bugs.
>
> The most recent patch I know is Davi
as part of extra-y.
> >
> > Cc: Chris Wilson
> > Cc: Masahiro Yamada
> > Cc: Michal Marek
> > Cc: Sam Ravnborg
> > Signed-off-by: Jani Nikula
>
> Looks good, thanks.
>
> Reviewed-by: Sam Ravnborg
>
Applied to linux-kbuild.
Thanks.
--
Best Regards
Masahiro Yamada
On Tue, Jun 4, 2019 at 7:15 PM Masahiro Yamada
wrote:
>
>
> Multiple people have suggested to compile-test UAPI headers.
>
> Currently, Kbuild provides simple sanity checks by headers_check
> but they are not enough to catch bugs.
>
> The most recent patch I know is Davi
de to $(INSTALL_HDR_PATH)/include.
[3] Support compile-test of UAPI headers
This is implemented in usr/include/Makefile
Jani Nikula (1):
kbuild: add support for ensuring headers are self-contained
Masahiro Yamada (14):
kbuild: remove headers_{install,check}_all
kbuild: remove stale de
of them.
If somebody really thinks it is useful to do headers_install for all
architectures, it would be possible by small shell-scripting, but the
top Makefile do not have to provide entry targets just for that purpose.
Signed-off-by: Masahiro Yamada
---
Documentation/kbuild
n add
headers to be tested if CONFIG_HEADER_TEST is enabled. This will
generate a dummy C file per header that gets built as part of extra-y.
Cc: Chris Wilson
Cc: Masahiro Yamada
Cc: Michal Marek
Signed-off-by: Jani Nikula
Signed-off-by: Masahiro Yamada
---
Documentation/kbuild/makefiles.txt
sage of various linkers other than bfd via -fuse-ld={bfd|gold|lld}.
>
> Cc: clang-built-li...@googlegroups.com
> Suggested-by: Masahiro Yamada
> Signed-off-by: Nick Desaulniers
> ---
Applied to linux-kbuild. Thanks.
> This should probably wait until all of the call sites have
/3.
Why don't you squash this?
>
> Suggested-by: Masahiro Yamada
> Signed-off-by: Joel Fernandes (Google)
> ---
> init/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/init/Kconfig b/init/Kconfig
> index ce08adf0f637..f27138a8cf28 100644
On Thu, Mar 7, 2019 at 5:13 AM Joel Fernandes wrote:
>
> Hi Masahiro,
> Thanks for review, my replies are inline:
>
> On Wed, Mar 06, 2019 at 09:26:14PM +0900, Masahiro Yamada wrote:
> > On Mon, Mar 4, 2019 at 1:15 AM Joel Fernandes wrote:
> > >
> > > Thi
uot;
> @@ -11,12 +12,14 @@ file_list=${@:2}
>
> src_file_list=""
> for f in $file_list; do
> + if [ ! -f "$kroot/$f" ] && [ ! -d "$kroot/$f" ]; then continue; fi
> src_file_list="$src_file_list $(echo $f | grep -v OBJDIR)"
> done
>
> obj_file_list=""
> for f in $file_list; do
> f=$(echo $f | grep OBJDIR | sed -e 's/OBJDIR\///g')
> + if [ ! -f $f ] && [ ! -d $f ]; then continue; fi
> obj_file_list="$obj_file_list $f";
> done
>
> --
> 2.21.0.352.gf09ad66450-goog
>
--
Best Regards
Masahiro Yamada
ee.
It is OK if the change would mess up the script.
[10]
You can embed a binary directly into C file
without producing a giant header file.
I refactored kernel/configs.c
https://lore.kernel.org/patchwork/patch/1042013/
Be careful; my patch has not been merged yet into the mainline.
It has been a while in linux-next,
and I have not received any problem report.
So, I am guessing it will probably be merged
in the current MW.
That's all from me.
--
Best Regards
Masahiro Yamada
Move the document to the standard Documentation/ directory instead of
creating the same directory structure under objtool/.
Signed-off-by: Masahiro Yamada
---
{tools/objtool/Documentation => Documentation}/stack-validation.txt | 0
Documentation/x86/orc-unwinder.
ernal modules.
That's the difference.
> A user could totally use the build artifacts obtained from somewhere to build
> a kernel module with a completely different compiler. That issue has just to
> do with the reality, and isn't an issue caused by any one solution such as
> this one. I agree care must be taken whenever user is building external
> kernel modules independent of kernel sources. Did I miss something else?
>
> thanks a lot,
>
> - Joel
>
--
Best Regards
Masahiro Yamada
On Sat, Mar 2, 2019 at 3:03 AM Joel Fernandes wrote:
>
> On Fri, Mar 01, 2019 at 03:25:05PM +0900, Masahiro Yamada wrote:
> [...]
> > > > I am guessing the user will run these commands
> > > > on the target system.
> > > > In other words, ext
two users of cc-ifversion:
arch/mips/loongson64/Platform
arch/powerpc/Makefile
They are not affected by this change.
The format of cc-version is , while CONFIG_GCC_VERSION
. I adjusted cc-ifversion for the difference of
the number of digits.
Signed-off-by: Masahiro Yamada
---
Documentat
On Fri, Mar 1, 2019 at 12:06 AM Joel Fernandes wrote:
>
> On Thu, Feb 28, 2019 at 11:17:51AM +0900, Masahiro Yamada wrote:
> > Hi Joel,
> >
> >
> > On Thu, Feb 28, 2019 at 4:40 AM Joel Fernandes (Google)
> > wrote:
> > >
> > > Introduc
left IKHD_ST and IKHD_ED markers as is to facilitate
> future patches that would extract the headers from a kernel or module
> image.
>
> Signed-off-by: Joel Fernandes (Google)
> ---
--
Best Regards
Masahiro Yamada
s/dtc/include-prefixes/powerpc:
No such file or directory.
Can't do inplace edit:
kernel/kheaders_data.txz.tmp/scripts/dtc/include-prefixes/dt-bindings
is not a regular file.
[ massive amount of error messages continues ]
> I can't think any other ways at the moment to break the circular dependency
> so I'm thinking this is good enough for now especially since Kbuild will
> print a proper warning. Let me know what you think?
>
> thanks,
>
> - Joel
>
--
Best Regards
Masahiro Yamada
On Tue, Feb 19, 2019 at 1:14 PM Masahiro Yamada
wrote:
>
> On Fri, Feb 15, 2019 at 11:48 PM Alexei Starovoitov
> wrote:
> >
> > On Mon, Feb 11, 2019 at 09:35:59AM -0500, Joel Fernandes (Google) wrote:
> > > Introduce in-kernel headers and other artifacts which
OBJCOPY arch/x86/boot/vmlinux.bin
AS arch/x86/boot/header.o
LD arch/x86/boot/setup.elf
OBJCOPY arch/x86/boot/setup.bin
BUILD arch/x86/boot/bzImage
Setup is 15612 bytes (padded to 15872 bytes).
System is 12673 kB
CRC 697aaf88
Kernel: arch/x86/boot/bzImage is ready (#6)
real 0m53.024s
user 0m32.076s
sys 0m9.296s
Also, I notice $(ARCH) must be fixed to $(SRCARCH),
but that is one of minor issues.
We should take time for careful review and test.
Please give me more time for thorough review.
--
Best Regards
Masahiro Yamada
s more sensible
if you want to build all objects under the current directory, and it
works as expected.
Let's change '/' into a phony target that is an alias of './', but
I may feel like deprecating it in the future.
Signed-off-by: Masahiro Yamada
---
Documentation/kbuild/
f the "*.gz" pattern.
Signed-off-by: Masahiro Yamada
---
Changes in v2:
- The .section directive in v1 accidentally moved executable code
from .text into .rodata (reported by kbuild test robot).
.pushsection and .popsection should be used here.
Documentation/dontdiff | 1
f the "*.gz" pattern.
Signed-off-by: Masahiro Yamada
---
Documentation/dontdiff | 1 -
kernel/.gitignore | 2 --
kernel/Makefile| 11 +--
kernel/configs.c | 41 +++--
4 files changed, 20 insertions(+), 35 deletions(-)
diff
;);
> diff --git a/scripts/gen_ikh_data.sh b/scripts/gen_ikh_data.sh
> new file mode 100755
> index ..609196b5cea2
> --- /dev/null
> +++ b/scripts/gen_ikh_data.sh
> @@ -0,0 +1,19 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +
> +spath="$(dirname "$(readlink -f "$0")")"
> +
> +rm -rf $1.tmp
> +mkdir $1.tmp
> +
> +for f in "${@:2}";
> + do find "$f" ! -name "*.c" ! -name "*.o" ! -name "*.cmd" ! -name ".*";
> +done | cpio -pd $1.tmp
> +
> +for f in $(find $1.tmp); do
> + $spath/strip-comments.pl $f
> +done
> +
> +tar -Jcf $1 -C $1.tmp/ . > /dev/null
> +
> +rm -rf $1.tmp
> diff --git a/scripts/strip-comments.pl b/scripts/strip-comments.pl
> new file mode 100755
> index ..f8ada87c5802
> --- /dev/null
> +++ b/scripts/strip-comments.pl
> @@ -0,0 +1,8 @@
> +#!/usr/bin/perl -pi
> +# SPDX-License-Identifier: GPL-2.0
> +
> +# This script removes /**/ comments from a file, unless such comments
> +# contain "SPDX". It is used when building compressed in-kernel headers.
> +
> +BEGIN {undef $/;}
> +s/\/\*((?!SPDX).)*?\*\///smg;
> --
> 2.20.1.611.gfbb209baf1-goog
--
Best Regards
Masahiro Yamada
On Thu, Jan 17, 2019 at 10:23 AM Masahiro Yamada
wrote:
>
> The symbol table in the final archive is unneeded; the linker does not
> require the symbol table after the --whole-archive option. Every object
> file in the archive is included in the link anyway.
>
> Pass
The top Makefile does not need to export KBUILD_VMLINUX_INIT and
KBUILD_VMLINUX_MAIN separately.
Put every built-in.a into KBUILD_VMLINUX_OBJS. The order of
$(head-y), $(init-y), $(core-y), ... is still retained.
Signed-off-by: Masahiro Yamada
---
Changes in v3:
- update the document
Changes
.
Fix up the document and comments as well.
Signed-off-by: Masahiro Yamada
Acked-by: Nicholas Piggin
---
Changes in v3: None
Changes in v2:
- Update the document and comments
- Add Nicholas' Ack
Documentation/kbuild/makefiles.txt | 9 ++---
scripts/Makefile.build
.
Fix up the document and comments as well.
Signed-off-by: Masahiro Yamada
Acked-by: Nicholas Piggin
---
Changes in v2:
- Update the document and comments
- Add Nicholas' Ack
Documentation/kbuild/makefiles.txt | 9 ++---
scripts/Makefile.build | 8 ++--
scripts
normal build to
> avoid a hard dependency on the external DT schema project and because
> there are lots of warnings generated.
>
> Cc: Jonathan Corbet
> Cc: Mark Rutland
> Cc: Masahiro Yamada
> Cc: Michal Marek
> Cc: linux-doc@vger.kernel.org
> Cc: devicet...@vger.ke
On Wed, Dec 12, 2018 at 3:36 AM Rob Herring wrote:
>
> On Tue, Dec 11, 2018 at 10:03 AM Masahiro Yamada
> wrote:
> >
> > On Wed, Dec 12, 2018 at 12:13 AM Rob Herring wrote:
> >
> > >
> > > > > +$(obj)/%.example.dts: $(src)/%.yaml FO
/%.yaml,%.example.dtb, $(DT_SCHEMA_FILES)))
> >
> > I do not understand this line.
> > Why is it necessary?
> >
> > *.example.dtb files are generated anyway
> > since they are listed in extra-y.
>
> It is enforcing the ordering. Without it, the binding checks and
> building .schema.yaml.tmp happen in parallel because both only have
> the source files as dependencies. The '|' keeps the dependencies out
> of the dependency list($^).
What kind problem would you see if
the binding checks and building .schema.yaml.tmp
happen in parallel?
--
Best Regards
Masahiro Yamada
Hi Sam,
On Fri, Dec 7, 2018 at 3:06 AM Sam Ravnborg wrote:
>
> On Wed, Dec 05, 2018 at 08:28:05PM +0900, Masahiro Yamada wrote:
> > Some time ago, Sam pointed out a certain degree of overwrap between
> > generic-y and mandatory-y. (https://lkml.org/lkml/2017/7/10/121)
>
1 - 100 of 158 matches
Mail list logo