Commit Graph

87 Commits (3bbb92772813c7a955d210f0e82ebdedd3183cec)

Author SHA1 Message Date
Felix Fietkau 3bbb927728 build: Allow kernel modules to set build ID debug symbol
This change adds support for specifying a build ID for kernel modules.
This is done by setting PKG_BUILD_ID to a hexadecimal string, which will
then be passed to the kernel linker. In addition, when this flag is set,
the build ID debug symbol (.note.gnu.build-id) will not be stripped from
the kernel module. This symbol is exported in sysfs by the kernel (if
the kernel is compiled with CONFIG_KALLSYMS) and so can be used to
uniquely identify a version of a kernel module in a running kernel. This
is useful for keeping track of different versions of a module when doing
experiments and development.

Modules that specify the build ID will be ~100 bytes larger (depending
on the length of the build ID specified). There is no size difference
for kernel modules that do not set this variable.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>

SVN-Revision: 47290
9 years ago
John Crispin 3ec7ccf501 config: add an option to enable KPROBE
Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45212
9 years ago
Felix Fietkau 5d9eeab64a build: remove obsolete references to cris and avr32
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44965
9 years ago
Jo-Philipp Wich b941d2fd65 include: pass kernel version when generating kconfig overrides
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44189
9 years ago
Felix Fietkau 9318930993 kernel: allow specifying kernel images to be copied separately from kernel make command line
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43619
10 years ago
Felix Fietkau b0ef5e66fa build: remove useless quote stripping for KERNELNAME, add fallback for it in the kernel build command line
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42781
10 years ago
Felix Fietkau a402b5c48d build: make sure modules are modposted after initramfs image is built
Otherwise the modpost steps for individual modules that are compiled
manually (using make package/<name_of_module>/install) will give warning
of missing symbols when that module depends other modules.

This is caused by the Module.symvers file not containing any symbols
anymore of external modules when the initramfs image is built without
specifically giving the modules target.

Signed-off-by: Tjalling Hattink <t.hattink@fugro.nl>

