04 Jan, 2014

2 commits

  • These commands will mysteriously fail:

    $ make ARCH=arm versatile_defconfig
    [...]
    $ make ARCH=arm deb-pkg
    [...]
    make[1]: *** [deb-pkg] Error 1
    make: *** [deb-pkg] Error 2

    The Debian architecture selection for these kernel architectures does
    'grep FOO=y $KCONFIG_CONFIG && echo bar', and after 'set -e' this
    aborts the script if grep does not find the given config symbol.

    Fixes: 10f26fa64200 ('build, deb-pkg: select userland architecture based on UTS_MACHINE')
    Signed-off-by: Ben Hutchings
    Signed-off-by: Michal Marek

    Ben Hutchings
     
  • builddeb generates a control file that says the linux-headers package
    can only be built for the build system primary architecture. This
    breaks cross-building configurations. We should use $debarch for this
    instead.

    Since $debarch is not yet set when generating the control file, set
    Architecture: any and use control file variables to fill in the
    description.

    Fixes: cd8d60a20a45 ('kbuild: create linux-headers package in deb-pkg')
    Reported-and-tested-by: "Niew, Sh."
    Signed-off-by: Ben Hutchings
    Signed-off-by: Michal Marek

    Ben Hutchings
     

02 Jan, 2014

1 commit


18 Nov, 2013

1 commit


07 Nov, 2013

