07 Jun, 2011

1 commit


25 May, 2011

1 commit


31 Mar, 2011

1 commit


03 Aug, 2010

2 commits

  • Signed-off-by: Uwe Kleine-König
    Signed-off-by: Michal Marek

    Uwe Kleine-König
     
  • It is now possible to assign options to AS, CC and LD
    on the command line - which is only used when building modules.

    {A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
    in the arch makefiles, thus users had no way to specify
    additional options to AS, CC, LD when building modules
    without overriding the original value.

    Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
    that is used by arch specific files and free up
    {A,C,LD}FLAGS_MODULE so they can be assigned on
    the command line.

    All arch Makefiles that used the old variables has been updated.

    Note: Previously we had a MODFLAGS variable for both
    AS and CC. But in favour of consistency this was dropped.
    So in some cases arch Makefile has one assignmnet replaced by
    two assignmnets.

    Note2: MODFLAGS was not documented and is dropped
    without any notice. I do not expect much/any breakage
    from this.

    Signed-off-by: Sam Ravnborg
    Cc: Denys Vlasenko
    Cc: Haavard Skinnemoen
    Cc: Mike Frysinger
    Cc: Tony Luck
    Cc: Geert Uytterhoeven
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: Chen Liqin
    Acked-by: Mike Frysinger [blackfin]
    Acked-by: Haavard Skinnemoen [avr32]
    Signed-off-by: Michal Marek

    Sam Ravnborg
     

19 Sep, 2009

1 commit

  • Now that the last users of markers have migrated to the event
    tracer we can kill off the (now orphan) support code.

    Signed-off-by: Christoph Hellwig
    Acked-by: Mathieu Desnoyers
    Cc: Steven Rostedt
    Cc: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Christoph Hellwig
     

30 Oct, 2008

1 commit

  • Taken from http://bugzilla.kernel.org/show_bug.cgi?id=11567

    If you even define KBUILD_EXTRA_SYMBOLS in Makefile it will not be expanded
    into command line argument for modpost.

    Signed-off-by: Andrew Morton
    Signed-off-by: Sam Ravnborg

    Peter Volkov
     

23 Jul, 2008

1 commit

  • When a kernel was rebuilt, the previous Module.markers was not cleared.
    It caused markers with different format strings to appear as duplicates
    when a markers was changed. This problem is present since
    scripts/mod/modpost.c started to generate Module.markers, commit
    b2e3e658b344c6bcfb8fb694100ab2f2b5b2edb0

    It therefore applies to 2.6.25, 2.6.26 and linux-next.

    I merely merged the patches from Roland, Wenji and Takashi here.

    Credits to
    Roland McGrath
    Wenji Huang
    and
    Takashi Nishiie

    for providing the individual fixes.

    - Changelog :
    - Integrated Takashi's Makefile modification to clear Module.markers upon
    make clean.

    Signed-off-by: Mathieu Desnoyers
    Cc: Roland McGrath
    Cc: Wenji Huang
    Cc: Takashi Nishiie
    Cc: [2.6.25.x, 2.6.26.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mathieu Desnoyers
     

01 Jun, 2008

1 commit

  • When we introduced support for KBUILD_EXTRA_SYMBOLS
    we started to include the externam module's kbuild
    file when doing the final modpost step.

    As external modules often do:
    ccflags-y := -I$(src)

    We had problems because $(src) was unassinged and
    gcc then used the next parameter for -I resulting in
    strange build failures.

    Fix is to assign $(src) and $(obj) when building
    external modules.

    This fixes: http://bugzilla.kernel.org/show_bug.cgi?id=10798

    Signed-off-by: Sam Ravnborg
    Cc: Tvrtko
    Cc: Andrea Arcangeli
    Cc: "Rafael J. Wysocki"

    Sam Ravnborg
     

27 Apr, 2008

1 commit


26 Apr, 2008

1 commit

  • This patch adds a new (Kbuild) Makefile variable KBUILD_EXTRA_SYMBOLS.
    The space separated list of file names assigned to KBUILD_EXTRA_SYMBOLS
    is used when calling scripts/mod/modpost during stage 2 of the Kbuild
    process for non-kernel-tree modules.

    Signed-off-by: Richard Hacker
    Signed-off-by: Sam Ravnborg

    Richard Hacker
     

24 Mar, 2008

1 commit

  • The module alias support in the kernel have a consistency
    check where it is checked that the size of a structure
    in the kernel and on the build host are the same.
    For cross builds this check does not make sense so detect
    when we do cross builds and silently skip the check in these
    situations.
    This fixes a build bug for a wireless driver when cross building
    for arm.

    Acked-by: Michael Buesch
    Tested-by: Gordon Farquharson
    Signed-off-by: Sam Ravnborg
    Cc: stable@kernel.org

    Sam Ravnborg
     

14 Feb, 2008

1 commit

  • This adds some new magic in the MODPOST phase for CONFIG_MARKERS. Analogous
    to the Module.symvers file, the build will now write a Module.markers file
    when CONFIG_MARKERS=y is set. This file lists the name, defining module, and
    format string of each marker, separated by \t characters. This simple text
    file can be used by offline build procedures for instrumentation code,
    analogous to how System.map and Module.symvers can be useful to have for
    kernels other than the one you are running right now.

    The strings are made easy to extract by having the __trace_mark macro define
    the name and format together in a single array called __mstrtab_* in the
    __markers_strings section. This is straightforward and reliable as long as
    the marker structs are always defined by this macro. It is an unreasonable
    amount of hairy work to extract the string pointers from the __markers section
    structs, which entails handling a relocation type for every machine under the
    sun.

    Mathieu :
    - Ran through checkpatch.pl

    Signed-off-by: Roland McGrath
    Signed-off-by: Mathieu Desnoyers
    Cc: David Smith
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mathieu Desnoyers
     

29 Jan, 2008

1 commit

  • If the config option CONFIG_SECTION_MISMATCH is not set and
    we see a Section mismatch present the following to the user:

    modpost: Found 1 section mismatch(es).
    To see additional details select "Enable full Section mismatch analysis"
    in the Kernel Hacking menu (CONFIG_SECTION_MISMATCH).

    If the option CONFIG_SECTION_MISMATCH is selected
    then be verbose in the Section mismatch reporting from mdopost.
    Sample outputs:

    WARNING: o-x86_64/vmlinux.o(.text+0x7396): Section mismatch in reference from the function discover_ebda() to the variable .init.data:ebda_addr
    The function discover_ebda() references
    the variable __initdata ebda_addr.
    This is often because discover_ebda lacks a __initdata
    annotation or the annotation of ebda_addr is wrong.

    WARNING: o-x86_64/vmlinux.o(.data+0x74d58): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
    The variable pci_serial_quirks references
    the function __devexit pci_plx9050_exit()
    If the reference is valid then annotate the
    variable with __exit* (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

    WARNING: o-x86_64/vmlinux.o(__ksymtab+0x630): Section mismatch in reference from the variable __ksymtab_arch_register_cpu to the function .cpuinit.text:arch_register_cpu()
    The symbol arch_register_cpu is exported and annotated __cpuinit
    Fix this by removing the __cpuinit annotation of arch_register_cpu or drop the export.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

26 Jul, 2007

2 commits


17 Jul, 2007

1 commit

  • Previously we did do the check on the .o files used to link
    vmlinux but that failed to find questionable references across
    the .o files.
    Create a dedicated vmlinux.o file used only for section mismatch checks
    that uses the defualt linker script so section does not get renamed.

    The vmlinux.o may later be used as part of the the final link of vmlinux
    but for now it is used fo section mismatch only.
    For a defconfig build this is instant but for an allyesconfig this
    add two minutes to a full build (that anyways takes ~2 hours).

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

03 May, 2007

1 commit


17 Oct, 2006

1 commit

  • Some people want to do crazy things like pass multiple directories as the
    value of $(SUBDIRS) or $M. Mostly this kinda works, except that
    Makefile.modpost constructs a modpost commandline which fails modpost's
    argument parsing. This patch fixes that little wrinkle.

    Signed-off-by: Greg Banks
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Greg Banks
     

01 Oct, 2006

1 commit

  • On request from Al Viro make modpost processing configurable.

    KBUILD_MODPOST_WARN can be set to make modpost warn instead of
    error out in case on unresolved symbols in final module link.

    KBUILD_MODPOST_NOFINAL can be set to avoid the final and timeconsuming
    .c file generation and link of .ko files. This is solely useful for
    speeding up when doing compile checks with for example allmodconfig

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

25 Sep, 2006

2 commits

  • At stage 2 modpost utility is used to check modules. In case of unresolved
    symbols modpost only prints warning.

    IMHO it is a good idea to fail compilation process in case of unresolved
    symbols (at least in modules coming with kernel), since usually such errors
    are left unnoticed, but kernel modules are broken.

    - new option '-w' is added to modpost:
    if option is specified, modpost only warns about unresolved symbols

    - modpost is called with '-w' for external modules in Makefile.modpost

    Signed-off-by: Andrey Mirkin
    Signed-off-by: Kirill Korotaev
    Signed-off-by: Andrew Morton
    Signed-off-by: Sam Ravnborg

    Kirill Korotaev
     
  • Based on patch from: Magnus Damm
    This has the advantage that all section mismatch checks are run regardless
    of modules being enabled or not.

    When running modpost on vmlinux output:
    MODPOST vmlinux

    When running modpost on modules output count of modules like this:
    MODPOST 5 modules

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

01 Aug, 2006

1 commit


01 Jul, 2006

1 commit

  • kbuild used $¤(*F to get filename of target without extension.
    This was used in several places all over kbuild, but introducing
    make -rR broke his for all cases where we specified full path to
    target/prerequsite. It is assumed that make -rR disables old style
    suffix-rules which is why is suddenly failed.

    ia64 was impacted by this change because several div* routines in
    arch/ia64/lib are build using explicit paths and then kbuild failed.

    Thanks to David Mosberger-Tang for an explanation
    what was the root-cause and for testing on ia64.

    This patch also fixes two uses of $(*F) in arch/um

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

27 Jun, 2006

1 commit

  • This reverts commit e5c44fd88c146755da6941d047de4d97651404a9.

    Thanks to Daniel Ritz and Michal Piotrowski for noticing the problem.

    Daniel says:

    "[The] reason is a recent change that made modules always shows as
    module.mod. it breaks modprobe and probably many scripts..besides
    lsmod looking horrible

    stuff like this in modprobe.conf:
    install pcmcia_core /sbin/modprobe --ignore-install pcmcia_core; /sbin/modprobe pcmcia
    makes modprobe fork/exec endlessly calling itself...until oom
    interrupts it"

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

25 Jun, 2006

1 commit

  • make failed to supply the filename when using make -rR and using $(*F)
    to get target filename without extension.
    This bug was not reproduceable in small scale but using:
    $(basename $(notdir $@)) fixes it with same functionality.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

09 Jun, 2006

1 commit

  • This fixes one of the worst kbuild warts left - the broken dependencies used
    to check and regenerate the .config file. This was done via an indirect
    dependency and the .config itself had an empty command, which can cause make
    not to reread the changed .config file.

    Instead of this we generate now a new file include/config/auto.conf from
    .config, which is used for kbuild and has the proper dependencies. It's also
    the main make target now for all files generated during this step (and thus
    replaces include/linux/autoconf.h).

    This also means we can now relax the syntax requirements for the .config file
    and we don't have to rewrite it all the time, i.e. silentoldconfig only
    writes .config now when it's necessary to keep it in sync with the Kconfig
    files and even this can be suppressed by setting the environment variable
    KCONFIG_NOSILENTUPDATE, so the update can (and must) be done manually.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Sam Ravnborg

    Roman Zippel
     

26 Mar, 2006

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild: (46 commits)
    kbuild: remove obsoleted scripts/reference_* files
    kbuild: fix make help & make *pkg
    kconfig: fix time ordering of writes to .kconfig.d and include/linux/autoconf.h
    Kconfig: remove the CONFIG_CC_ALIGN_* options
    kbuild: add -fverbose-asm to i386 Makefile
    kbuild: clean-up genksyms
    kbuild: Lindent genksyms.c
    kbuild: fix genksyms build error
    kbuild: in makefile.txt note that Makefile is preferred name for kbuild files
    kbuild: replace PHONY with FORCE
    kbuild: Fix bug in crc symbol generating of kernel and modules
    kbuild: change kbuild to not rely on incorrect GNU make behavior
    kbuild: when warning symbols exported twice now tell user this is the problem
    kbuild: fix make dir/file.xx when asm symlink is missing
    kbuild: in the section mismatch check try harder to find symbols
    kbuild: fix section mismatch check for unwind on IA64
    kbuild: kill false positives from section mismatch warnings for powerpc
    kbuild: kill trailing whitespace in modpost & friends
    kbuild: small update of allnoconfig description
    kbuild: make namespace.pl CROSS_COMPILE happy
    ...

    Trivial conflict in arch/ppc/boot/Makefile manually fixed up

    Linus Torvalds
     

25 Mar, 2006

1 commit


06 Mar, 2006

1 commit

  • The kbuild system takes advantage of an incorrect behavior in GNU make.
    Once this behavior is fixed, all files in the kernel rebuild every time,
    even if nothing has changed. This patch ensures kbuild works with both
    the incorrect and correct behaviors of GNU make.

    For more details on the incorrect behavior, see:

    http://lists.gnu.org/archive/html/bug-make/2006-03/msg00003.html

    Changes in this patch:
    - Keep all targets that are to be marked .PHONY in a variable, PHONY.
    - Add .PHONY: $(PHONY) to mark them properly.
    - Remove any $(PHONY) files from the $? list when determining whether
    targets are up-to-date or not.

    Signed-off-by: Paul Smith
    Signed-off-by: Sam Ravnborg

    Paul Smith
     

19 Feb, 2006

1 commit

  • With following patch a second option is enabled to obtain
    symbol information from a second external module when a
    external module is build.
    The recommended approach is to use a common kbuild file but
    that may be impractical in certain cases.
    With this patch one can copy over a Module.symvers from one
    external module to make symbols (and symbol versions) available
    for another external module.

    Updated documentation in Documentation/kbuild/modules.txt

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

10 Jan, 2006

1 commit


26 Jul, 2005

1 commit

  • Kbuild.include is a placeholder for definitions originally present in
    both the top-level Makefile and scripts/Makefile.build.
    There were a slight difference in the filechk definition, so the most videly
    used version was kept and usr/Makefile was adopted for this syntax.

    Signed-off-by: Sam Ravnborg
    ---

    Sam Ravnborg
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds