17 Jul, 2018

1 commit

  • commit 3f9cdee5929b7d035e86302dcf08fbf3e80b0739 upstream.

    Removed Kbuild documentation for INSTALL_FW_PATH.

    The kbuild symbol INSTALL_FW_PATH was removed from Kbuild tools in
    September 2017 (for 4.14) but the symbol was not deleted from
    the kbuild documentation, so do that now.

    Fixes: 5620a0d1aacd ("firmware: delete in-kernel firmware")
    Signed-off-by: Randy Dunlap
    Cc: stable@vger.kernel.org # 4.14+
    Cc: Greg Kroah-Hartman
    Signed-off-by: Masahiro Yamada
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     

24 Oct, 2017

1 commit

  • It does several fixes:
    1. move the displaced ld example to its reasonable place.
    2. add new example for command gzip.
    3. fix 2 number errors.
    4. fix format of chapter 7.x, make it looks the same as other chapters.

    Signed-off-by: Cao jin
    Signed-off-by: Masahiro Yamada

    Cao jin
     

08 Aug, 2017

1 commit


08 Jul, 2017

2 commits

  • …/masahiroy/linux-kbuild

    Pull Kbuild thin archives updates from Masahiro Yamada:
    "Thin archives migration by Nicholas Piggin.

    THIN_ARCHIVES has been available for a while as an optional feature
    only for PowerPC architecture, but we do not need two different
    intermediate-artifact schemes.

    Using thin archives instead of conventional incremental linking has
    various advantages:

    - save disk space for builds

    - speed-up building a little

    - fix some link issues (for example, allyesconfig on ARM) due to more
    flexibility for the final linking

    - work better with dead code elimination we are planning

    As discussed before, this migration has been done unconditionally so
    that any problems caused by this will show up with "git bisect".

    With testing with 0-day and linux-next, some architectures actually
    showed up problems, but they were trivial and all fixed now"

    * tag 'kbuild-thinar-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    tile: remove unneeded extra-y in Makefile
    kbuild: thin archives make default for all archs
    x86/um: thin archives build fix
    tile: thin archives fix linking
    ia64: thin archives fix linking
    sh: thin archives fix linking
    kbuild: handle libs-y archives separately from built-in.o archives
    kbuild: thin archives use P option to ar
    kbuild: thin archives final link close --whole-archives option
    ia64: remove unneeded extra-y in Makefile.gate
    tile: fix dependency and .*.cmd inclusion for incremental build
    sparc64: Use indirect calls in hamming weight stubs

    Linus Torvalds
     
  • Pull Kbuild updates from Masahiro Yamada:

    - Clean up Makefiles and scripts

    - Improve clang support

    - Remove unneeded genhdr-y syntax

    - Remove unneeded cc-option-align macro

    - Introduce __cc-option macro and use it to fix x86 boot code compiler
    flags

    * tag 'kbuild-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kbuild: improve comments on KBUILD_SRC
    x86/build: Specify stack alignment for clang
    x86/build: Use __cc-option for boot code compiler options
    kbuild: Add __cc-option macro
    kbuild: remove cc-option-align
    kbuild: replace genhdr-y with generated-y
    kbuild: clang: Disable 'address-of-packed-member' warning
    kbuild: remove duplicated arch/*/include/generated/uapi include path
    kbuild: speed up checksyscalls.sh
    kbuild: simplify silent build (-s) detection

    Linus Torvalds
     

30 Jun, 2017

1 commit

  • The thin archives build currently puts all lib.a and built-in.o
    files together and links them with --whole-archive.

    This works because thin archives can recursively refer to thin
    archives. However some architectures include libgcc.a, which may
    not be a thin archive, or it may not be constructed with the "P"
    option, in which case its contents do not get linked correctly.

    So don't pull .a libs into the root built-in.o archive. These
    libs should already have symbol tables and indexes built, so they
    can be direct linker inputs. Move them out of the --whole-archive
    option, which restore the conditional linking behaviour of lib.a
    to thin archives builds.

    Signed-off-by: Nicholas Piggin
    Signed-off-by: Masahiro Yamada

    Nicholas Piggin
     

25 Jun, 2017

1 commit

  • 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.

    Fix the only user arch/x86/Makefile_32.cpu and remove cc-option-align.

    Signed-off-by: Masahiro Yamada
    Acked-by: Ingo Molnar

    Masahiro Yamada
     

22 Jun, 2017

1 commit

  • Originally, generated-y and genhdr-y had different meaning, like
    follows:

    - generated-y: generated headers (other than asm-generic wrappers)
    - header-y : headers to be exported
    - genhdr-y : generated headers to be exported (generated-y + header-y)

    Since commit fcc8487d477a ("uapi: export all headers under uapi
    directories"), headers under UAPI directories are all exported.
    So, there is no more difference between generated-y and genhdr-y.

    We see two users of genhdr-y, arch/{arm,x86}/include/uapi/asm/Kbuild.
    They generate some headers in arch/{arm,x86}/include/generated/uapi/asm
    directories, which are obviously exported.

    Replace them with generated-y, and abolish genhdr-y.

    Signed-off-by: Masahiro Yamada
    Acked-by: Nicolas Dichtel

    Masahiro Yamada
     

19 May, 2017

1 commit


10 May, 2017

3 commits

  • This patch removes the need of subdir-y. Now all files/directories under
    arch//include/uapi/ are exported.

    The only change for userland is the layout of the command 'make
    headers_install_all': directories asm- are replaced by arch-/.
    Those new directories contains all files/directories of the specified arch.

    Note that only cris and tile have more directories than only asm:
    - arch-v[10|32] for cris;
    - arch for tile.

    Signed-off-by: Nicolas Dichtel
    Signed-off-by: Masahiro Yamada

    Nicolas Dichtel
     
  • Regularly, when a new header is created in include/uapi/, the developer
    forgets to add it in the corresponding Kbuild file. This error is usually
    detected after the release is out.

    In fact, all headers under uapi directories should be exported, thus it's
    useless to have an exhaustive list.

    After this patch, the following files, which were not exported, are now
    exported (with make headers_install_all):
    asm-arc/kvm_para.h
    asm-arc/ucontext.h
    asm-blackfin/shmparam.h
    asm-blackfin/ucontext.h
    asm-c6x/shmparam.h
    asm-c6x/ucontext.h
    asm-cris/kvm_para.h
    asm-h8300/shmparam.h
    asm-h8300/ucontext.h
    asm-hexagon/shmparam.h
    asm-m32r/kvm_para.h
    asm-m68k/kvm_para.h
    asm-m68k/shmparam.h
    asm-metag/kvm_para.h
    asm-metag/shmparam.h
    asm-metag/ucontext.h
    asm-mips/hwcap.h
    asm-mips/reg.h
    asm-mips/ucontext.h
    asm-nios2/kvm_para.h
    asm-nios2/ucontext.h
    asm-openrisc/shmparam.h
    asm-parisc/kvm_para.h
    asm-powerpc/perf_regs.h
    asm-sh/kvm_para.h
    asm-sh/ucontext.h
    asm-tile/shmparam.h
    asm-unicore32/shmparam.h
    asm-unicore32/ucontext.h
    asm-x86/hwcap2.h
    asm-xtensa/kvm_para.h
    drm/armada_drm.h
    drm/etnaviv_drm.h
    drm/vgem_drm.h
    linux/aspeed-lpc-ctrl.h
    linux/auto_dev-ioctl.h
    linux/bcache.h
    linux/btrfs_tree.h
    linux/can/vxcan.h
    linux/cifs/cifs_mount.h
    linux/coresight-stm.h
    linux/cryptouser.h
    linux/fsmap.h
    linux/genwqe/genwqe_card.h
    linux/hash_info.h
    linux/kcm.h
    linux/kcov.h
    linux/kfd_ioctl.h
    linux/lightnvm.h
    linux/module.h
    linux/nbd-netlink.h
    linux/nilfs2_api.h
    linux/nilfs2_ondisk.h
    linux/nsfs.h
    linux/pr.h
    linux/qrtr.h
    linux/rpmsg.h
    linux/sched/types.h
    linux/sed-opal.h
    linux/smc.h
    linux/smc_diag.h
    linux/stm.h
    linux/switchtec_ioctl.h
    linux/vfio_ccw.h
    linux/wil6210_uapi.h
    rdma/bnxt_re-abi.h

    Note that I have removed from this list the files which are generated in every
    exported directories (like .install or .install.cmd).

    Thanks to Julien Floret for the tip to get all
    subdirs with a pure makefile command.

    For the record, note that exported files for asm directories are a mix of
    files listed by:
    - include/uapi/asm-generic/Kbuild.asm;
    - arch//include/uapi/asm/Kbuild;
    - arch//include/asm/Kbuild.

    Signed-off-by: Nicolas Dichtel
    Acked-by: Daniel Vetter
    Acked-by: Russell King
    Acked-by: Mark Salter
    Acked-by: Michael Ellerman (powerpc)
    Signed-off-by: Masahiro Yamada

    Nicolas Dichtel
     
  • This option was added in commit c7bb349e7c25 ("kbuild: introduce destination-y
    for exported headers") but never used in-tree.

    Signed-off-by: Nicolas Dichtel
    Acked-by: Paul Bolle
    Signed-off-by: Masahiro Yamada

    Nicolas Dichtel
     

16 Nov, 2016

1 commit

  • The "imply" keyword is a weak version of "select" where the target
    config symbol can still be turned off, avoiding those pitfalls that come
    with the "select" keyword.

    This is useful e.g. with multiple drivers that want to indicate their
    ability to hook into a secondary subsystem while allowing the user to
    configure that subsystem out without also having to unset these drivers.

    Currently, the same effect can almost be achieved with:

    config DRIVER_A
    tristate

    config DRIVER_B
    tristate

    config DRIVER_C
    tristate

    config DRIVER_D
    tristate

    [...]

    config SUBSYSTEM_X
    tristate
    default DRIVER_A || DRIVER_B || DRIVER_C || DRIVER_D || [...]

    This is unwieldy to maintain especially with a large number of drivers.
    Furthermore, there is no easy way to restrict the choice for SUBSYSTEM_X
    to y or n, excluding m, when some drivers are built-in. The "select"
    keyword allows for excluding m, but it excludes n as well. Hence
    this "imply" keyword. The above becomes:

    config DRIVER_A
    tristate
    imply SUBSYSTEM_X

    config DRIVER_B
    tristate
    imply SUBSYSTEM_X

    [...]

    config SUBSYSTEM_X
    tristate

    This is much cleaner, and way more flexible than "select". SUBSYSTEM_X
    can still be configured out, and it can be set as a module when none of
    the drivers are configured in or all of them are modular.

    Signed-off-by: Nicolas Pitre
    Acked-by: Richard Cochran
    Acked-by: Thomas Gleixner
    Acked-by: John Stultz
    Reviewed-by: Josh Triplett
    Cc: Paul Bolle
    Cc: linux-kbuild@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Cc: Michal Marek
    Cc: Edward Cree
    Link: http://lkml.kernel.org/r/1478841010-28605-2-git-send-email-nicolas.pitre@linaro.org
    Signed-off-by: Thomas Gleixner

    Nicolas Pitre
     

15 Oct, 2016

1 commit

  • Pull kbuild updates from Michal Marek:

    - EXPORT_SYMBOL for asm source by Al Viro.

    This does bring a regression, because genksyms no longer generates
    checksums for these symbols (CONFIG_MODVERSIONS). Nick Piggin is
    working on a patch to fix this.

    Plus, we are talking about functions like strcpy(), which rarely
    change prototypes.

    - Fixes for PPC fallout of the above by Stephen Rothwell and Nick
    Piggin

    - fixdep speedup by Alexey Dobriyan.

    - preparatory work by Nick Piggin to allow architectures to build with
    -ffunction-sections, -fdata-sections and --gc-sections

    - CONFIG_THIN_ARCHIVES support by Stephen Rothwell

    - fix for filenames with colons in the initramfs source by me.

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: (22 commits)
    initramfs: Escape colons in depfile
    ppc: there is no clear_pages to export
    powerpc/64: whitelist unresolved modversions CRCs
    kbuild: -ffunction-sections fix for archs with conflicting sections
    kbuild: add arch specific post-link Makefile
    kbuild: allow archs to select link dead code/data elimination
    kbuild: allow architectures to use thin archives instead of ld -r
    kbuild: Regenerate genksyms lexer
    kbuild: genksyms fix for typeof handling
    fixdep: faster CONFIG_ search
    ia64: move exports to definitions
    sparc32: debride memcpy.S a bit
    [sparc] unify 32bit and 64bit string.h
    sparc: move exports to definitions
    ppc: move exports to definitions
    arm: move exports to definitions
    s390: move exports to definitions
    m68k: move exports to definitions
    alpha: move exports to actual definitions
    x86: move exports to actual definitions
    ...

    Linus Torvalds
     

09 Sep, 2016

1 commit

  • Allow architectures to create arch/xxx/Makefile.postlink with targets
    for vmlinux, modules.ko, and clean, which will be invoked after final
    linking of vmlinux and modules.

    powerpc will use this to check vmlinux linker relocations for sanity,
    and may use it to fix up alternate instruction patch branch addresses.

    Signed-off-by: Nicholas Piggin
    Signed-off-by: Michal Marek

    Nicholas Piggin
     

19 Aug, 2016

1 commit

  • Improper menuconfig usage leads to empty menu entries.
    zconfdump() is able to reveal some real-life examples:
    - menuconfig VFIO_NOIOMMU
    - menuconfig RESET_CONTROLLER
    - menuconfig SND_ARM

    To avoid future occurrences of those, improve the menuconfig syntax
    description.

    Signed-off-by: Eugeniu Rosca
    Signed-off-by: Jonathan Corbet

    Eugeniu Rosca
     

07 Jul, 2016

1 commit

  • Track generated header files which aren't already in genhdr-y, alongside
    generic-y wrappers in the */include/generated/[uapi/]asm/ directories.
    Currently only x86 generates extra headers in these directories, for the
    purposes of enumerating system calls for different ABIs, and xen
    hypercalls.

    This will allow the asm-generic wrapper handling code to remove stale
    wrappers when files are removed from generic-y, without also removing
    these headers which are generated separately.

    Reported-by: kbuild test robot
    Signed-off-by: James Hogan
    Acked-by: Arnd Bergmann
    Cc: Jonathan Corbet
    Cc: linux-kbuild@vger.kernel.org
    Cc: linux-doc@vger.kernel.org
    Cc: Michal Marek
    Link: http://lkml.kernel.org/r/1466808144-23209-2-git-send-email-james.hogan@imgtec.com
    Signed-off-by: Thomas Gleixner

    James Hogan
     

10 May, 2016

2 commits


08 Oct, 2015

1 commit

  • Recursive dependency issues with kconfig are unavoidable due to
    some limitations with kconfig, since these issues are recurring
    provide a hint to the user how they can resolve these dependency
    issues and also document why such limitation exists.

    While at it also document a bit of future prospects of ways to
    enhance Kconfig, including providing formal semantics and evaluation
    of use of a SAT solver. If you're interested in this work or prospects
    of it check out the kconfig-sat project wiki [0] and mailing list [1].

    [0] http://kernelnewbies.org/KernelProjects/kconfig-sat
    [1] https://groups.google.com/d/forum/kconfig-sat

    Cc: Geert Uytterhoeven
    Cc: James Bottomley
    Cc: Josh Triplett
    Cc: Paul Bolle
    Cc: Herbert Xu
    Cc: Takashi Iwai
    Cc: "Yann E. MORIN"
    Cc: Jonathan Corbet
    Cc: Mate Soos
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Michal Marek

    Luis R. Rodriguez
     

07 Aug, 2015

1 commit

  • We don't want this in the Kconfig since it might then get exposed in
    /proc/config.gz. So make it a parameter to Kbuild instead. This also
    means we don't have to jump through hoops to strip quotes from it, as
    we would if it was a config option.

    Signed-off-by: David Woodhouse
    Signed-off-by: David Howells
    Reviewed-by: Mimi Zohar

    David Woodhouse
     

