History log of /linux-master/.gitignore
Revision Date Author Comments
# 24507871 09-Jan-2024 Masahiro Yamada <masahiroy@kernel.org>

kbuild: create a list of all built DTB files

It is useful to have a list of all *.dtb and *.dtbo files generated
from the current build.

With this commit, 'make dtbs' creates arch/*/boot/dts/dtbs-list, which
lists the dtb(o) files created in the current build. It maintains the
order of the dtb-y additions in Makefiles although the order is not
important for DTBs. It is a (good) side effect through the reuse of the
modules.order rule.

Please note this list only includes the files directly added to dtb-y.

For example, consider this case:

foo-dtbs := foo_base.dtb foo_overlay.dtbo
dtb-y := foo.dtb

In this example, the list will include foo.dtb, but not foo_base.dtb
or foo_overlay.dtbo.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# 5a602de9 01-Jun-2023 Íñigo Huguet <ihuguet@redhat.com>

Add .editorconfig file for basic formatting

EditorConfig is a specification to define the most basic code formatting
stuff, and it's supported by many editors and IDEs, either directly or
via plugins, including VSCode/VSCodium, Vim, emacs and more.

It allows to define formatting style related to indentation, charset,
end of lines and trailing whitespaces. It also allows to apply different
formats for different files based on wildcards, so for example it is
possible to apply different configs to *.{c,h}, *.py and *.rs.

In linux project, defining a .editorconfig might help to those people
that work on different projects with different indentation styles, so
they cannot define a global style. Now they will directly see the
correct indentation on every fresh clone of the project.

See https://editorconfig.org

Co-developed-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
Acked-by: Mickaël Salaün <mic@digikod.net>
Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Tested-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# ffa46bbc 30-Sep-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rpm-pkg: generate kernel.spec in rpmbuild/SPECS/

kernel.spec is the last piece that resides outside the rpmbuild/
directory. Move all the RPM-related files to rpmbuild/ consistently.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>


# 975667d0 21-Jul-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rpm-pkg: rename binkernel.spec to kernel.spec

Now kernel.spec and binkernel.spec have the exactly same contents.

Use kernel.spec for binrpm-pkg as well.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# d5280145 04-Jul-2023 Linus Torvalds <torvalds@linux-foundation.org>

Revert ".gitignore: ignore *.cover and *.mbx"

This reverts commit 534066a983df0935847061c844eb178f8a53a9e7.

It's actively detrimental in that it hides files that shouldn't be
hidden.

If I have some b4 mbx file in my git directory, it either was already
applied with "git am" and is now stale, or maybe it's waiting for that
to happen. In neither case is "ignore it" the right option.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 5e9e95cc9 11-Jun-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion

When CONFIG_TRIM_UNUSED_KSYMS is enabled, Kbuild recursively traverses
the directory tree to determine which EXPORT_SYMBOL to trim. If an
EXPORT_SYMBOL turns out to be unused by anyone, Kbuild begins the
second traverse, where some source files are recompiled with their
EXPORT_SYMBOL() tuned into a no-op.

Linus stated negative opinions about this slowness in commits:

- 5cf0fd591f2e ("Kbuild: disable TRIM_UNUSED_KSYMS option")
- a555bdd0c58c ("Kbuild: enable TRIM_UNUSED_KSYMS again, with some guarding")

We can do this better now. The final data structures of EXPORT_SYMBOL
are generated by the modpost stage, so modpost can selectively emit
KSYMTAB entries that are really used by modules.

Commit f73edc8951b2 ("kbuild: unify two modpost invocations") is another
ground-work to do this in a one-pass algorithm. With the list of modules,
modpost sets sym->used if it is used by a module. modpost emits KSYMTAB
only for symbols with sym->used==true.

BTW, Nicolas explained why the trimming was implemented with recursion:

https://lore.kernel.org/all/2o2rpn97-79nq-p7s2-nq5-8p83391473r@syhkavp.arg/

Actually, we never achieved that level of optimization where the chain
reaction of trimming comes into play because:

- CONFIG_LTO_CLANG cannot remove any unused symbols
- CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is enabled only for vmlinux,
but not modules

If deeper trimming is required, we need to revisit this, but I guess
that is unlikely to happen.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# 2bc42f48 17-Apr-2023 Chuck Lever <chuck.lever@oracle.com>

.gitignore: Do not ignore .kunitconfig files

Circumvent the .gitignore wildcard to avoid warnings about ignored
.kunitconfig files. As far as I can tell, the warnings are harmless
and these files are not actually ignored.

Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202304142337.jc4oUrov-lkp@intel.com/
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>


# cb8865fd 27-Jan-2023 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

.gitignore: Unignore .kunitconfig

There are almost dozen of .kunitconfig files that are ignored but
tracked. Unignore them.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>


# 81f59a26 15-Mar-2023 Masahiro Yamada <masahiroy@kernel.org>

kbuild: rpm-pkg: move source components to rpmbuild/SOURCES

Prepare to add more files to the source RPM.

Also, fix the build error when KCONFIG_CONFIG is set:
error: Bad file: ./.config: No such file or directory

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# 534066a9 30-Jan-2023 Masahiro Yamada <masahiroy@kernel.org>

.gitignore: ignore *.cover and *.mbx

The 'b4' command creates a *.mbx file, and also a *.cover file if the
patch set has a cover-letter. Ignore them.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>


# b8a9ddca 29-Dec-2022 Masahiro Yamada <masahiroy@kernel.org>

.gitignore: update the command to check tracked files being ignored

Recent git versions do not accept the noted command.

$ git ls-files -i --exclude-standard
fatal: ls-files -i must be used with either -o or -c

The -c was implied before, but we need to make it explicit since
git commit b338e9f66873 ("ls-files: error out on -i unless -o or -c
are specified").

Also, replace --exclude-standard with --exclude-per-directory=.gitignore
so that everyone will get consistent results.

git-ls-files(1) says:

--exclude-standard
Add the standard Git exclusions: .git/info/exclude, .gitignore in
each directory, and the user's global exclusion file.

We cannot predict what is locally added to .git/info/exclude or the
user's global exclusion file.

We can only manage .gitignore files committed to the repository.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>


# 924d28b3 26-Dec-2022 Masahiro Yamada <masahiroy@kernel.org>

.gitignore: ignore *.rpm

Previously, *.rpm files were created under $HOME/rpmbuild/, but since
commit 8818039f959b ("kbuild: add ability to make source rpm buildable
using koji"), srcrpm-pkg creates the source rpm in the kernel tree
because it sets '_srcrpmdir'.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# dcad240c 14-Nov-2022 Andrew Davis <afd@ti.com>

kbuild: Cleanup DT Overlay intermediate files as appropriate

%.dtbo.o and %.dtbo.S files are used to build-in DT Overlay. They should
should not be removed by Make or the kernel will be needlessly rebuilt.

These should be removed by "clean" and ignored by git like other
intermediate files.

Reported-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Andrew Davis <afd@ti.com>
Fixes: 941214a512d8 ("kbuild: Allow DTB overlays to built into .dtbo.S files")
Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20221114205939.27994-1-afd@ti.com
Signed-off-by: Rob Herring <robh@kernel.org>


# 2f7ab126 03-Jul-2021 Miguel Ojeda <ojeda@kernel.org>

Kbuild: add Rust support

Having most of the new files in place, we now enable Rust support
in the build system, including `Kconfig` entries related to Rust,
the Rust configuration printer and a few other bits.

Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Co-developed-by: Alex Gaynor <alex.gaynor@gmail.com>
Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
Co-developed-by: Finn Behrens <me@kloenk.de>
Signed-off-by: Finn Behrens <me@kloenk.de>
Co-developed-by: Adam Bratschi-Kaye <ark.email@gmail.com>
Signed-off-by: Adam Bratschi-Kaye <ark.email@gmail.com>
Co-developed-by: Wedson Almeida Filho <wedsonaf@google.com>
Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
Co-developed-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Co-developed-by: Sven Van Asbroeck <thesven73@gmail.com>
Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
Co-developed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Gary Guo <gary@garyguo.net>
Co-developed-by: Boris-Chengbiao Zhou <bobo1239@web.de>
Signed-off-by: Boris-Chengbiao Zhou <bobo1239@web.de>
Co-developed-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Co-developed-by: Douglas Su <d0u9.su@outlook.com>
Signed-off-by: Douglas Su <d0u9.su@outlook.com>
Co-developed-by: Dariusz Sosnowski <dsosnowski@dsosnowski.pl>
Signed-off-by: Dariusz Sosnowski <dsosnowski@dsosnowski.pl>
Co-developed-by: Antonio Terceiro <antonio.terceiro@linaro.org>
Signed-off-by: Antonio Terceiro <antonio.terceiro@linaro.org>
Co-developed-by: Daniel Xu <dxu@dxuuu.xyz>
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Co-developed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Signed-off-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Co-developed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Signed-off-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>


# 80db40ba 03-Aug-2022 Miguel Ojeda <ojeda@kernel.org>

rust: add `.rustfmt.toml`

This is the configuration file for the `rustfmt` tool.

`rustfmt` is a tool for formatting Rust code according to style guidelines.
It is very commonly used across Rust projects.

The default configuration options are used.

Reviewed-by: Kees Cook <keescook@chromium.org>
Co-developed-by: Alex Gaynor <alex.gaynor@gmail.com>
Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
Co-developed-by: Wedson Almeida Filho <wedsonaf@google.com>
Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>


# 8c4555cc 03-Jul-2021 Miguel Ojeda <ojeda@kernel.org>

scripts: add `generate_rust_analyzer.py`

The `generate_rust_analyzer.py` script generates the configuration
file (`rust-project.json`) for rust-analyzer.

rust-analyzer is a modular compiler frontend for the Rust language.
It provides an LSP server which can be used in editors such as
VS Code, Emacs or Vim.

Reviewed-by: Kees Cook <keescook@chromium.org>
Co-developed-by: Alex Gaynor <alex.gaynor@gmail.com>
Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
Co-developed-by: Finn Behrens <me@kloenk.de>
Signed-off-by: Finn Behrens <me@kloenk.de>
Co-developed-by: Wedson Almeida Filho <wedsonaf@google.com>
Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
Co-developed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Gary Guo <gary@garyguo.net>
Co-developed-by: Boris-Chengbiao Zhou <bobo1239@web.de>
Signed-off-by: Boris-Chengbiao Zhou <bobo1239@web.de>
Co-developed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Signed-off-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>


# 9413e764 06-Apr-2022 Masahiro Yamada <masahiroy@kernel.org>

kbuild: split the second line of *.mod into *.usyms

The *.mod files have two lines; the first line lists the member objects
of the module, and the second line, if CONFIG_TRIM_UNUSED_KSYMS=y, lists
the undefined symbols.

Currently, we generate *.mod after constructing composite modules,
otherwise, we cannot compute the second line. No prerequisite is
required to print the first line.

They are orthogonal. Splitting them into separate commands will ease
further cleanups.

This commit splits the list of undefined symbols out to *.usyms files.

Previously, the list of undefined symbols ended up with a very long
line, but now it has one symbol per line.

Use sed like we did before commit 7d32358be8ac ("kbuild: avoid split
lines in .mod files").

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>


# 40cb0203 25-Apr-2021 Masahiro Yamada <masahiroy@kernel.org>

.gitignore: ignore only top-level modules.builtin

modules.builtin used to be created in every directory.

Since commit 8b41fc4454e3 ("kbuild: create modules.builtin without
Makefile.modbuiltin or tristate.conf"), modules.builtin is created only
in the top directory.

Add the '/' prefix so that it matches to only the modules.builtin located
in the top directory.

It has been more than one year since that change. I hope this will not
flood 'Untracked files' of 'git status'.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# 819cb9fc 25-Apr-2021 Masahiro Yamada <masahiroy@kernel.org>

.gitignore: move tags and TAGS close to other tag files

For consistency, move tags and TAGS close to the cscope and GNU Global
patterns.

I removed the '/' prefix in case somebody wants to manually create tag
files in sub-directories.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# 69bc8d38 25-Mar-2021 Masahiro Yamada <masahiroy@kernel.org>

kbuild: generate Module.symvers only when vmlinux exists

The external module build shows the following warning if Module.symvers
is missing in the kernel tree.

WARNING: Symbol version dump "Module.symvers" is missing.
Modules may not have dependencies or modversions.

I think this is an important heads-up because the resulting modules may
not work as expected. This happens when you did not build the entire
kernel tree, for example, you might have prepared the minimal setups
for external modules by 'make defconfig && make modules_preapre'.

A problem is that 'make modules' creates Module.symvers even without
vmlinux. In this case, that warning is suppressed since Module.symvers
already exists in spite of its incomplete content.

The incomplete (i.e. invalid) Module.symvers should not be created.

This commit changes the second pass of modpost to dump symbols into
modules-only.symvers. The final Module.symvers is created by
concatenating vmlinux.symvers and modules-only.symvers if both exist.

Module.symvers is supposed to collect symbols from both vmlinux and
modules. It might be a bit confusing, and I am not quite sure if it
is an official interface, but presumably it is difficult to rename it
because some tools (e.g. kmod) parse it.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# 5cc12472 05-Mar-2021 Rasmus Villemoes <linux@rasmusvillemoes.dk>

kbuild: add CONFIG_VMLINUX_MAP expert option

It can be quite useful to have ld emit a link map file, in order to
debug or verify that special sections end up where they are supposed
to, and to see what LD_DEAD_CODE_DATA_ELIMINATION manages to get rid
of.

The only reason I'm not just adding this unconditionally is that the
.map file can be rather large (several MB), and that's a waste of
space when one isn't interested in these things. Also make it depend
on CONFIG_EXPERT.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# 38e89184 11-Dec-2020 Sami Tolvanen <samitolvanen@google.com>

kbuild: lto: fix module versioning

With CONFIG_MODVERSIONS, version information is linked into each
compilation unit that exports symbols. With LTO, we cannot use this
method as all C code is compiled into LLVM bitcode instead. This
change collects symbol versions into .symversions files and merges
them in link-vmlinux.sh where they are all linked into vmlinux.o at
the same time.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20201211184633.3213045-4-samitolvanen@google.com


# ce88c9c7 28-Jan-2021 Viresh Kumar <viresh.kumar@linaro.org>

kbuild: Add support to build overlays (%.dtbo)

Add support for building DT overlays (%.dtbo). The overlay's source file
will have the usual extension, i.e. .dts, though the blob will have
.dtbo extension to distinguish it from normal blobs.

Acked-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/434ba2467dd0cd011565625aeb3450650afe0aae.1611904394.git.viresh.kumar@linaro.org


# f6236efc 09-Sep-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

.gitignore: docs: ignore sphinx_*/ directories

The default way of building documentation is to use
Sphinx toolchain installed via pip, inside the
Kernel tree main directory. That's what's recommended by:

scripts/sphinx-pre-install

As it usually provides a better version of this package
than the one installed, specially on LTS distros.

So, add the directories created by running the commands
suggested by the script.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/ac4e23d556c7d95cb11d6d5c605f43e425b2c3c7.1599660067.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>


# 6f3decab 30-Jul-2020 Adam Borowski <kilobyte@angband.pl>

.gitignore: Add ZSTD-compressed files

For now, that's arch/x86/boot/compressed/vmlinux.bin.zst but probably more
will come, thus let's be consistent with all other compressors.

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Nick Terrell <terrelln@fb.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20200730190841.2071656-8-nickrterrell@gmail.com


# ba77dca5 02-Jul-2020 Paul Menzel <pmenzel@molgen.mpg.de>

.gitignore: Do not track `defconfig` from `make savedefconfig`

Running `make savedefconfig` creates by default `defconfig`, which is,
currently, on git’s radar, for example, `git status` lists this file as
untracked.

So, add the file to `.gitignore`, so it’s ignored by git.

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# 269a535c 31-May-2020 Masahiro Yamada <masahiroy@kernel.org>

modpost: generate vmlinux.symvers and reuse it for the second modpost

