30 Oct, 2011

1 commit


24 Jun, 2011

1 commit

  • Specify --git-dir when building perf targets to allow out-of-tree
    builds using O=.

    The shell command in `git archive' had to be modified to allow proper
    file name expansion of the files listed in MANIFEST.

    Signed-off-by: matt mooney
    Signed-off-by: Michal Marek

    matt mooney
     

24 May, 2011

1 commit


05 May, 2011

1 commit


09 Mar, 2011

1 commit


02 Aug, 2010

1 commit


21 Jul, 2010

1 commit

  • make rpm was broken by commit 0915512:
    make clean
    set -e; cd ..; ln -sf /usr/src/iwlwifi-2.6 kernel-2.6.35rc4wl
    /bin/sh /usr/src/iwlwifi-2.6/scripts/setlocalversion --scm-only >
    /usr/src/iwlwifi-2.6/.scmversion
    cat: .scmversion: input file is output file
    make[1]: *** [rpm] Error 1

    Reported-and-tested-by: "Zheng, Jiajia"
    Signed-off-by: Michal Marek

    Michal Marek
     

05 Jul, 2010

1 commit


18 Jun, 2010

1 commit

  • Now that we run scripts/setlocalversion during every build, it makes
    sense to move all the localversion logic there. This cleans up the
    toplevel Makefile and also makes sure that the script is called only
    once in 'make prepare' (previously, it would be called every time due to
    a variable expansion in an ifneq statement). No user-visible change is
    intended, unless one runs the setlocalversion script directly.

    Reported-by: Dmitry Torokhov
    Cc: David Rientjes
    Cc: Greg Thelen
    Cc: Nico Schottelius
    Signed-off-by: Michal Marek

    Michal Marek
     

05 Jun, 2010

1 commit

  • Useful for when people want to try some version of the perf tools and don't
    wants to download the kernel tarball.

    Here is a session using this new target:

    [root@emilia linux-2.6-tip]# make help | grep -i perf
    perf-tar-src-pkg - Build perf-2.6.35-rc1.tar source tarball
    perf-targz-src-pkg - Build perf-2.6.35-rc1.tar.gz source tarball
    perf-tarbz2-src-pkg - Build perf-2.6.35-rc1.tar.bz2 source tarball
    [root@emilia linux-2.6-tip]# make perf-tarbz2-src-pkg
    TAR
    [root@emilia linux-2.6-tip]# ls -la perf-2.6.35-rc1.tar.bz2
    -rw-r--r-- 1 root root 295731 May 31 11:18 perf-2.6.35-rc1.tar.bz2
    [root@emilia linux-2.6-tip]# tar xf perf-2.6.35-rc1.tar.bz2
    [root@emilia linux-2.6-tip]# cd perf-2.6.35-rc1
    [root@emilia perf-2.6.35-rc1]# ls
    arch HEAD include lib tools
    [root@emilia perf-2.6.35-rc1]# cd tools/perf
    [root@emilia perf]# make -j9 2>&1 | tail
    CC arch/x86/util/dwarf-regs.o
    CC util/probe-finder.o
    CC util/newt.o
    CC util/scripting-engines/trace-event-perl.o
    CC scripts/perl/Perf-Trace-Util/Context.o
    CC perf.o
    CC builtin-help.o
    AR libperf.a
    LINK perf
    rm .perf.dev.null
    [root@emilia perf]# ./perf record -a sleep 1
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 0.262 MB perf.data (~11457 samples) ]
    [root@emilia perf]# ./perf report | head -12
    # Events: 6K cycles
    #
    # Overhead Command Shared Object Symbol
    # ........ ............... .................. ......
    #
    4.73% perf [kernel.kallsyms] [k] format_decode
    4.49% perf libc-2.12.so [.] _IO_file_underflow_internal
    4.38% init [kernel.kallsyms] [k] mwait_idle
    3.29% perf [kernel.kallsyms] [k] vsnprintf
    2.38% init [kernel.kallsyms] [k] sched_clock_local
    2.35% init [kernel.kallsyms] [k] apic_timer_interrupt
    1.86% sirq-timer/5 [kernel.kallsyms] [k] find_busiest_group
    [root@emilia perf]#

    Acked-by: Michal Marek
    Acked-by: Sam Ravnborg
    Cc: David S. Miller
    Cc: Frédéric Weisbecker
    Cc: Ingo Molnar
    Cc: Michal Marek
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Sam Ravnborg
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

12 Dec, 2009

2 commits

  • Running "make deb-pkg" requires setting KBUILD_PKG_ROOTCMD or
    becoming root oneself or it errors out. Unless already running
    as root or KBUILD_PKG_ROOTCMD is already set, use fakeroot as a
    good default.

    With this patch applied, you can run "make oldconfig deb-pkg" as
    an ordinary user to build a binary package for an updated kernel
    tree and it should just work.

    fakeroot is too zealous by default in treating files as owned by
    root. Its wrapped stat() sets st_uid and st_gid to 0 for all
    files, which causes Git to go on a wild goose chase if
    CONFIG_LOCALVERSION_AUTO is set, checking if any file's content
    has changed along with its stat information. Avoid this by
    telling fakeroot to use the actual owner and group for
    preexisting files, by passing it the -u option.

    Signed-off-by: Jonathan Nieder
    Signed-off-by: Michal Marek

    Jonathan Nieder
     
  • Let the deb-pkg target acquire (fake) root privileges before
    running commands that need them. Without such privileges,
    deb-pkg errors out because chown fails.

    The new KBUILD_PKG_ROOTCMD variable, if defined, is used as a
    command to run other commands with possibly fake elevated
    privileges. Since this is not needed for the tar-pkg and rpm-pkg
    targets, it is only used by deb-pkg. If it is not defined, the
    behavior is as before, and the user will have to rerun make as
    root.

    In other words, as a shortcut, instead of running 'make oldconfig &&
    make && fakeroot -u make deb-pkg', one can use the single command
    'make oldconfig deb-pkg KBUILD_PKG_ROOTCMD="fakeroot -u"'.

    Suggested-by: Ryan Anderson
    Signed-off-by: Jonathan Nieder
    Signed-off-by: Michal Marek

    Jonathan Nieder
     

12 Oct, 2009

1 commit

  • The binrpm-pkg target (binary RPM only) fails when called with
    KBUILD_OUTPUT set. This patch makes it work.

    For the rpm-pkg target (source + binary RPM), building with
    KBUILD_OUTPUT set is not possible and also not needed as the
    actual build is done in a temporary directory anyway, so check
    that KBUILD_OUTPUT is not set in that case to avoid later errors.

    Signed-off-by: Frans Pop
    Signed-off-by: Sam Ravnborg

    Frans Pop
     

07 Mar, 2009

1 commit

  • Running 'make rpm' fails when CONFIG_LOCALVERSION_AUTO=y and using a kernel source
    tree under SCM. This is due to KERNELRELEASE being different when the initial make
    is run and when make is run from rpmbuild.

    mkspec creates kernel.spec using KERNELRELEASE:

    echo "%files"
    echo '%defattr (-, root, root)'
    echo "%dir /lib/modules"
    echo "/lib/modules/$KERNELRELEASE"
    echo "/lib/firmware"
    echo "/boot/*"
    echo ""

    When CONFIG_LOCALVERSION_AUTO=y scripts/setlocalversion is called and grabs any
    additional version info from SCM. Next, the srctree is tarred up and SCM
    information is excluded.

    rpmbuild reruns make and in the process generates a new include/config/kernel.release
    and thus a new KERNELRELEASE. However this time the SCM information is gone so
    KERNELRELEASE no longer has the additional version information. When "make modules_install"
    runs, it uses the new KERNELRELEASE value to determine where to install the modules.
    This conflicts with where the spec file assumes they are going because of the
    mis-matching KERNELRELEASE versions.

    + INSTALL_MOD_PATH=/var/tmp/kernel-2.6.29rc4tip01479g5d85422-root
    + make -j16 modules_install
    INSTALL crypto/aead.ko
    INSTALL crypto/cbc.ko
    INSTALL crypto/chainiv.ko
    INSTALL crypto/crc32c.ko
    INSTALL crypto/crypto_algapi.ko
    INSTALL crypto/crypto_blkcipher.ko
    INSTALL crypto/crypto_hash.ko
    INSTALL crypto/cryptomgr.ko
    INSTALL crypto/ecb.ko
    INSTALL crypto/eseqiv.ko
    INSTALL crypto/krng.ko
    INSTALL crypto/md5.ko
    INSTALL crypto/pcbc.ko
    INSTALL crypto/rng.ko
    INSTALL drivers/block/cciss.ko
    INSTALL drivers/hid/hid-dummy.ko
    INSTALL drivers/scsi/iscsi_tcp.ko
    INSTALL drivers/scsi/libiscsi.ko
    INSTALL drivers/scsi/libiscsi_tcp.ko
    INSTALL drivers/scsi/scsi_transport_iscsi.ko
    INSTALL drivers/scsi/scsi_wait_scan.ko
    INSTALL fs/lockd/lockd.ko
    INSTALL fs/nfs/nfs.ko
    INSTALL fs/nfsd/nfsd.ko
    INSTALL lib/libcrc32c.ko
    INSTALL net/sunrpc/sunrpc.ko
    DEPMOD 2.6.29-rc4-tip
    + cp arch/x86/boot/bzImage
    /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/boot/vmlinuz-2.6.29-rc4-tip-01479-g5d85422
    + cp System.map
    /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/boot/System.map-2.6.29-rc4-tip-01479-g5d85422
    + cp .config
    /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/boot/config-2.6.29-rc4-tip-01479-g5d85422
    + cp vmlinux vmlinux.orig
    + bzip2 -9 vmlinux
    + mv vmlinux.bz2
    /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/boot/vmlinux-2.6.29-rc4-tip-01479-g5d85422.bz2
    + mv vmlinux.orig vmlinux
    + /usr/lib/rpm/brp-compress
    Processing files: kernel-2.6.29rc4tip01479g5d85422-2
    error: File not found:
    /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/lib/modules/2.6.29-rc4-tip-01479-g5d85422

    RPM build errors:
    File not found:
    /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/lib/modules/2.6.29-rc4-tip-01479-g5d85422
    make[1]: *** [rpm] Error 1
    make: *** [rpm] Error 2

    I have tested this patch on git -tip, Linus' git tree, and the kernel.org tar files, both
    with and without CONFIG_LOCALVERSION_AUTO=y.

    Signed-off-by: Josh Hunt
    Signed-off-by: Sam Ravnborg
    ----

    Josh Hunt
     

06 Dec, 2008

1 commit


04 Dec, 2008

1 commit


29 Jan, 2008

1 commit


09 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
     

02 Jan, 2006

1 commit

  • Fix out-of-tree builds for the tar-pkg targets

    When I wrote the buildtar script, I didn't even think about
    out-of-tree builds because I didn't use these back then. This patch
    throughoutly uses ${objtree} instead of `pwd`.

    Also, the kernel version is no longer manually built. Instead, it will
    properly use $KERNELRELEASE . Installing modules is only done if
    CONFIG_MODULES is set.

    Signed-off-by: Jan-Benedict Glaw
    Signed-off-by: Sam Ravnborg

    Jan-Benedict Glaw
     

22 Jul, 2005

1 commit


15 Jul, 2005

1 commit


14 Jul, 2005

1 commit


13 Jul, 2005

1 commit


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