06 Jul, 2015

1 commit

  • Since commit a1c48bb1 (Makefile: Fix unrecognized cross-compiler command
    line options), the arch Makefile is included earlier by the main
    Makefile, preventing the arc architecture to set its -O3 compiler
    option. Since there might be more use cases for an arch Makefile to
    fine-tune the options, add support for ARCH_CPPFLAGS, ARCH_AFLAGS and
    ARCH_CFLAGS variables that are appended to the respective kbuild
    variables. The user still has the final say via the KCPPFLAGS, KAFLAGS
    and KCFLAGS variables.

    Reported-by: Vineet Gupta
    Cc: stable@vger.kernel.org # 3.16+
    Signed-off-by: Michal Marek

    Michal Marek
     

22 Jun, 2015

1 commit

  • The header install makefile creates an 'include' directory inside
    INSTALL_HDR_PATH and appending include to the path results in headers
    being installed to include/include.

    Don't recommend appending include to the path as makefile already does
    this.

    Signed-off-by: Anish Bhatt
    Signed-off-by: Jonathan Corbet

    Anish Bhatt
     

09 Jun, 2015

1 commit


20 Feb, 2015

1 commit

  • Pull misc kbuild changes from Michal Marek:
    "Just a few non-critical kbuild changes:

    - builddeb adds the actual distribution name in the changelog
    - documentation fixes"

    * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kbuild: trivial - fix the help doc of CONFIG_CC_OPTIMIZE_FOR_SIZE
    kbuild: Update documentation of clean-files and clean-dirs
    builddeb: Try to determine distribution
    builddeb: Update year and git repository URL in debian/copyright

    Linus Torvalds
     

