Commit Graph

16 Commits

Author SHA1 Message Date
Michal Marek 06ed5c2bfa kbuild: Make scripts executable
The Makefiles call the respective interpreter explicitly, but this makes
it easier to use the scripts manually.

Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-08-20 16:03:45 +02:00
Michal Marek c7eb3a7a17 kbuild: Fix tar-pkg with relative $(objtree)
Commit 7e1c0477 (kbuild: Use relative path for $(objtree)) assumes that
the build process does not change its working directory. make tar-pkg
was a couterexample, fix this by changing directory only for the tar
command and not for the whole script, which at one point references the
now relative $(objtree).

Reported-and-tested-by: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-06-18 17:34:59 +02:00
Masahiro Yamada 7eb6e34052 kbuild: trivial - remove trailing empty lines
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-06-10 00:04:06 +02:00
Stuart Longland 7848ea7902 kbuild: Add MIPS specific files to generated package.
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 <ralf@linux-mips.org>
2013-08-26 15:31:54 +02:00
Borislav Petkov 6bc6c9409d buildtar: Add ARCH to the archive name
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 <bp@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-04-08 16:04:28 +02:00
Linus Torvalds ae3e462828 Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
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
2012-10-12 10:27:27 +09:00
Andi Kleen b589c8ae09 Kbuild: use normal compression settings for tar*-pkg
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 <ak@linux.intel.com>
Reviewed-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-09-27 16:56:59 +02:00
Michal Marek fe04ddf7c2 kbuild: Do not package /boot and /lib in make tar-pkg
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 <andi@firstfloor.org>
Suggested-by: Ben Hutchings <ben@decadent.org.uk>
Cc: <stable@kernel.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-09-27 16:26:19 +02:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Zdenek Kaspar 9a17f40048 kbuild: Add make tarxz-pkg build option
Signed-off-by: Zdenek Kaspar <zkaspar82@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-03-09 16:18:06 +01:00
Michal Marek 91d161857c scripts/package: tar-pkg: use tar --owner=root
Use the --owner= and --group= options to make sure the entries in
the built tar file are owned by root.  Without this change, a
careless sysadmin using the tar-pkg target can easily end up
installing a kernel that is writable by the unprivileged user
account used to build the kernel.

Test that these options are understood before using them so that
non-GNU versions of tar can still be used if the operator is
appropriately cautious.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-12-12 13:08:15 +01:00
Helge Deller 91400ac365 parisc: fix "make tar-pkg"
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2009-04-02 01:22:24 +00:00
Daniel De Graaf bc395add94 kbuild: support ARCH=x86 in buildtar
Signed-off-by: Daniel De Graaf <danieldegraaf@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:18 +01:00
Andi Kleen 4c87b948b2 x86_64: Support x86_64 in make buildtar
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-21 09:56:56 -07:00
Jan-Benedict Glaw 6073aa643f kbuild: tar-pkg with out-out-tree building
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 <jbglaw@lug-owl.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-01-01 19:31:30 +01:00
Jan-Benedict Glaw 6d983feab8 [PATCH] kbuild: create tarballs
It adds tarball packaging, which I prefer for distribution.
Also one of the two blanks after @echo is removed. One seems to be enough :)

Signed-off-by: Jan-Benedict Glaw <jbglaw@lug-owl.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-12 22:40:17 +00:00