The full build runs modpost twice, first for vmlinux.o and second for
modules.

The first pass dumps all the vmlinux symbols into Module.symvers, but
the second pass parses vmlinux again instead of reusing the dump file,
presumably because it needs to avoid accumulating stale symbols.

Loading symbol info from a dump file is faster than parsing an ELF object.
Besides, modpost deals with various issues to parse vmlinux in the second
pass.

A solution is to make the first pass dumps symbols into a separate file,
vmlinux.symvers. The second pass reads it, and parses module .o files.
The merged symbol information is dumped into Module.symvers in the same
way as before.

This makes further modpost cleanups possible.

Also, it fixes the problem of 'make vmlinux', which previously overwrote
Module.symvers, throwing away module symbols.

I slightly touched scripts/link-vmlinux.sh so that vmlinux is re-linked
when you cross this commit. Otherwise, vmlinux.symvers would not be
generated.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


# d198b34f 03-Mar-2020 Masahiro Yamada <masahiroy@kernel.org>

.gitignore: add SPDX License Identifier

Add SPDX License Identifier to all .gitignore files.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f3a60268 27-Feb-2020 Christophe Leroy <christophe.leroy@c-s.fr>

selftest/lkdtm: Use local .gitignore

Commit 68ca0fd272da ("selftest/lkdtm: Don't pollute 'git status'")
introduced patterns for git to ignore files generated in
tools/testing/selftests/lkdtm/

Use local .gitignore file instead of using the root one.

Fixes: 68ca0fd272da ("selftest/lkdtm: Don't pollute 'git status'")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>


# 68ca0fd2 06-Feb-2020 Christophe Leroy <christophe.leroy@c-s.fr>

selftest/lkdtm: Don't pollute 'git status'

Commit 46d1a0f03d66 ("selftests/lkdtm: Add tests for LKDTM targets")
added generation of lkdtm test scripts.

Ignore those generated scripts when performing 'git status'

Fixes: 46d1a0f03d66 ("selftests/lkdtm: Add tests for LKDTM targets")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>


# bbc55bde 29-Oct-2019 Masahiro Yamada <yamada.masahiro@socionext.com>

modpost: dump missing namespaces into a single modules.nsdeps file

The modpost, with the -d option given, generates per-module .ns_deps
files.

Kbuild generates per-module .mod files to carry module information.
This is convenient because Make handles multiple jobs in parallel
when the -j option is given.

On the other hand, the modpost always runs as a single thread.
I do not see a strong reason to produce separate .ns_deps files.

This commit changes the modpost to generate just one file,
modules.nsdeps, each line of which has the following format:

<module_name>: <list of missing namespaces>

Please note it contains *missing* namespaces instead of required ones.
So, modules.nsdeps is empty if the namespace dependency is all good.

This will work more efficiently because spatch will no longer process
already imported namespaces. I removed the '(if needed)' from the
nsdeps log since spatch is invoked only when needed.

This also solves the stale .ns_deps problem reported by Jessica Yu:

https://lkml.org/lkml/2019/10/28/467

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Jessica Yu <jeyu@kernel.org>
Acked-by: Jessica Yu <jeyu@kernel.org>
Reviewed-by: Matthias Maennich <maennich@google.com>
Tested-by: Matthias Maennich <maennich@google.com>


# 1d082773 06-Sep-2019 Matthias Maennich <maennich@google.com>

modpost: add support for generating namespace dependencies

This patch adds an option to modpost to generate a <module>.ns_deps file
per module, containing the namespace dependencies for that module.

E.g. if the linked module my-module.ko would depend on the symbol
myfunc.MY_NS in the namespace MY_NS, the my-module.ns_deps file created
by modpost would contain the entry MY_NS to express the namespace
dependency of my-module imposed by using the symbol myfunc.

These files can subsequently be used by static analysis tools (like
coccinelle scripts) to address issues with missing namespace imports. A
later patch of this series will introduce such a script 'nsdeps' and a
corresponding make target to automatically add missing
MODULE_IMPORT_NS() definitions to the module's sources. For that it uses
the information provided in the generated .ns_deps files.

Co-developed-by: Martijn Coenen <maco@android.com>
Signed-off-by: Martijn Coenen <maco@android.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>


# a564bdeb 18-Aug-2019 Masahiro Yamada <yamada.masahiro@socionext.com>

.gitignore: ignore modules.order explicitly