10 Jan, 2015

2 commits


08 Jan, 2015

1 commit


19 Aug, 2014

4 commits


15 Aug, 2014

2 commits

  • Pull misc kbuild updates from Michal Marek:
    "This is the non-critical part of kbuild for 3.17-rc1:

    - make help hint to use make -s with make kernelrelease et al.
    - moved a kbuild document to Documentation/kbuild where it belongs
    - four new Coccinelle scripts, one dropped and one fixed
    - new make kselftest target to run various tests on the kernel"

    * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kbuild: kselftest - new make target to build and run kernel selftests
    Coccinelle: Script to replace if and BUG with BUG_ON
    Coccinelle: Script to detect incorrect argument to sizeof
    Coccinelle: Script to use ARRAY_SIZE instead of division of two sizeofs
    Coccinelle: Script to detect cast after memory allocation
    coccinelle/null: solve parse error
    Documentation: headers_install.txt is part of kbuild
    kbuild: make -s should be used with kernelrelease/kernelversion/image_name

    Linus Torvalds
     
  • Pull kbuild updates from Michal Marek:
    - make clean also considers $(extra-m) and $(extra-) to be consistent
    - cleanup and fixes in scripts/Makefile.host
    - allow to override the name of the Python 2 executable with make
    PYTHON=... (only needed for ia64 in practice)
    - option to split debugingo into *.dwo files to save disk space if the
    compiler supports it (CONFIG_DEBUG_INFO_SPLIT)
    - option to use dwarf4 debuginfo if the compiler supports it
    (CONFIG_DEBUG_INFO_DWARF4)
    - fix for disabling certain warnings with clang
    - fix for unneeded rebuild with dash when a command contains
    backslashes

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kbuild: Fix handling of backslashes in *.cmd files
    kbuild, LLVMLinux: Supress warnings unless W=1-3
    Kbuild: Add a option to enable dwarf4 v2
    kbuild: Support split debug info v4
    kbuild: allow to override Python command name
    kbuild: clean-up and bug fix of scripts/Makefile.host
    kbuild: clean up scripts/Makefile.host
    kbuild: drop shared library support from Makefile.host
    kbuild: fix a bug of C++ host program handling
    kbuild: fix a typo in scripts/Makefile.host
    scripts/Makefile.clean: clean also $(extra-m) and $(extra-)

    Linus Torvalds
     