1 commit

  • When building perf out of tree:

    $ make perf-tar-src-pkg
    $ tar -xf perf-.tar -C /tmp
    $ cd /tmp/perf
    $ make -C tools/perf

    you get this warning message:
    make[1]: *** No rule to make target `kernelversion'. Stop.

    Fix it by saving the perf version in the tar file and using that for the
    out of tree builds.

    v2: removed short form request and fixed up version string from usual output.

    Signed-off-by: David Ahern
    Suggested-by: Ingo Molnar
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/1383753335-25782-1-git-send-email-dsahern@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     

13 Sep, 2013

1 commit

  • Pull MIPS updates from Ralf Baechle:
    "This has been sitting in -next for a while with no objections and all
    MIPS defconfigs except one are building fine; that one platform got
    broken by another patch in your tree and I'm going to submit a patch
    separately.

    - a handful of fixes that didn't make 3.11
    - a few bits of Octeon 3 support with more to come for a later
    release
    - platform enhancements for Octeon, ath79, Lantiq, Netlogic and
    Ralink SOCs
    - a GPIO driver for the Octeon
    - some dusting off of the DECstation code
    - the usual dose of cleanups"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (65 commits)
    MIPS: DMA: Fix BUG due to smp_processor_id() in preemptible code
    MIPS: kexec: Fix random crashes while loading crashkernel
    MIPS: kdump: Skip walking indirection page for crashkernels
    MIPS: DECstation HRT calibration bug fixes
    MIPS: Export copy_from_user_page() (needed by lustre)
    MIPS: Add driver for the built-in PCI controller of the RT3883 SoC
    MIPS: DMA: For BMIPS5000 cores flush region just like non-coherent R10000
    MIPS: ralink: Add support for reset-controller API
    MIPS: ralink: mt7620: Add cpu-feature-override header
    MIPS: ralink: mt7620: Add spi clock definition
    MIPS: ralink: mt7620: Add wdt clock definition
    MIPS: ralink: mt7620: Improve clock frequency detection
    MIPS: ralink: mt7620: This SoC has EHCI and OHCI hosts
    MIPS: ralink: mt7620: Add verbose ram info
    MIPS: ralink: Probe clocksources from OF
    MIPS: ralink: Add support for systick timer found on newer ralink SoC
    MIPS: ralink: Add support for periodic timer irq
    MIPS: Netlogic: Built-in DTB for XLP2xx SoC boards
    MIPS: Netlogic: Add support for USB on XLP2xx
    MIPS: Netlogic: XLP2xx update for I2C controller
    ...

    Linus Torvalds
     

26 Aug, 2013

1 commit

  • A lot of 64-bit systems supported by Linux/MIPS have boot firmware or
    bootloaders that only understand 32-bit ELF files, and as such, the vmlinux.32
    target exists to support these systems. Therefore, it'd be nice if the tar-pkg
    target recognised this, and included the right version when packaging up a
    binary of the kernel.

    This updates buildtar to support MIPS targets. MIPS may use 'vmlinux'
    or 'vmlinux.32' depending on the target system. This uses 'vmlinux.32'
    in preference to 'vmlinux' where present (although I should check which
    is newer), including either file as /boot/vmlinux-${version}.

    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/1673/
    Signed-off-by: Ralf Baechle

    Stuart Longland
     

16 Aug, 2013

1 commit

  • scripts/package/builddeb is used to create Debian packages.
    Currently the firmware package always gets the same version number
    irrespective of the Kernel version.
    The paths inside the firmware package depend on the Kernel
    version.

    With the patch supplied the Kernel version becomes part of the
    Debian firmware package number.

    Signed-off-by: Heinrich Schuchardt
    Cc: Ben Hutchings
    Acked-by: maximilian attems
    Signed-off-by: Michal Marek

    Heinrich Schuchardt
     

24 Jul, 2013

4 commits


23 Jul, 2013

3 commits


11 Jul, 2013

1 commit

  • Pull kbuild updates from Michal Marek:
    - fix for make headers_install argv explosion with too long path
    - scripts/setlocalversion does not call git update-index needlessly
    - fix for the src.rpm produced by make rpm-pkg. The new make
    image_name can be useful also for other packaging tools.
    - scripts/mod/devicetable-offsets.o is not rebuilt during each make run
    - make modules_install dependency fix
    - scripts/sortextable portability fix
    - fix for kbuild to generate the output directory for all object files
    in subdirs.
    - a couple of minor fixes

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kbuild: create directory for dir/file.o
    tools/include: use stdint types for user-space byteshift headers
    Makefile: Fix install error with make -j option
    Fix a build warning in scripts/mod/file2alias.c
    improve modalias building
    scripts/mod: Spelling s/DEVICEVTABLE/DEVICETABLE/
    kbuild: fix error when building from src rpm
    scripts/setlocalversion on write-protected source tree
    Makefile.lib: align DTB quiet_cmd
    kbuild: fix make headers_install when path is too long

    Linus Torvalds
     

24 Jun, 2013

1 commit

  • The following issue can be reproduced with Linus' tree on
    an x86_64 server.

    >+ cp /home/user/rpmbuild-test/BUILDROOT/kernel-3.9.2.x86_64/boot/vmlinuz-3.9.2
    >cp: missing destination file operand after
    >/home/user/rpmbuild-test/BUILDROOT/kernel-3.9.2-1.x86_64/boot/vmlinuz-3.9.2'
    >Try `cp --help' for more information.
    >error: Bad exit status from /var/tmp/rpm-tmp.R4o0iI (%install)

    Here are the commands to reproduce:

    make defconfig
    make rpm-pkg

    Use the resulting src rpm to build as follows:

    mkdir ~/rpmbuild-test
    cd ~/rpmbuild-test
    rpmbuild --rebuild --define "_topdir `pwd`" -vv ~/rpmbuild/SRPMS/kernel-3.10.0_rc1+-1.src.rpm

    The issue is because the %install script uses $KBUILD_IMAGE and it hasn't
    been set since it is only available in the kbuild system and not in the
    %install script.

    This patch adds a Makefile target to emit the image_name that can be used
    and modifies the mkspec to use the dynamic name in %install.

    Signed-off-by: Mike Marciniszyn
    Signed-off-by: Michal Marek

    Mike Marciniszyn
     

16 May, 2013

1 commit

  • Commit 6501320311664e11ad5489fedb17ea1f817c2617 dropped the rpm spec as a
    prerequisite for the binrpm-pkg target but forgot to update $< usage,
    which causes the rule to break.

    This commit fixes that by replacing $< with the spec name.

    Signed-off-by: Luiz Capitulino
    Signed-off-by: Michal Marek

    Luiz Capitulino
     

18 Apr, 2013

4 commits


08 Apr, 2013

2 commits

  • When dealing with multiple sub-arches (like 32- and 64-bit on x86, for
    example) generating a bunch of kernel tar archives with the same name
    but for different sub-arches could get confusing and error-prone. Also,
    the build process could overwrite otherwise unrelated builds and you
    probably don't want that. So, add the architecture to the archive name
    for more clarity and less shoot-yourself-in-the-foot practices.

    Signed-off-by: Borislav Petkov
    Signed-off-by: Michal Marek

    Borislav Petkov
     
  • KBUILD_OUTPUT is always empty here, so it is useless to test it. But
    while use O=.., objtree and srctree will be different. I compare them
    instead.

    Signed-off-by: Bin Wang
    Signed-off-by: Michal Marek

    Bin Wang
     

22 Feb, 2013

