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
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
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 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
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
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, 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:
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, 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:
> >
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 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
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
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 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
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
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
.
$ 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
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
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
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
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
>
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
.
$ 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
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
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.
> >
>
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
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
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
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
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
> >
C-plugins.
Did you really compile-test this patch before the submission?
--
Best Regards
Masahiro Yamada
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
> &
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
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
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
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
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
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
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
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
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
, 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 +-
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
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
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
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.
> *
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/
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
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
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
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
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
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
/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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 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
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.
&
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
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
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
plained (noticed) about it.
Even GNU Make 3.81 is more than 10 years old. It would not hurt to
match the documentation with reality instead of fixing makefiles.
Signed-off-by: Masahiro Yamada
---
Hi Linus,
You acked this change already.
Could you apply this patch to your tree directly?
Th
2017-06-09 17:29 GMT+09:00 Masahiro Yamada :
> Prior to commit fcc8487d477a ("uapi: export all headers under uapi
> directories"), genhdr-y was meant to specify generated UAPI headers.
>
> - generated-y: generated headers (other than asm-generic wrappers)
> - header-y
which are obviously exported.
Replace genhdr-y with generated-y, and deprecate genhdr-y.
Signed-off-by: Masahiro Yamada
---
Documentation/kbuild/makefiles.txt | 25 ++---
arch/arm/include/uapi/asm/Kbuild | 6 +++---
arch/x86/include/uapi/asm/Kbuild | 6 +++--
-align.
Signed-off-by: Masahiro Yamada
---
x86 maintainers,
If this patch looks OK, could you give me Acked-by?
Documentation/kbuild/makefiles.txt | 16
arch/x86/Makefile_32.cpu | 7 +++
scripts/Kbuild.include | 5 -
3 files changed, 3
2017-06-09 17:29 GMT+09:00 Masahiro Yamada :
> Prior to commit fcc8487d477a ("uapi: export all headers under uapi
> directories"), genhdr-y was meant to specify generated UAPI headers.
>
> - generated-y: generated headers (other than asm-generic wrappers)
> - header-y
2017-06-19 16:28 GMT+09:00 Masahiro Yamada :
> Documentation/kbuild/makefiles.txt says the change for align options
> occurred at GCC 3.0, and Documentation/process/changes.rst says the
> minimal supported GCC version is 3.2, so it should be safe to hard-code
> -falign* options.
>
quot;yywrap redefined" warning
Tested bison versions:
2.0
2.1
2.2
2.3
2.4
2.4.1
2.5.1
2.6
2.6.1
2.6.2
2.6.3
2.6.4
2.6.5
2.7
2.7.1
3.0
3.0.1
3.0.2
3.0.3
3.0.4
Signed-off-by: Masahiro Yamada
---
Documentation/process/changes.rst | 25
has been fixed in upstream, but not
reflected to kernel yet. We can proceed migration in sub-system base.
Masahiro Yamada (3):
kbuild: add LEX and YACC variables
kbuild: prepare to remove C files pre-generated by flex and bison
kconfig: generate lexer and parser during build instead
2017-12-10 1:02 GMT+09:00 Masahiro Yamada :
> In Linux build system convention, pre-generated files are version-
> controlled with a "_shipped" suffix. During the kernel building,
> they are simply shipped (copied) removing the suffix.
>
> From users' point of
have not been able to find time to dive into the detail yet.
(Actually, I tried to do that for v2 or v3, where Python code was so dirty,
then consumed my time to figure out what the code was trying to do)
I find my concern here:
https://lkml.org/lkml/2018/1/5/497
Anyway, I will take a look again
n appear.
(It is expanded by sym_lookup().) If an expression (which is derived
from symbols) is a string, environments in the string are also expanded.
For example, the following code works.
Example code:
config TOOLCHAIN_LIST
string
default "My tools: CC=$CC, AS=$AS,
ig. So, it can
not refelect user configuration. If this is required, $(shell )
must be dynamically re-calculated depending on other symbols.
But, this is difficult, and may cause performance issue.
Masahiro Yamada (22):
kbuild: remove kbuild cache
kbuild: remove CONFIG_CROSS_COMPILE supp
case,
$(cc-option, -m32 -foo) is y, but
$(cc-option, -m64 -foo) is n ?
(or vice versa)
If the answer is yes, $(cc-option -foo) would have to be re-calculated
every time CONFIG_64BIT is toggled.
This is what I'd like to avoid, though.
--
Best Regards
Masahiro Yamada
--
To unsubscribe
2018-02-21 18:56 GMT+09:00 Arnd Bergmann :
> On Wed, Feb 21, 2018 at 8:38 AM, Masahiro Yamada
> wrote:
>> 2018-02-20 0:18 GMT+09:00 Ulf Magnusson :
>>
>>>>
>>>> I'm not happy that we in one context can reference CONFIG variables
>>>> dire
2018-02-21 19:52 GMT+09:00 Arnd Bergmann :
> On Wed, Feb 21, 2018 at 11:20 AM, Masahiro Yamada
> wrote:
>> 2018-02-21 18:56 GMT+09:00 Arnd Bergmann :
>>> On Wed, Feb 21, 2018 at 8:38 AM, Masahiro Yamada
>>> wrote:
>>>> 2018-02-20 0:18 GMT+09:00 Ulf M
Masahiro Yamada (6):
kconfig: do not call check_conf() for olddefconfig
kconfig: remove unneeded input_mode test in conf()
kconfig: remove redundant input_mode test for check_conf() loop
kconfig: hide irrelevant sub-menus for oldconfig
kconfig: invoke oldconfig instead of silentoldconfig
name
it to something more intuitive. 'syncconfig' is the one I came up
with because it updates the .config if necessary, then synchronize
other files with it.
Signed-off-by: Masahiro Yamada
---
Changes in v2:
- newly added
Documentation/kbuild/kconfig.txt | 2 +-
Makefile
LDFLAGS_MODULE counter-part to users.
Signed-off-by: Masahiro Yamada
---
Documentation/kbuild/kbuild.txt | 4
1 file changed, 4 deletions(-)
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt
index ac2363e..6c9c69e 100644
--- a/Documentation/kbuild/kbuild.txt
+++ b
script.
From commandline LDFLAGS_MODULE shall be used (see kbuild.txt).
Then, kbuild.txt explains LDFLAGS_MODULE, like follows:
LDFLAGS_MODULE
--
Additional options used for $(LD) when linking modules.
Signed-off-by: Masahiro
2018-02-28 9:15 GMT+09:00 Masahiro Yamada :
> Masahiro Yamada (6):
> kconfig: do not call check_conf() for olddefconfig
> kconfig: remove unneeded input_mode test in conf()
> kconfig: remove redundant input_mode test for check_conf() loop
> kconfig: hide irrelevant sub-menu
existing scripts are doing wrong.
Signed-off-by: Masahiro Yamada
---
Changes in v3:
- Fix Documentation/networking/i40e.txt
- Display warning if silentoldconfig is used
Changes in v2:
- newly added
Documentation/kbuild/kconfig.txt | 2 +-
Documentation/networking/i40e.txt | 2 +-
Makef
1 - 100 of 158 matches
Mail list logo