SVN-Revision: 42773
10 years ago
John Crispin 8295b1f7f2 target/linux/*/image/Makefile: eliminate more LINUX_DIR users
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41792
10 years ago
John Crispin 34106f4a1a include: Allow git kernel branch selection
This allows the selection of a specific branch in the menuconfig
when using a kernel downloaded from GIT.

Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com>

SVN-Revision: 40946
10 years ago
John Crispin c77feae6be include: Clean-up kernel git command options management
The way git options are managed in kernel-defaults.mk makes additions

difficult. If requires different code path for each option; it's
ok so far as we handle only one option, but if we want to make the git
clone mechanism more flexible, more option will be required, which
will become tedious.

So; we'll move the GIT options into a variable, that may or may not be
set depending on the configuration, and we'll pass this variable to the
git command.

Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com>

SVN-Revision: 40945
10 years ago
John Crispin 45e3540a3f config: Remove KERNEL_GIT_LOCAL_REPOSITORY option
The GIT_LOCAL_REPOSITORY option adds the --reference argument to the
git clone kernel command line, if KERNEL_GIT_CLONE_URI is set.

This option is intended to speed-up the repo creation by using local
objets rather than downloading it. However, a local repo can be cloned
much faster by setting GIT_LOCAL_REPOSITORY directly to the local tree.

In that case, git clone will bypass the normal "git aware" transport
mechanism and clone the repository by copying and hardlinking objects
rather than downloading it, resulting in a significant speed increase.

That makes the GIT_LOCAL_REPOSITORY option pretty useless so we'll just
remove it and recommand the usage of KERNEL_GIT_CLONE_URI directly.

Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com>

SVN-Revision: 40944
10 years ago
John Crispin 76133009c9 sparse: add as a new package selectable from the config
This change does multiple things, all related to enable sparse usage as
a static analysis tool selectable from the OpenWrt configuration:
*add a KERNEL_SPARSE option in the config to add sparse to the kernel
 build (through the C=1 option usage)
*add sparse as a new host tools. It will get selected automatically when
 the above option will be enabled

Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com>

SVN-Revision: 40490
10 years ago
Felix Fietkau 627e974c99 partially revert "build: remove check for nonexistant CONFIG_TAR_VERBOSITY variable and move TAR_OPTIONS to unpack.mk"
This complicates the evaluation order for some packages

SVN-Revision: 40006
10 years ago
John Crispin b5542f6aed include: r39979 broke kernel unpacking
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40002
10 years ago
Felix Fietkau f440e7faea kernel: fix parallel build issues with header install
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39424
10 years ago
Imre Kaloz 7aaa9bc91c add x86_64 target support
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 39208
11 years ago
Florian Fainelli cdcde21b8d include: handle LZ4 compression scheme
Kernel 3.12 now offers LZ4 compression which will make initramfs builds
fail because we do not know how to substitute the relevant config
symbols, fix that.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 38533
11 years ago
Felix Fietkau bb494ed639 kernel: fix remaining initramfs related breakage
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 37518
11 years ago
Luka Perkov 448decfa8e include: fix path for kernel-generated cpio removal
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 37128
11 years ago
Florian Fainelli 5b5fd9f92d include: force a kernel-generated cpio removal and rebuild
Make sure that the kernel rebuilds the initramfs cpio archive file by
deleting it before so we get it re-generated properly.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 37125
11 years ago
Florian Fainelli bc7260a125 buildroot: filter out dtbs KERNELNAME target (#13785)
Do not attempt to copy arch/$(LINUX_KARCH)/boot/dtbs because these are
not real files, fixes #13785.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 37107
11 years ago
Florian Fainelli eab95ea467 buildroot: copy KENRNELNAME files to $(KDIR)
In order to support building both normal and initramfs kernel, we will
rebuild the wrappers around the vmlinux ELF binary, copy these with an
appropriate extension when they exist.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 37048
11 years ago
Florian Fainelli a890ccd6e0 buildroot: build a second pass kernel if initramfs is enabled
If initramfs is enabled, build a second pass kernel containing the CPIO
rootfs, preliminary work to get non exclusive enabling of initramfs.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 37047
11 years ago
Florian Fainelli b729d41d64 buildroot: workaround broken syntax highlighting
GNU Make's subst is always breaking syntax highlighting with at least
vim add the right comments to workaround it.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 37046
11 years ago
Florian Fainelli d85ec2b936 kernel: add missing CONFIG_KALLSYMS_UNCOMPRESSED symbol
Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 35180
12 years ago
Imre Kaloz 0fa21ec3eb use xz compressed kernel tarballs
SVN-Revision: 34228
12 years ago
Florian Fainelli 451803c51a kernel-defaults: factor common code handling initramfs options
While at it, reindent so it is more in-line with the rest of the file.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 34034
12 years ago
Florian Fainelli 246e563cb7 properly reindent Kernel/Prepare/Default
SVN-Revision: 34014
12 years ago
Felix Fietkau 482a6d4aea kernel: suppress redundant calls to headers installation
SVN-Revision: 33421
12 years ago
Felix Fietkau 8091d3f2e8 kernel: remove the explicit kernel make call for "oldconfig prepare scripts", the kernel build system has proper dependencies
SVN-Revision: 33420
12 years ago
Felix Fietkau b1f318de53 kernel: fix portability issues on the x86 specific relocs host tool, fixes build on mac os x
SVN-Revision: 32783
12 years ago
Florian Fainelli 6de0939c3a build: allow KERNELNAME to contain multiple kernel make targets
SVN-Revision: 32423
12 years ago
Gabor Juhos 622146a518 include/kernel-defaults: set V='' if c is not set in OPENWRT_VERBOSE
This fixes the following errors:

  CALL    arch/powerpc/kernel/prom_init_check.sh
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer axpression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
arch/powerpc/kernel/prom_init_check.sh: line 39: [: ss: integer expression expected
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h

SVN-Revision: 31598
12 years ago
Gabor Juhos 3349cf2691 Fix iptables abuse of kernel header files. Use exported headers instead.
[juhosg: export xt_layer7.h for all kernel versions]

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

SVN-Revision: 31566
12 years ago
Felix Fietkau 34ffb526a2 build: rework verbosity level selection
V=99 and V=1 are now deprecated in favor of a new verbosity class system,
though the old flags are still supported.
You can set the V variable on the command line (or OPENWRT_VERBOSE in the
environment) to one or more of the following characters:

- s: stdout+stderr (equal to the old V=99)
- c: commands (for build systems that suppress commands by default, e.g. kbuild)
- w: warnings/errors only (equal to the old V=1)

SVN-Revision: 31484
12 years ago
Mirko Vogt ea14276046 enable verbose output of kernel build if V=99 is passed
append V=1 to KERNEL_MAKEOPTS when $V (and therewith $KBUILD_VERBOSE) is set to 99

SVN-Revision: 31466
12 years ago
John Crispin 032f3ea5e7 define external cpio
Allow building image with an external cpio

Signed-off-by: Tathagata Das <tathagata@alumnux.com>

SVN-Revision: 31204
12 years ago
Jo-Philipp Wich 97af76a920 include: calculate md5sum over sorted kernel config symbol list and incorperate it into the kernel metapackage version, make kmods depend on this specific version. The aim of this change is to invalidate kmods which are built against a different kernel config on the opkg metadata level. Manual copying and insmod of custom *.ko files, e.g. for development purpose, is still possible.
SVN-Revision: 29686
13 years ago
Felix Fietkau fc0863785a add a portable version of sys/sysmacros.h and and let the kernel use the host include dir, fixes x86 builds on non-gnu systems
SVN-Revision: 27346
13 years ago
Felix Fietkau caf4747f0c build: clean up handling of the kernel config
- support kernel config overlays in env/
- allow overriding the target kernel config with CONFIG_TARGET=platform|subtarget|env

SVN-Revision: 26498
13 years ago
Imre Kaloz b74308c433 only support EABI on ARM targets
SVN-Revision: 25928
13 years ago
Imre Kaloz a361eab890 fixup board specific KERNELNAME overrides
SVN-Revision: 25138
14 years ago
Imre Kaloz 832fc4a133 2.6.38 supports xz ramdisks, too
SVN-Revision: 25080
14 years ago
Florian Fainelli b6e9f1dfe0 make targets provide their KERNELNAME
SVN-Revision: 23919
14 years ago
Felix Fietkau 6117c04c94 remove linux 2.4 specific build system code
SVN-Revision: 21951
14 years ago
Alexandros C. Couloumbis 43ee14563c finalize lzma/jffs2 support (currently not enebled by default, for kernels >=2.6.33) based on Edgar Soldin patches: https://lists.openwrt.org/pipermail/openwrt-devel/2010-March/006550.html
SVN-Revision: 20837
14 years ago
Imre Kaloz 0ebb9220a0 make lzo compressed initramfs selectable, too
SVN-Revision: 18457
15 years ago
Felix Fietkau ea41d3a288 merge target kernel config files with subtarget config files and add a variable override for editing the target kernel config file with make kernel_menuconfig in case the subtarget contains overrides (thx, sn9)
SVN-Revision: 18362
15 years ago
Felix Fietkau bf2fe7ea9a automatically adjust CONFIG_BLK_DEV_INITRD in the kernel config (thx, sn9)
SVN-Revision: 18361
15 years ago
Gabor Juhos f7033929fa add menuconfig option for enabling debugfs support in the kernel
SVN-Revision: 17540
15 years ago