05 Aug, 2014

1 commit

  • 'headers_install.txt' from Documentation/make/ is related to Kbuild
    so it must be moved in Documentation/kbuild/ directory.

    As Documentation/make/ directory has only one file, it will be removed
    as a consequence of moving 'headers_install.txt'.

    Cc: Kirill A. Shutemov
    Cc: David Woodhouse
    Cc: Rob Landley
    Signed-off-by: Yann Droneaud
    Acked-by: Sam Ravnborg
    Signed-off-by: Michal Marek

    Yann Droneaud
     

16 Jul, 2014

1 commit

  • The shared library feature in Makefile.host is no longer used.
    Rip it off to keep the build infrastucture simple.

    Update Documentation/kbuild/makefiles.txt too.
    The section "4.3 Definition shared libraries" should be removed
    and the following sections should be re-numbered.

    Signed-off-by: Masahiro Yamada
    Suggested-by: Sam Ravnborg
    Signed-off-by: Michal Marek

    Masahiro Yamada
     

19 Jun, 2014

1 commit


10 Jun, 2014

1 commit


08 Apr, 2014

1 commit

  • "make allnoconfig" exists to ease testing of minimal configurations.
    Documentation/SubmitChecklist includes a note to test with allnoconfig.
    This helps catch missing dependencies on common-but-not-required
    functionality, which might otherwise go unnoticed.

    However, allnoconfig still leaves many symbols enabled, because they're
    hidden behind CONFIG_EMBEDDED or CONFIG_EXPERT. For instance, allnoconfig
    still has CONFIG_PRINTK and CONFIG_BLOCK enabled, so drivers don't
    typically get build-tested with those disabled.

    To address this, introduce a new Kconfig option "allnoconfig_y", used on
    symbols which only exist to hide other symbols. Set it on CONFIG_EMBEDDED
    (which then selects CONFIG_EXPERT). allnoconfig will then disable all the
    symbols hidden behind those.

    Signed-off-by: Josh Triplett
    Tested-by: Paul E. McKenney
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     

09 Oct, 2013

1 commit