The pattern '*.order' was added by commit c6025f4c8bbe ("kbuild: ignore
*.order files") to ignore modules.order files.

I do not see any other user of the '.order' extension.

Ignore 'modules.order' explicitly instead of '*.order'.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 26c4c71b 23-Jul-2019 Toru Komatsu <k0ma@utam0k.jp>

.gitignore: Add compilation database file

This file is used by clangd to use language server protocol.
It can be generated at each compile using scripts/gen_compile_commands.py.
Therefore it is different depending on the environment and should be
ignored.

Signed-off-by: Toru Komatsu <k0ma@utam0k.jp>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# b7dca6dd 17-Jul-2019 Masahiro Yamada <yamada.masahiro@socionext.com>

kbuild: create *.mod with full directory path and remove MODVERDIR

While descending directories, Kbuild produces objects for modules,
but do not link final *.ko files; it is done in the modpost.

To keep track of modules, Kbuild creates a *.mod file in $(MODVERDIR)
for every module it is building. Some post-processing steps read the
necessary information from *.mod files. This avoids descending into
directories again. This mechanism was introduced in 2003 or so.

Later, commit 551559e13af1 ("kbuild: implement modules.order") added
modules.order. So, we can simply read it out to know all the modules
with directory paths. This is easier than parsing the first line of
*.mod files.

$(MODVERDIR) has a flat directory structure, that is, *.mod files
are named only with base names. This is based on the assumption that
the module name is unique across the tree. This assumption is really
fragile.

Stephen Rothwell reported a race condition caused by a module name
conflict:

https://lkml.org/lkml/2019/5/13/991

In parallel building, two different threads could write to the same
$(MODVERDIR)/*.mod simultaneously.

Non-unique module names are the source of all kind of troubles, hence
commit 3a48a91901c5 ("kbuild: check uniqueness of module names")
introduced a new checker script.

However, it is still fragile in the build system point of view because
this race happens before scripts/modules-check.sh is invoked. If it
happens again, the modpost will emit unclear error messages.

To fix this issue completely, create *.mod with full directory path
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.

I also killed cmd_secanalysis; scripts/mod/sumversion.c computes MD4 hash
for modules with MODULE_VERSION(). When CONFIG_DEBUG_SECTION_MISMATCH=y,
it occurs not only in the modpost stage, but also during directory
descending, where sumversion.c may parse stale *.mod files. It would emit
'No such file or directory' warning when an object 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 <yamada.masahiro@socionext.com>
Acked-by: Nicolas Pitre <nico@fluxnic.net>


# c93a0368 30-Jun-2019 Masahiro Yamada <yamada.masahiro@socionext.com>

kbuild: do not create wrappers for header-test-y

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 create a wrapper include/linux/mtd/nand.hdrtest.c
with the following content:

#include "mtd/nand.h"

To make this work, we need to add $(srctree)/include/linux to the
header search path. It would be tedious to add ccflags-y.

Instead, we could change the *.hdrtest.c rule to wrap:

#include "nand.h"

This works for in-tree build since #include "..." searches in the
relative path from the header with this directive. For O=... build,
we need to add $(srctree)/include/linux/mtd to the header search path,
which will be even more tedious.

After all, I thought it would be handier to compile headers directly
without creating wrappers.

I added a new build rule to compile %.h into %.h.s

The target is %.h.s instead of %.h.o because it is slightly faster.
Also, as for GCC, an empty assembly is smaller than an empty object.

I wrote the build rule:

$(CC) $(c_flags) -S -o $@ -x c /dev/null -include $<

instead of:

$(CC) $(c_flags) -S -o $@ -x c $<

Both work fine with GCC, but the latter is bad for Clang.

This comes down to the difference in the -Wunused-function policy.
GCC does not warn about unused 'static inline' functions at all.
Clang does not warn about the ones in included headers, but does
about the ones in the source. So, we should 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 <yamada.masahiro@socionext.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Tested-by: Jani Nikula <jani.nikula@intel.com>


# e846f0dc 04-Jun-2019 Jani Nikula <jani.nikula@intel.com>

kbuild: add support for ensuring headers are self-contained

Sometimes it's useful to be able to explicitly ensure certain headers
remain self-contained, i.e. that they are compilable as standalone
units, by including and/or forward declaring everything they depend on.

Add special target header-test-y where individual Makefiles can 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.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# f46e65da 10-May-2019 Masahiro Yamada <yamada.masahiro@socionext.com>

.gitignore: exclude .get_maintainer.ignore and .gitattributes

Also, sort the patterns alphabetically. Update the comment since
we have non-git files here.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7fb1fc42 07-May-2019 Masahiro Yamada <yamada.masahiro@socionext.com>

.gitignore: add more all*.config patterns

For completeness, ignore all the allconfig variants.

I added a leading slash because they are only searched in the
top of the tree.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 898490c0 29-Apr-2019 Alexey Gladkov <gladkov.alexey@gmail.com>

moduleparam: Save information about built-in modules in separate file

Problem:

When a kernel module is compiled as a separate module, some important
information about the kernel module is available via .modinfo section of
the module. In contrast, when the kernel module is compiled into the
kernel, that information is not available.

Information about built-in modules is necessary in the following cases:

1. When it is necessary to find out what additional parameters can be
passed to the kernel at boot time.

2. When you need to know which module names and their aliases are in
the kernel. This is very useful for creating an initrd image.

Proposal:

The proposed patch does not remove .modinfo section with module
information from the vmlinux at the build time and saves it into a
separate file after kernel linking. So, the kernel does not increase in
size and no additional information remains in it. Information is stored
in the same format as in the separate modules (null-terminated string
array). Because the .modinfo section is already exported with a separate
modules, we are not creating a new API.

It can be easily read in the userspace:

$ tr '\0' '\n' < modules.builtin.modinfo
ext4.softdep=pre: crc32c
ext4.license=GPL
ext4.description=Fourth Extended Filesystem
ext4.author=Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others
ext4.alias=fs-ext4
ext4.alias=ext3
ext4.alias=fs-ext3
ext4.alias=ext2
ext4.alias=fs-ext2
md_mod.alias=block-major-9-*
md_mod.alias=md
md_mod.description=MD RAID framework
md_mod.license=GPL
md_mod.parmtype=create_on_open:bool
md_mod.parmtype=start_dirty_degraded:int
...

Co-Developed-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
Acked-by: Jessica Yu <jeyu@kernel.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 1e35663e 29-Apr-2019 Masahiro Yamada <yamada.masahiro@socionext.com>

.gitignore: add leading and trailing slashes to generated directories

Clarify these directory paths are relative to the top of the source
tree.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 4f0e3a57 06-Sep-2018 Rob Herring <robh@kernel.org>

kbuild: Add support for DT binding schema checks

This adds the build infrastructure for checking DT binding schema
documents and validating dts files using the binding schema.

Check DT binding schema documents:
make dt_binding_check

Build dts files and check using DT binding schema:
make dtbs_check

Optionally, DT_SCHEMA_FILES can be passed in with a schema file(s) to
use for validation. This makes it easier to find and fix errors
generated by a specific schema.

Currently, the validation targets are separate from a normal build to
avoid a hard dependency on the external DT schema project and because
there are lots of warnings generated.

Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mark Rutland <mark.rutland@arm.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: linux-doc@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>


# d4ef8d3f 10-Apr-2018 Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>

clang-format: add configuration file

clang-format is a tool to format C/C++/... code according to a set of
rules and heuristics. Like most tools, it is not perfect nor covers
every single case, but it is good enough to be helpful.

In particular, it is useful for quickly re-formatting blocks of code
automatically, for reviewing full files in order to spot coding style
mistakes, typos and possible improvements. It is also handy for sorting
``#includes``, for aligning variables and macros, for reflowing text and
other similar tasks. It also serves as a teaching tool/guide for
newcomers.

The tool itself has been already included in the repositories of popular
Linux distributions for a long time. The rules in this file are
intended for clang-format >= 4, which is easily available in most
distributions.

This commit adds the configuration file that contains the rules that the
tool uses to know how to format the code according to the kernel coding
style. This gives us several advantages:

* clang-format works out of the box with reasonable defaults;
avoiding that everyone has to re-do the configuration.

* Everyone agrees (eventually) on what is the most useful default
configuration for most of the kernel.

* If it becomes commonplace among kernel developers, clang-format
may feel compelled to support us better. They already recognize
the Linux kernel and its style in their documentation and in one
of the style sub-options.

Some of clang-format's features relevant for the kernel are:

* Uses clang's tooling support behind the scenes to parse and rewrite
the code. It is not based on ad-hoc regexps.

* Supports reasonably well the Linux kernel coding style.

* Fast enough to be used at the press of a key.

* There are already integrations (either built-in or third-party)
for many common editors used by kernel developers (e.g. vim,
emacs, Sublime, Atom...) that allow you to format an entire file
or, more usefully, just your selection.

* Able to parse unified diffs -- you can, for instance, reformat
only the lines changed by a git commit.

* Able to reflow text comments as well.

* Widely supported and used by hundreds of developers in highly
complex projects and organizations (e.g. the LLVM project itself,
Chromium, WebKit, Google, Mozilla...). Therefore, it will be
supported for a long time.

See more information about the tool at:

https://clang.llvm.org/docs/ClangFormat.html
https://clang.llvm.org/docs/ClangFormatStyleOptions.html

Link: http://lkml.kernel.org/r/20180318171632.qfkemw3mwbcukth6@gmail.com
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 4fa8bc94 23-Mar-2018 Masahiro Yamada <yamada.masahiro@socionext.com>

kbuild: rename *-asn1.[ch] to *.asn1.[ch]

Our convention is to distinguish file types by suffixes with a period
as a separator.

*-asn1.[ch] is a different pattern from other generated sources such
as *.lex.c, *.tab.[ch], *.dtb.S, etc. More confusing, files with
'-asn1.[ch]' are generated files, but '_asn1.[ch]' are checked-in
files:
net/netfilter/nf_conntrack_h323_asn1.c
include/linux/netfilter/nf_conntrack_h323_asn1.h
include/linux/sunrpc/gss_asn1.h

Rename generated files to *.asn1.[ch] for consistency.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 9ce285cf 23-Mar-2018 Masahiro Yamada <yamada.masahiro@socionext.com>

.gitignore: move *-asn1.[ch] patterns to the top-level .gitignore

These are common patterns where source files are parsed by the
asn1_compiler.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 59889300 23-Mar-2018 Masahiro Yamada <yamada.masahiro@socionext.com>

.gitignore: move *.lex.c *.tab.[ch] patterns to the top-level .gitignore

These patterns are common to host programs that require lexer and parser.
Move them to the top .gitignore.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Frank Rowand <frowand.list@gmail.com>


# fbfa9be9 16-Mar-2018 Masahiro Yamada <yamada.masahiro@socionext.com>

kbuild: move include/config/ksym/* to include/ksym/*

The idea of using fixdep was inspired by Kconfig, but autoksyms
belongs to a different group. So, I want to move those touched
files under include/config/ksym/ to include/ksym/.

The directory include/ksym/ can be removed by 'make clean' because
it is meaningless for the external module building.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Nicolas Pitre <nico@linaro.org>


# d682026d 12-Feb-2018 Zhu Lingshan <lszhu@suse.com>

.gitignore: ignore ASN.1 auto generated files

when build kernel with default configure, files:

generatenet/ipv4/netfilter/nf_nat_snmp_basic-asn1.c
net/ipv4/netfilter/nf_nat_snmp_basic-asn1.h

will be automatically generated by ASN.1 compiler, so
No need to track them in git, it's better to ignore them.

Signed-off-by: Zhu Lingshan <lszhu@suse.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>


# 5704d455 26-Nov-2017 Paolo Pisati <paolo.pisati@canonical.com>

scripts/package: snap-pkg target

Following in footsteps of other targets like 'deb-pkg, 'rpm-pkg' and 'tar-pkg',
this patch adds a 'snap-pkg' target for the creation of a Linux kernel snap
package using the kbuild infrastructure.

A snap, in its general form, is a self contained, sandboxed, universal package
and it is intended to work across multiple distributions and/or devices. A snap
package is distributed as a single compressed squashfs filesystem.

A kernel snap is a snap package carrying the Linux kernel, kernel modules,
accessory files (DTBs, System.map, etc) and a manifesto file. The purpose of a
kernel snap is to carry the Linux kernel during the creation of a system image,
eg. Ubuntu Core, and its subsequent upgrades.

For more information on snap packages: https://snapcraft.io/docs/

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# af60e207 29-Sep-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

kbuild: rpm-pkg: keep spec file until make mrproper

If build fails during (bin)rpm-pkg, the spec file is not cleaned by
anyone until the next successful build of the package.

We do not have to immediately delete the spec file in case somebody
may want to take a look at it. Instead, make them ignored by git,
and cleaned up by make mrproper.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 10b62a2f 30-Oct-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

.gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignore

Most of DT files are compiled under arch/*/boot/dts/, but we have some
other directories, like drivers/of/unittest-data/. We often miss to
add gitignore patterns per directory. Since there are no source files
that end with .dtb or .dtb.S, we can ignore the patterns globally.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Rob Herring <robh@kernel.org>


# 1377dd3e 30-Oct-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

.gitignore: sort normal pattern rules alphabetically

We are having more and more ignore patterns. Sort the list
alphabetically. We will easily catch duplicated patterns if any.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Rob Herring <robh@kernel.org>


# 433db3e2 24-Apr-2017 Vinícius Tinti <viniciustinti@gmail.com>

kbuild: Add support to generate LLVM assembly files

Add rules to kbuild in order to generate LLVM assembly files with the .ll
extension when using clang.

# from c code
make CC=clang kernel/pid.ll

Signed-off-by: Vinícius Tinti <viniciustinti@gmail.com>
Signed-off-by: Behan Webster <behanw@converseincode.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# dd951fc1 29-Jun-2016 Luis R. Rodriguez <mcgrof@kernel.org>

scripts: add Linux .cocciconfig for coccinelle

Coccinelle supports reading .cocciconfig, the order of precedence for
variables for .cocciconfig is as follows:

o Your current user's home directory is processed first
o Your directory from which spatch is called is processed next
o The directory provided with the --dir option is processed last, if used

Since coccicheck runs through make, it naturally runs from the kernel
proper dir, as such the second rule above would be implied for picking up a
.cocciconfig when using 'make coccicheck'.

'make coccicheck' also supports using M= targets.If you do not supply
any M= target, it is assumed you want to target the entire kernel.
The kernel coccicheck script has:

if [ "$KBUILD_EXTMOD" = "" ] ; then
OPTIONS="--dir $srctree $COCCIINCLUDE"
else
OPTIONS="--dir $KBUILD_EXTMOD $COCCIINCLUDE"
fi

KBUILD_EXTMOD is set when an explicit target with M= is used. For both cases
the spatch --dir argument is used, as such third rule applies when
whether M= is used or not, and when M= is used the target directory can
have its own .cocciconfig file. When M= is not passed as an argument to
coccicheck the target directory is the same as the directory from where
spatch was called.

If not using the kernel's coccicheck target, keep the above precedence order
logic of .cocciconfig reading. If using the kernel's coccicheck target,
override any of the kernel's .coccicheck's settings using SPFLAGS.

We help Coccinelle when used against Linux with a set of sensible defaults
options for Linux with our own Linux .cocciconfig. This hints to coccinelle
git can be used for 'git grep' queries over coccigrep. A timeout of 200
seconds should suffice for now.

The options picked up by coccinelle when reading a .cocciconfig do not appear
as arguments to spatch processes running on your system, to confirm what
options will be used by Coccinelle run:

spatch --print-options-only

You can override with your own preferred index option by using SPFLAGS.
Coccinelle supports both glimpse and idutils. Glimpse had historically
provided the best performance, however recent benchmarks reveal idutils
is performing just as well. Due to some recent fixes however you however
will need at least coccinelle >= 1.0.6 if using idutils.

Coccinelle carries a script scripts/idutils_index.sh which creates the
idutils database with as follows:

mkid -i C --output .id-utils.index

If using just "--use-idutils" coccinelle expects your idutils database to be
on the top level of the kernel as a file named ".id-utils.index". If you do
not use this you can symlink your database file to it, or you can specify the
database file following the "--use-idutils" argument. Examples:

make SPFLAGS=--use-idutils coccicheck

This assumes you have $srctree/.id-utils.index, where $srctree is
the top level of the kernel.

make SPFLAGS="--use-idutils /full-path/to/ID" coccicheck

Here you specify the full path of the idutils ID database. Using
.cocciconfig is possible, however given the order of precedence followed
by Coccinelle, and since the kernel now carries its own .cocciconfig,
you will need to use SPFLAGS to use idutils if desired.

v4:

o Recommend upgrade for using idutils with coccinelle due to some
recent fixes.

o Refer to using --print-options-only for testing what options are
picked up by .cocciconfig reading.

o Expand commit log considerably explaining *why* .cocconfig from
two precedence rules are used when using coccicheck, and how to
properly override these if needed.

o Expand Documentation/coccinelle.txt

v3: Expand commit log a bit more

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Michal Marek <mmarek@suse.com>


# 6b90bd4b 23-May-2016 Emese Revfy <re.emese@gmail.com>

GCC plugin infrastructure

This patch allows to build the whole kernel with GCC plugins. It was ported from
grsecurity/PaX. The infrastructure supports building out-of-tree modules and
building in a separate directory. Cross-compilation is supported too.
Currently the x86, arm, arm64 and uml architectures enable plugins.

The directory of the gcc plugins is scripts/gcc-plugins. You can use a file or a directory
there. The plugins compile with these options:
* -fno-rtti: gcc is compiled with this option so the plugins must use it too
* -fno-exceptions: this is inherited from gcc too
* -fasynchronous-unwind-tables: this is inherited from gcc too
* -ggdb: it is useful for debugging a plugin (better backtrace on internal
errors)
* -Wno-narrowing: to suppress warnings from gcc headers (ipa-utils.h)
* -Wno-unused-variable: to suppress warnings from gcc headers (gcc_version
variable, plugin-version.h)

The infrastructure introduces a new Makefile target called gcc-plugins. It
supports all gcc versions from 4.5 to 6.0. The scripts/gcc-plugin.sh script
chooses the proper host compiler (gcc-4.7 can be built by either gcc or g++).
This script also checks the availability of the included headers in
scripts/gcc-plugins/gcc-common.h.

The gcc-common.h header contains frequently included headers for GCC plugins
and it has a compatibility layer for the supported gcc versions.

The gcc-generate-*-pass.h headers automatically generate the registration
structures for GIMPLE, SIMPLE_IPA, IPA and RTL passes.

Note that 'make clean' keeps the *.so files (only the distclean or mrproper
targets clean all) because they are needed for out-of-tree modules.

Based on work created by the PaX Team.

Signed-off-by: Emese Revfy <re.emese@gmail.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michal Marek <mmarek@suse.com>


# 52bbe141 27-Apr-2016 Kyeongmin Cho <korea.drzix@gmail.com>

gitignore: fix wording

Git files are the files that we don't want to ignore even if
they are dot-files. It must be "even if" but it says "even it".

Signed-off-by: Kyeongmin Cho <korea.drzix@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# e2557287 20-Aug-2015 Rasmus Villemoes <linux@rasmusvillemoes.dk>

.gitignore: add *.su pattern

Ignore the *.su files generated by using the gcc option -fstack-usage.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Michal Marek <mmarek@suse.com>


# fb117949 20-Jul-2015 David Woodhouse <David.Woodhouse@intel.com>

modsign: Use single PEM file for autogenerated key

The current rule for generating signing_key.priv and signing_key.x509 is
a classic example of a bad rule which has a tendency to break parallel
make. When invoked to create *either* target, it generates the other
target as a side-effect that make didn't predict.

So let's switch to using a single file signing_key.pem which contains
both key and certificate. That matches what we do in the case of an
external key specified by CONFIG_MODULE_SIG_KEY anyway, so it's also
slightly cleaner.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: David Howells <dhowells@redhat.com>


# a37161c0 16-Apr-2015 Andi Kleen <ak@linux.intel.com>

Kbuild: Add ID files to .gitignore

I use GNU id-utils to find code (essentially a database backed grep),
which generates an ID file to maintain its data.

Add ID to the .gitignore file.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>


# d0fe116b 24-Apr-2015 Florian Fainelli <f.fainelli@gmail.com>

gitignore: Add MIPS vmlinux.32 to the list

MIPS64 kernels builds will produce a vmlinux.32 kernel image for
compatibility, ignore them.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>


# f4ae9497 16-Apr-2015 Andrey Skvortsov <andrej.skvortzov@gmail.com>

.gitignore: ignore *.tar

Running make tar-pkg results in following:

# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# linux-4.0.0-rc3-next-20150313-150225--x86.tar

This patch makes git ignore *.tar files.
Running 'git ls-files -i --exclude-standard' does not show any
tar files excluded from tracking after the change.

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Boaz Harrosh <boaz@plexistor.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 2478a8a1 17-Feb-2015 Daniel Thompson <daniel.thompson@linaro.org>

scripts/gdb: ignore byte-compiled python files

Using the gdb scripts leaves byte-compiled python files in the scripts/
directory. These should be ignored by git.

[jan.kiszka@siemens.com: drop redundant mrproper rule as suggested by Michal]
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Borislav Petkov <bp@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# dd10ca6c 12-Feb-2015 Andrey Skvortsov <andrej.skvortzov@gmail.com>

gitignore: ignore tar-install build directory

Have git ignore the Debian directory created when running:
make tar-pkg / targz-pkg / tarbz2-pkg / tarxz-pkg

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Boaz Harrosh <boaz@plexistor.com>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# fe2a7c05 27-Nov-2014 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Revert "staging: unisys: fix CamelCase macro names in controlframework.h"

This reverts commit 75185f57f110a7c48d9d33a585320c93334adf0c because it
modified the .gitignore file in the root of the tree, without saying it
did so, which isn't acceptable.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# dfe04872 25-Nov-2014 Boaz Harrosh <boaz@plexistor.com>

.gitignore: Add Kdevelop4 project files

I'm not sure what is the costume with such IDE project files.
Most might be dot-files. It is kind of annoying for the Kdevelop4 user.

So please consider adding *.kdev4 files to be ignored?

Signed-off-by: Boaz Harrosh <boaz@plexistor.com>
[mmarek: Moved at the and and added a comment]
Signed-off-by: Michal Marek <mmarek@suse.cz>


# 75185f57 23-Oct-2014 Benjamin Romer <benjamin.romer@unisys.com>

staging: unisys: fix CamelCase macro names in controlframework.h

Fix CamelCase names:

ULTRA_MEMORY_COUNT_Ki => ULTRA_MEMORY_COUNT_KI
ULTRA_MEMORY_PAGE_Ki => ULTRA_MEMORY_PAGE_KI

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 866ced95 30-Jul-2014 Andi Kleen <ak@linux.intel.com>

kbuild: Support split debug info v4

This is an alternative approach to lower the overhead of debug info
(as we discussed a few days ago)

gcc 4.7+ and newer binutils have a new "split debug info" debug info
model where the debug info is only written once into central ".dwo" files.

This avoids having to copy it around multiple times, from the object
files to the final executable. It lowers the disk space
requirements. In addition it defaults to compressed debug data.

More details here: http://gcc.gnu.org/wiki/DebugFission

This patch adds a new option to enable it. It has to be an option,
because it'll undoubtedly break everyone's debuginfo packaging scheme.
gdb/objdump/etc. all still work, if you have new enough versions.

I don't see big compile wins (maybe a second or two faster or so), but the
object dirs with debuginfo get significantly smaller. My standard kernel
config (slightly bigger than defconfig) shrinks from 2.9G disk space
to 1.1G objdir (with non reduced debuginfo). I presume if you are IO limited
the compile time difference will be larger.

Only problem I've seen so far is that it doesn't play well with older
versions of ccache (apparently fixed, see
https://bugzilla.samba.org/show_bug.cgi?id=10005)

v2: various fixes from Dirk Gouders. Improve commit message slightly.
v3: Fix clean rules and improve Kconfig slightly
v4: Fix merge error in last version (Sam Ravnborg)
Clarify description that it mainly helps disk size.
Cc: Dirk Gouders <dirk@gouders.net>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>


# 082722a0 14-Apr-2014 Zhao, Gang <gamerh2o@gmail.com>

.gitignore: ignore Module.symvers in all directories

When using `make M=/path/to/driver modules` to build a module, file
Module.symvers will be created in that directory, so it's better to
ignore it in all directories.

Slightly reordered, let specific file names behind general ones.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Kyungsik Lee <kyungsik.lee@lge.com>
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>


# 25fba9be 10-Feb-2014 Borislav Petkov <bp@suse.de>

gitignore: add all.config

This is used by kbuild to load preset Kconfig options. We need to
ignore it, otherwise git clean kills it.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 4e505294 31-Jul-2013 Markus Trippelsdorf <markus@trippelsdorf.de>

.gitignore: ignore *.lz4 files

Now that lz4 kernel compression is available, add *.lz4 to .gitignore.

Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Acked-by: Kyungsik Lee <kyungsik.lee@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# da01ee3c 17-Dec-2012 Jonathan Austin <jonathan.austin@arm.com>

.gitignore: remove stale entry for generated version.h

Since userspace headers were moved to generated/uapi it possible to have a
stale copy of linux/version.h at that file's old location. This causes
confusion after building an older kernel version, then checking out and
building a new one; the old (stale) version header will still get picked
up until it is manually removed. This upsets the C library.

Since the uapi changes, include/linux/version.h is no longer generated and
should not be ignored, so this patch removes it from .gitignore.

Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
Reported-by: Kevin Petit <kevin.petit@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# b6bb324d 19-Oct-2012 David Howells <dhowells@redhat.com>

MODSIGN: Cleanup .gitignore

The module build process no longer creates intermediate files for module
signing, so remove them from .gitignore.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# addbcdbb 26-Sep-2012 David Howells <dhowells@redhat.com>

MODSIGN: Provide gitignore and make clean rules for extra files

Provide gitignore and make clean rules for extra files to hide and clean up the
extra files produced by module signing stuff once it is added. Also add a
clean up rule for the module content extractor program used to extract the data
to be signed.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>


# b7568286 30-Jun-2011 Greg Dietsche <Gregory.Dietsche@cuw.edu>

gitignore: ignore debian build directory

Have git ignore the Debian directory created when running:
make deb-pkg

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Michal Marek <mmarek@suse.cz>


# d8ecc5cd 27-Apr-2011 Sam Ravnborg <sam@ravnborg.org>

kbuild: asm-generic support

There is an increasing amount of header files
shared between individual architectures in asm-generic.
To avoid a lot of dummy wrapper files that just
include the corresponding file in asm-generic provide
some basic support in kbuild for this.

With the following patch an architecture can maintain
a list of files in the file arch/$(ARCH)/include/asm/Kbuild

To use a generic file just add:

generic-y += <name-of-header-file.h>

For each file listed kbuild will generate the necessary
wrapper in arch/$(ARCH)/include/generated/asm.

When installing userspace headers a wrapper is likewise created.

The original inspiration for this came from the unicore32
patchset - although a different method is used.

The patch includes several improvements from Arnd Bergmann.
Michael Marek contributed Makefile.asm-generic.

Remis Baima did an intial implementation along to achive
the same - see https://patchwork.kernel.org/patch/13352/

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Guan Xuetao <guanxuetao@mprc.pku.edu.cn>
Tested-by: Guan Xuetao <guanxuetao@mprc.pku.edu.cn>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Remis Lima Baima <remis.developer@googlemail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>


# 790e10ba 22-Feb-2011 Romain Francoise <romain@orebokech.com>

.gitignore: ignore *.xz files

Building with CONFIG_KERNEL_XZ results in the following:

# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# arch/x86/boot/compressed/vmlinux.bin.xz

So ignore xz-compressed files at the top level like we already do for
other compression types.

Signed-off-by: Romain Francoise <romain@orebokech.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 52b80025 17-Mar-2010 Philipp Kohlbecher <xt28@gmx.de>

.gitignore: ignore *.lzo files

Ignore files compressed with lzop.

Signed-off-by: Philipp Kohlbecher <xt28@gmx.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>


# 6db823cf 12-Mar-2010 Linus Torvalds <torvalds@linux-foundation.org>

Fix up .gitignore for top-level file patterns

Some of the gitignore file patters were explicitly meant to be only for
the top level, but weren't marked that way, so they would trigger
recursively in subdirectories too. Normally that was harmless, but at
least "linux" happened to trigger elsewhere too. Fix it up.

And other patterns in that section weren't necessarily top-level at all.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 3b2a8c8f 05-Mar-2010 WANG Cong <xiyou.wangcong@gmail.com>

um: tell git to ignore generated files

Tell git to ignore the generated files under um, except:

include/shared/kern_constants.h
include/shared/user_constants.h

which will be moved to include/generated.

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# f146aabf 08-Jan-2010 Florian Fainelli <ffainelli@freebox.fr>

.gitignore: ignore vmlinuz

MIPS compressed kernels output a vmlinuz file in the top-level directory
(maybe others do). Add vmlinuz to the list of files to ignore by git.

Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# bc081dd6 07-Dec-2009 Michal Marek <mmarek@suse.cz>

kbuild: generate modules.builtin

To make it easier for module-init-tools and scripts like mkinitrd to
distinguish builtin and missing modules, install a modules.builtin file
listing all builtin modules. This is done by generating an additional
config file (tristate.conf) with tristate options set to uppercase 'Y'
or 'M'. If we source that config file, the builtin modules appear in
obj-Y.

Signed-off-by: Michal Marek <mmarek@suse.cz>


# 273b281f 17-Oct-2009 Sam Ravnborg <sam@ravnborg.org>

kbuild: move utsrelease.h to include/generated

Fix up all users of utsrelease.h

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>


# 264a2683 17-Oct-2009 Sam Ravnborg <sam@ravnborg.org>

kbuild: move autoconf.h to include/generated

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>


# 92045954 17-Oct-2009 Sam Ravnborg <sam@ravnborg.org>

kbuild: move compile.h to include/generated

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>


# f7f16b77 17-Oct-2009 Sam Ravnborg <sam@ravnborg.org>

kbuild: drop include/asm

We no longer use this directory for generated files and
all architectures has moved their header files so no
symlink tricks are needed either.

Drop the symlink and drop the ARCH check.

If we really need to check that the SRCARCH has not changed
when we build a kernel we can add this check back - but then we will
find a more convenient way to store the info.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>


# 559df2e0 19-Apr-2009 Sam Ravnborg <sam@ravnborg.org>

kbuild: move asm-offsets.h to include/generated

The simplest method was to add an extra asm-offsets.h
file in arch/$ARCH/include/asm that references the generated file.

We can now migrate the architectures one-by-one to reference
the generated file direct - and when done we can delete the
temporary arch/$ARCH/include/asm/asm-offsets.h file.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>


# 01fc0ac1 19-Apr-2009 Sam Ravnborg <sam@ravnborg.org>

kbuild: move bounds.h to include/generated

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>


# e3a41d7b 23-Nov-2009 Gertjan van Wingerde <gwingerde@gmail.com>

.gitignore: Add bzip2 compressed files

We can have bzip2 compressed images nowadays.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 7a6b1f1c 22-Jun-2009 Amerigo Wang <xiyou.wangcong@gmail.com>

gitignore: ignore gcov output files

Ignore *.gcno files which are generated by gcov.

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>


# 3f8d9ced 10-Jun-2009 Arne Janbu <arnej@ampheus.de>

.gitignore: ignore *.lzma files

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>


# f2ac5e78 10-Jun-2009 Jani Nikula <ext-jani.1.nikula@nokia.com>

gitignore: Add GNU GLOBAL files to top .gitignore

Ignore GPATH, GRTAGS, GSYMS, and GTAGS generated by GNU GLOBAL.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>


# ff2f5ff0 04-Jun-2009 Matt Kraai <kraai@ftbfs.org>

trivial: Remove the hyphen from git commands

Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 35763e85 26-May-2009 Mike Frysinger <vapier@gentoo.org>

ignore *.patch files

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>


# f14875a3 18-Apr-2009 Sam Ravnborg <sam@ravnborg.org>

kbuild: support include/generated

We need a location for generated files.
Today they are spread over several places and bringing them
together to a common place makes it obvious hat is generated
and what isreal files.

Al Viro originally suggested: include/gen
Linus suggested to spell it out.

This patch implement support for

include/generated

All files in include/generated are ignored by git.
include/generated is removed during "make mrproper".

With this we are ready to implement support for include/generated
in the various architctures and in the base kernel.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>


# f72e9df0 26-Jun-2008 Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>

Fix and clean top .gitignore

Removed vmlinux* rule because it matches too many useful files, replacing
it with rules matching filetype by filename (e.g. *.gz). Also unignored
.mailmap from the top directory. Added a comment telling the user how to
check for tracked files being ignored.

Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# cd50e892 15-Jun-2008 Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>

Unignore vmlinux.lds.h from Git.

Added !vmlinux.lds.h to .gitignore because it would otherwise be ignored.

Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 9723c046 21-May-2008 Jike Song <albcamus@gmail.com>

.gitignore: match ncscope.out

Sometimes I got this:

$ git-status
{snip}
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# ncscope.out
nothing added to commit but untracked files present (use "git add"
to track)

Fix it.

Signed-off-by: Jike Song <albcamus@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>


# 1f5d3a6b 02-May-2008 S.Çağlar Onur <caglar@pardus.org.tr>

Remove *.rej pattern from .gitignore

With commit 3f1b0e1f287547903f11fa1e6de7d2765597766e ".gitignore update"
Linus's current git tree starts to ignore any "*.rej" files.
So "git status" no longer shows these files, but the ones who works with
quilt patchsets, this not makes life easier as expected.
Because sometimes a work flow (at least for me) requires
"quilt push -f" followed by "git status" to see unresolved merge
conflicts, work on these conflicts to correct them and finalize
the patch with "quilt refresh".

And if there are some "*.rej" files exists in tree, for whatever
reason, this means something goes really wrong there and i think
this situation not deserves to be ignored.

Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>


# e4c576b9 30-Apr-2008 Theodore Ts'o <tytso@MIT.EDU>

Update .gitignore to include include/linux/bounds.h

(which is autogenerated by kbuild)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 2cfed60c 25-Apr-2008 Matthew Wilcox <willy@infradead.org>

Update .gitignore files

Add some autogenerated files to various .gitignore files

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 70886554 04-Mar-2008 Chris Dearman <chris@mips.com>

.gitignore: ignore emacs backup and temporary files.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# c6025f4c 31-Dec-2007 Sam Ravnborg <sam@ravnborg.org>

kbuild: ignore *.order files

Introducing the new modules.order patch created a number
of additional files. Teach git to ignore them.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Tejun Heo <htejun@gmail.com>


# f322727b 19-Oct-2007 Thomas Gleixner <tglx@linutronix.de>

x86: update .gitignore entries

vdso / vsycall create .so.dbg files now.
Add *.so.dbg to the main .ignore file

Exclude the compile time created boot directory in arch/x86_64 as well

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


# 9e447a7f 16-Oct-2007 Denis V. Lunev <den@openvz.org>

.gitignore update for x86 arch

This patch:
- makes .gitignore files visible to git
- makes arch/x86/kernel/vsyscall_32.lds and arch/i386/boot invisible

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>


# 96918a35 31-Jul-2007 Alexey Dobriyan <adobriyan@sw.ru>

.gitignore update

Somehow I ended up with the following in tree:

$ git status
...
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# fs/proc/root.o.FuMxJQ
# net/ipv4/tcp_minisocks.o.geCDYR

These are presumably temporary gcc files, which aren't interesting.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# eaf729c8 20-Jul-2007 Linus Torvalds <torvalds@woody.linux-foundation.org>

Un-ignore "vmlinux.lds.S" in .gitignore

We ignore all the generated files called "vmlinux*" from the top-level
gitignore, but that also ends up catching a few files that we track, and
that people do edit. Notably the "vmlinux.lds.S" file, that each
architecture has.

You can always use "git add -f" to override the ignore file, but we
might as well just make it explicit for this file.

Bitten-by-and-tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 3f1b0e1f 16-Jul-2007 Alexey Dobriyan <adobriyan@sw.ru>

.gitignore update

headers_install by default puts headers into usr/include/ .
They're auto-generated, so should be ignored.

Same for *.orig, *.rej .

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 132e2bc3 22-Dec-2006 Tobias Klauser <tklauser@distanz.ch>

[PATCH] Add cscope generated files to .gitignore

Ignore files generated by 'make cscope'

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 5fd934a9 10-Nov-2006 Franck Bui-Huu <fbuihuu@gmail.com>

[PATCH] .gitignore: add miscellaneous files

Prevent git from reporting this useless status:

On branch refs/heads/master
Untracked files:
(use "git add" to add to commit)

TAGS
scripts/kconfig/lkc_defs.h
scripts/kconfig/qconf.moc
nothing to commit

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# ac3b719c 16-Sep-2006 Josh Triplett <josh@joshtriplett.org>

[PATCH] Add symbol type files (*.symtypes) to .gitignore

The kernel build system supports making symbol type files (*.symtypes) from C
source files. Add these files to .gitignore.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 87dedbda 16-Sep-2006 Josh Triplett <josh@joshtriplett.org>

[PATCH] Add mixed source and assembly listings (*.lst) to .gitignore

The kernel build system supports making mixed source and assembly listings
(*.lst) from C source files. Add these files to .gitignore.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 0f71a373 16-Sep-2006 Josh Triplett <josh@joshtriplett.org>

[PATCH] Add preprocessed files (*.i) to .gitignore

The kernel build system supports making preprocessed files (*.i) from C source
files. Add these files to .gitignore.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 8ccf2832 16-Jul-2006 Qi Yong <qiyong@fc-cn.com>

gitignore: gitignore quilt's files

gitignore: ignore quilt's files.

Signed-off-by: Qi Yong <qiyong@fc-cn.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>


# c181c64c 09-Jul-2006 Sam Ravnborg <sam@mars.ravnborg.org>

kbuild: .gitignore utsrelease.h

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>


# d92bf25f 21-Mar-2006 Uwe Zeisberger <Uwe_Zeisberger@digi.com>

add "tags" to .gitignore

Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>


# 1d519605 26-Feb-2006 Mauro Carvalho Chehab <mchehab@kernel.org>

V4L/DVB (3300b): .gitignore should also ignore StGit generated dirs

StGit genreates patches-* when you run stg export command.
It makes no sense to show such directories as changes on git status.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>


# 20ede274 04-Jan-2006 Brian Gerst <bgerst@didntduck.org>

gitignore: ignore shared objects

Many arches make shared objects for VDSOs. Generally exclude them.

Signed-off-by: Brian Gerst <bgerst@didntduck.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>


# 42f122c8 27-Dec-2005 Brian Gerst <bgerst@didntduck.org>

gitignore: asm-offsets.h

Ignore asm-offsets.h for all arches.

Signed-off-by: Brian Gerst <bgerst@didntduck.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>


# 1e65174a 18-Oct-2005 Linus Torvalds <torvalds@g5.osdl.org>

Add some basic .gitignore files

This still leaves driver and architecture-specific subdirectories alone,
but gets rid of the bulk of the "generic" generated files that we should
ignore.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>