1 commit

  • 'make rpm-pkg' and 'make binrpm-pkg' fail when the kernel source is
    read-only. Specifically, when the RPM spec generated by
    scripts/package/mkspec is run, KBUILD_SRC happens to be set to the
    source location and thus the invocation of 'make headers_install'
    fails when an internal call to 'filechk' tries to write a file into
    the source tree.

    The fix is to clear KBUILD_SRC for the 'make headers_install'
    invocation in the spec file, as is already done for the 'make
    modules_install' invocation.

    Signed-off-by: David R. Bild
    Signed-off-by: Michal Marek

    David R. Bild
     

12 Oct, 2012

1 commit

  • Pull kbuild changes from Michal Marek:
    "The main part of kbuild for v3.7 contains:
    - Fix for scripts/Makefile.modpost to not choke on a '.ko' substring
    in the build directory path
    - Two warning fixes (modpost and main Makefile)
    - __compiletime_error works also with gcc 4.3
    - make tar{gz,bz2,xz}-pkg uses default compression settings instead
    of saving as many bytes as possible (this should actually be in the
    misc branch, I don't know why I applied it here)."

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    compiler-gcc4.h: correct verion check for __compiletime_error
    modpost: Permit .GCC.command.line sections
    Kbuild: use normal compression settings for tar*-pkg
    scripts/Makefile.modpost: error in finding modules from .mod files.
    kbuild: Remove useless warning while appending KCFLAGS

    Linus Torvalds
     

27 Sep, 2012

2 commits

  • For large kernel configurations (like a distribution kernel)
    targz-pkg takes a quite long time to just do the compression.
    I clocked it at 15+mins for a SUSE kernel like config on a fast
    system. And tarxz and bzip2 are even slower.

    The main reason is that the script that is doing the taring sets
    the highest compression level (-9). When I change it to just
    use the defaults the gzip time for the same kernel goes down
    to ~3 mins. I haven't tested xz and bzip, but I expect those
    to be much faster too.

    I'm not willing to wait that long for a small compression
    gain. So just change the script to use the defaults.

    Signed-off-by: Andi Kleen
    Reviewed-by: Fengguang Wu
    Signed-off-by: Michal Marek

    Andi Kleen
     
  • There were reports of users destroying their Fedora installs by a kernel
    tarball that replaces the /lib -> /usr/lib symlink. Let's remove the
    toplevel directories from the tarball to prevent this from happening.

    Reported-by: Andi Kleen
    Suggested-by: Ben Hutchings
    Cc:
    Signed-off-by: Michal Marek

    Michal Marek
     

28 Jun, 2012

2 commits


27 May, 2012

1 commit

  • After 303395ac3bf3e2cb488435537d416bc840438fcb, some headers are
    autogenerated. Include these autogenerated headers (mainly
    unistd_32_ia32.h) in out-of-tree builds to allow DKMS modules to be
    built succesfully.

    Signed-off-by: Peter Lekensteyn
    Signed-off-by: Michal Marek

    Lekensteyn
     

25 Feb, 2012

3 commits

  • The out-of-tree build is broken in 'make deb-pkg'. The
    header checks and the header install works on the source and
    not on the object tree.
    While fixing this also replace the direct 'make' invocations
    with the $MAKE variable to be consistent within the script.

    Cc: maximilian attems
    Cc: Ben Hutchings
    Cc: debian-kernel@lists.debian.org
    Cc: linux-kbuild@vger.kernel.org
    Signed-off-by: Joerg Roedel
    Signed-off-by: Michal Marek

    Joerg Roedel
     
  • For user-mode Linux the other packages are not required. So
    only build the package with the linux-image in it.

    Cc: maximilian attems
    Cc: debian-kernel@lists.debian.org
    Cc: linux-kbuild@vger.kernel.org
    Signed-off-by: Joerg Roedel
    Tested-by: Ben Hutchings
    Signed-off-by: Michal Marek

    Joerg Roedel
     
  • The Link to the kernel header files in the debian packages
    point to the original build directory. This is a bad choice
    if the packages were installed on a different machine. Fix
    this in by manually re-creating the link in the builddeb
    script.

    Cc: maximilian attems
    Cc: debian-kernel@lists.debian.org
    Cc: linux-kbuild@vger.kernel.org
    Signed-off-by: Joerg Roedel
    Reviewed-by: Ben Hutchings
    Signed-off-by: Michal Marek

    Joerg Roedel
     

19 Feb, 2012

1 commit


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
     

26 May, 2011

1 commit


25 May, 2011

1 commit


24 May, 2011

1 commit