Commit Graph

123 Commits (e5fc15bf9a5868758e4efc8688b8bf58295fa5e7)

Author SHA1 Message Date
Alexander Couzens e5fc15bf9a build: move definition of KBUILD_BUILD_TIMESTAMP to include/kernel.mk
Fixes: 0aed054bec (build: add KERNEL_MAKE and KERNEL_MAKE_FLAGS
variables and move to kernel.mk)

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Felix Fietkau 0aed054bec build: add KERNEL_MAKE and KERNEL_MAKE_FLAGS variables and move to kernel.mk
This allows packages to use kernel make options without the forced
-C $(LINUX_DIR). It also makes it more clear that it to be called from
kernel module packages directly.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 1a341e89a7 build: fix kmod package build on non-GNU systems
BSD paste requires a filename argument, and it accepts - to use stdin as
intended.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Yousong Zhou 546e20e836 build: fix possible issue with kmod package having multiple AutoLoad's
This commit contains the following changes

 - Use local shell var where appliable
 - The $(sort $$$$$$$$mods) call will have no expected effect
 - Avoid EEXIST when creating symlinks in /etc/modules-boot.d/
 - Avoid duplicate arguments for insert_modules() in postinst-pkg

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years ago
Florian Fainelli 8e0e0e7d8b include: Determine MODULES_DIR correctly for external/git kernels
When using external or git cloned kernels, any kind of modifications
will alter KERNELRELEASE. LEDE still tries to stage modules in
lib/modules/$(LINUX_UNAME_VERSION) and LINUX_UNAME_VERSION is based on
KERNEL_PATCHVER (indirectly) so this does not work, and we lose all
kinds of automatic modules loading.

To remedy that, just cat $(LINUX_DIR)/include/config/kernel.release
which is late enough the kernel has prepared this file, and is correctly
tracking changes done throughout the kernel.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years ago
Stijn Tintel a93accd73d kernel: allow subtarget specific KernelPackage
Add a call to KernelPackage/$(1)/$(BOARD)/$(SUBTARGET) to the
KernelPackage macro. This allows to add kernel packages for x86/64,
without breaking x86. It's not possible to do this with BOARD, as
BOARD=x86 for x86_64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Felix Fietkau 7a315b0b5d build: implement make check and make package/X/check
This is intended to be used for a wide array of package sanity checks.

The first check that is implemented is for the hash of downloaded files.
It checks:
  - Missing hash
  - Use of SHA256 instead of MD5
  - dl/<file> hash not matching hash in makefile
  - deprecated MD5SUM variable

The deprecated MD5SUM variable check is skipped for feeds/ until OpenWrt
is updated as well

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 22ef1c83b3 kernel: make the kernel build auto-clean the build dir like package builds
Previous behavior can be restored by using QUILT=1 on target/prepare

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 9ae952cf8c build: split scripts/metadata.pl into target-metadata.pl and package-metadata.pl
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jo-Philipp Wich 349e7b635e include: fix nonshared flag handling
Fix nonshared flag handling to properly deal with source packages defining
both kmod and non-kmod ipks.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich d87c303b58 include/kernel.mk: flag kmod packages as nonshared by default
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich be575fdc9d include: remove now unused PACKAGE_SUBDIR variable
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Felix Fietkau fefe200a00 include/kernel: sort module lists for reproducibility
This is to get reproducible builds of, eg, the kmod-sched ipkg.

Locale preferences can change build order, but the locale is already been
defined for the entire build process, so it doesn't need to be specified here.

Signed-off-by: bryan newbold <bnewbold@robocracy.org>

SVN-Revision: 48540
8 years ago
Jo-Philipp Wich 4e14a27799 include: restrict separate kmod repo handling to base packages
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48479
8 years ago
Jo-Philipp Wich 0333da8943 include: group kmod ipk files into a "kernel" subdirectory
This is useful to just use the kmods from an official build while supplying
base packages from a custom feed or the other way around; for just overriding
the kmods with a local repo while using official repos for the rest.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48475
8 years ago
Felix Fietkau f301086eca build: remove SDK special case for kernel module packages
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48207
8 years ago
Felix Fietkau 576621f1e3 linux: add support of Synopsys ARC770-based boards
This patch introduces support of new boards with ARC cores.

 [1] Synopsys SDP board
     This is a new-generation development board from Synopsys that
     consists of base-board and CPU tile-board (which might have a real
     ASIC or FPGA with CPU image).
     It sports a lot of DesignWare peripherals like GMAC, USB, SPI, I2C
     etc and is intended to be used for early development of ARC-based
     products.

 [2] nSIM
     This is a virtual board implemented in Synopsys proprietary
     software simulator (even though available for free for open source
     community). This board has only serial port as a peripheral and so
     it is meant to be used for runtime testing which is especially
     useful during bring-up of new tools and platforms.
     What's also important ARC cores are very configurable so there're
     many variations of options like cache sizes, their line lengths,
     additional hardware blocks like multipliers, dividers etc. And this
     board could be used to make sure built software still runs on
     different HW configurations.

Cc: Felix Fietkau <nbd@openwrt.org>
Cc: Jo-Philipp Wich <jow@openwrt.org>
Cc: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

SVN-Revision: 47589
9 years ago
Felix Fietkau 120a88b9da include/kernel.mk - better search for ARCH
If "findstring" is used without leading and trailing spaces unexpected matches
may happen. For example consider ARC=arc then "findstring $(ARCH)" will
report a false match with "aarch64".

But "findstring $ARCH " (note trailing space) will correctly skip
matches for both "aarch64" and "aarch64_be".

This patch is built-tested against NetGear WNDR3800.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Felix Fietkau <nbd@openwrt.org>
Cc: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47359
9 years ago
Jonas Gorski a6b2271f5d kernel: assume modules.builtin is always present
We do not support old kernel versions not generating modules.builtin
anymore, so assume it will always be present and check for modules
to be built in first.

This prevents old modules being packages up after changing the kernel
config to include them in the kernel without cleaning the kernel tree.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46182
9 years ago
John Crispin bbad3f360e modules: fix postinst generation for kernel modules
Fixes ticket #19352.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45367
9 years ago
Nicolas Thill 5b1d880949 include/kernel.mk: add KernelPackage/conffiles macro
Signed-off-by: Nicolas Thill <nico@openwrt.org>

SVN-Revision: 45245
9 years ago
Felix Fietkau ed1e783aa1 kernel: only run kernel module list through version filter where version specific items are present - cuts package/kernel/linux/compile time in half
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45131
9 years ago
Luka Perkov 7002f6326e include: remove trailing whitespaces
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 45127
9 years ago
Michael Büsch 921bc1cc54 Fix download URL of the 4.x kernel.
SVN-Revision: 44589
9 years ago
Jo-Philipp Wich f942a9b82a include: apply version filter on AutoLoad and AutoProbe arguments
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44228
9 years ago
Jo-Philipp Wich cb846dae0c include: apply version filter on kmod file list
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44190
9 years ago
Felix Fietkau 47e651e2eb kernel: drop obsolete kernel version checks
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44113
9 years ago
Felix Fietkau 256d49be3c kernel.mk: Handle the x86_64 LINUX_KARCH case
x64 is handled by the x86 architecture in Linux, add a case for it in
LINUX_KARCH.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

SVN-Revision: 43672
10 years ago
Felix Fietkau fb5e8d203b kernel.mk: Refactor LINUX_KARCH affectation
Switch to a dumber implementation that will be easier to maintain in the long
run, with only if statements instead of having nested subst calls.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

SVN-Revision: 43671
10 years ago
Jonas Gorski e0342d2684 sdk: don't try to build in-kernel kmods
We don't ship the kernel sources, so using the base git as a feed will
fail when trying to build kernel modules with separate install steps.
Instead of trying to fixup the install steps, let's just skip building
kernel modules alltogether and just create empty packages.

Out-of-kernel modules are still expected to exist and are packaged, as
for these sources are fetched during the normal build steps.

Reported-by: Jo-Philipp Wich <jow@openwrt.org>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 43525
10 years ago
Florian Fainelli dd8d7188ee aarch64: add initial support
Add initial support for the AArch64 architecture

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

SVN-Revision: 43353
10 years ago
Felix Fietkau ab92a23394 build: allow AutoLoad and AutoProbe to specify modules not included in the package
On out-of-tree modules depending on other out-of-tree modules from a
different tree, module dependencies are not filled properly.
This change helps with adding those dependencies in the AutoLoad call

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43323
10 years ago
John Crispin 4b47d5b732 kernel: remove debug code from module insert script
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38340
11 years ago
John Crispin 022cadd64e include: add AutoProbe support
This is needed to make modprobe work

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38020
11 years ago
Jo-Philipp Wich 6a559ff95e include: modify kernel.mk to build empty kmod packages if the referenced symbols do not exist in the config
SVN-Revision: 37400
11 years ago
John Crispin 43a3d87b83 package: fix insmod on install
the procd changes broke the postinst insmod.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37015
11 years ago
Jonas Gorski 88ff7e3f23 include/kernel.mk: print warnings/errors to stderr
Makes warnings/errors visible when building with V=w/V=1.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 35713
11 years ago
Felix Fietkau 76f0fd210f kernel: fix module packages postinst by pointing to the new functions.sh location
SVN-Revision: 34804
12 years ago
John Crispin e9c0b95829 fixes uapi helper define
SVN-Revision: 34715
12 years ago
John Crispin 0803171cd1 adds wrapper for uapi directory
SVN-Revision: 34683
12 years ago
Felix Fietkau 720ccbd95d kernel: move KERNEL_BUILD_DIR under BUILD_DIR to properly fix gcc/libc based dependencies
SVN-Revision: 34450
12 years ago
Jo-Philipp Wich 9079032833 include: use $(DIR_SUFFIX) in $(KERNEL_BUILD_DIR) to separate build_dir/linux-* directories when building different libc implementations in the same buildroot
SVN-Revision: 34299
12 years ago
Imre Kaloz 0fa21ec3eb use xz compressed kernel tarballs
SVN-Revision: 34228
12 years ago
Imre Kaloz 996f48b4a3 we only support v3.x kernels
SVN-Revision: 34225
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
Jonas Gorski 14482ced5e include/kernel.mk: don't check for modules.builtin on 2.6.32-
modules.builtin is only available in 2.6.33 and later, so fall back to
assuming it's built-in for older kernels.

SVN-Revision: 29018
13 years ago
Nicolas Thill 7de2766a02 include/kernel.mk: enhance built-in/missing modules detection when packaging kmods
SVN-Revision: 28856
13 years ago
Nicolas Thill 3bcb16b305 package/blockmount: simplify extroot module loading logic
SVN-Revision: 28650
13 years ago
Nicolas Thill b5af64c529 kernel: build kmod even for modules built-in
SVN-Revision: 28649
13 years ago
Michael Büsch 69853cc4e8 Fix kernel version check macro typo
SVN-Revision: 28627
13 years ago