aboutsummaryrefslogtreecommitdiffstats
path: root/target/sdk/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* build: improve ccache supportRoman Yeryomin2020-07-111-6/+2
| | | | | | | | | | | | | | | | | | Set CCACHE_DIR to $(TOPDIR)/.ccache and CCACHE_BASEDIR to $(TOPDIR). This allows to do clean and dirclean. Cache hit rate for test build after dirclean is ~65%. If CCACHE is enabled stats are printed out at the end of building process. CCACHE_DIR config variable allows to override default, which could be useful when sharing cache with many builds. cacheclean make target allows to clean the cache. Changes from v1: - remove ccache directory using CCACHE_DIR variable - remove ccache leftovers from sdk and toolchain make files - introduce CONFIG_CCACHE_DIR variable - introduce cacheclean make target Signed-off-by: Roman Yeryomin <roman@advem.lv>
* sdk: use bundle-libraries.sh to ship kernel objtool toolsJo-Philipp Wich2019-09-031-8/+2
| | | | | | | | | | Ensure that the kernel objtool utilities are processed by the library bundler in order to ensure that they're usable on foreign systems with different libc versions. Fixes: a9f6fceb42 ("sdk: fix building external modules when CONFIG_STACK_VALIDATION=y") Acked-by: Yousong Zhou <yszhou4tech@gmail.com> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* sdk: fix GCC and Python dangling symlinksPetr Štetiar2019-08-121-1/+2
| | | | | | | | | | | | | Force prereq again in SDK in order to fix GCC and Python dangling symlinks: staging_dir/host/bin/g++ -> /builder/ath79_generic/ccache_cxx.sh staging_dir/host/bin/gcc -> /builder/ath79_generic/ccache_cc.sh staging_dir/host/bin/python -> /usr/bin/python3.5 staging_dir/host/bin/python3 -> /usr/bin/python3.5 Ref: FS#2424 Signed-off-by: Petr Štetiar <ynezz@true.cz>
* sdk: Fix cryptodev-linux build when CONFIG_ARM64_MODULE_PLTS=yJeffery To2019-08-041-1/+2
| | | | | | | | When CONFIG_ARM64_MODULE_PLTS=y, arch/arm64/kernel/module.lds is required to build cryptodev-linux. This updates the sdk to include this file. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* sdk: fix building external modules when CONFIG_STACK_VALIDATION=yYousong Zhou2019-04-261-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The option is at the moment enabled for x86/64. The selection chain should be config RETPOLINE select STACK_VALIDATION if HAVE_STACK_VALIDATION config x86 select HAVE_STACK_VALIDATION if X86_64 cryptdev-linux: make[4]: Entering directory '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/cryptodev-linux-cryptodev-linux-1.10' make -C /store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.113 M=/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/cryptodev-linux-cryptodev-linux-1.10 ARCH=x86 CROSS_COMPILE=x86_64-openwrt-linux-musl- modules make[5]: Entering directory '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.113' make[6]: *** No rule to make target '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/cryptodev-linux-cryptodev-linux-1.10/ioctl.o', needed by '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/cryptodev-linux-cryptodev-linux-1.10/cryptodev.o'. Stop. Makefile:1533: recipe for target '_module_/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/cryptodev-linux-cryptodev-linux-1.10' failed Open vSwitch intree kmods make[7]: Entering directory '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/openvswitch-2.11.0/datapath/linux' make -C /store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.111 ARCH=x86 M=/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/openvswitch-2.11.0/datapath/linux modules make[8]: Entering directory '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.111' make[9]: *** No rule to make target 'tools/objtool/objtool', needed by '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/openvswitch-2.11.0/datapath/linux/actions.o'. Stop. Makefile:1533: recipe for target '_module_/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/openvswitch-2.11.0/datapath/linux' failed make[8]: *** [_module_/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/openvswitch-2.11.0/datapath/linux] Error 2 make[8]: Leaving directory '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.111' Reference: builddeb: include objtool binary in headers package, https://patchwork.kernel.org/patch/9014071/ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* sdk: find kernel modules when KDIR is a symlinkKarl Vogel2018-11-291-1/+1
| | | | | | | | | | | The find statement would not return any results if the KDIR_BASE pointed to a symlink. Ran into this issue due to a custom Kernel/Prepare that was installing a symlink to the kernel directory. The extra slash at the end fixes this scenario and does no harm for targets that have a proper KDIR. Signed-off-by: Karl Vogel <karl.vogel@gmail.com>
* sdk: include arch/arm/ Linux includes along with arch/arm64/ onesJo-Philipp Wich2018-08-031-1/+7
| | | | | | | | | | | The Linux headers on arm64 architectures contain references to common arch/arm/ headers which were not bundled by the SDK so far. Check if we're packing the SDK for an arm64 target and if we do, also include arch/arm headers as well. Fixes FS#1725. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* sdk: bundle usbip userspace sourcesJo-Philipp Wich2018-08-011-0/+4
| | | | | | | | Bundle the usbip utility sources shipped with the Linux kernel tree in order to allow the usbip packages from the package feed to build within the OpenWrt SDK. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* sdk: change base feed fallback to git.openwrt.orgJo-Philipp Wich2018-01-111-1/+2
| | | | | | | Change the hardcoded lede-project.org base feed fallback to $(PROJECT_GIT)/openwrt/openwrt.git instead. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* sdk: switch base feed url to git.openwrt.orgJo-Philipp Wich2018-01-041-1/+1
| | | | | | | As LEDE is rebranding to OpenWrt now, adjust the base feed Git reference accordingly. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* sdk: restrict base feed repo to public git for CONFIG_BUILDBOT onlyRafał Miłecki2017-12-051-1/+2
| | | | | | | | This allows people to build SDK from custom repository (git access using ssh) and keep original URL in SDK's feeds.conf.default. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: Jo-Philipp Wich <jo@mein.io>
* build: get rid of host.mkFelix Fietkau2017-02-261-1/+0
| | | | | | Defined required host related variables in toplevel.mk instead Signed-off-by: Felix Fietkau <nbd@nbd.name>
* sdk: emit proper tag references for base URLsJo-Philipp Wich2017-02-191-3/+5
| | | | | | | | | Properly resolve symbolic tag names when constructing the base feed Git url and avoid emitting "HEAD" references when building from detached commits. Fixes #495, #501. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* sdk: clean scripts/config before packing tarball (FS#504)Felix Fietkau2017-02-131-0/+1
| | | | | | | Avoids shipping potentially incompatible object files and also reduces the tarball size Signed-off-by: Felix Fietkau <nbd@nbd.name>
* sdk: add missing change from r3328-f55c29e4c7Felix Fietkau2017-02-081-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* sdk: explicitely remove ccache directories when packing SDKJo-Philipp Wich2017-01-241-0/+6
| | | | | | | | | | Upon first invocation, the ccache program will create the required directory hierarchy so there is no point in shipping these empty directories. Removing those paths also avoids shipping dangling symlinks in case the directories got linked elsewhere, e.g. into a shared global cache. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* sdk: fix Git URL detectionJo-Philipp Wich2017-01-201-2/+5
| | | | | | | Instead of relying on complex sed patterns that trip up make syntax rules, use GNU Makes builtin filter function to match desired URLs. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* sdk: avoid using private repository clone urls as base repo entryJo-Philipp Wich2017-01-191-1/+1
| | | | | | | Only consider the repository origin url as valid base feed entry if it is a git://, http:// or https:// location. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* sdk: do not strip static librariesJo-Philipp Wich2017-01-181-1/+1
| | | | | | | | | | | | | Do not strip static libraries shipped with the SDK in order to preserve the archive index. If we strip the index of the shipped libraries, host programs will fail to link these libraries with errors like: libssl.a: error adding symbols: Archive has no index; run ranlib to add one The error was found while investigating a Python host build failure within the SDK environment. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* sdk: exclude locale files to save some spaceFelix Fietkau2017-01-131-1/+2
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: rework library bundlingJo-Philipp Wich2017-01-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework the bundle-libraries.sh implementation to use a more robust approach for executing host binaries through the shipped ELF loader and libraries. The previous approach relied on symlinks pointing to a wrapper script which caused various issues, especially with multicall binaries as the original argv[0] name was not preserved through the ld.so invocation. Another down- side was the fact that the actual binaries got moved into another directory which caused executables to fail looking up resources with paths relative to the executable location. The new library wrapper implements the following improvements: - Instead of symlinks pointing to a common wrapper, each ELF executable is now replaced by a unqiue shell script which retains the original program name getting called - Instead of letting ld.so invoke the ELF executable directly, launch the final ELF binary through a helper program which fixes up the argv[0] argument for the target program - Support sharing a common location for the bundled libraries instead of having one copy in each directory containing wrapped binaries Finally modify the SDK build to wrap the staging_dir and toolchain binaries which allows to use the SDK on systems with a different glibc version. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* docs: remove all refrences in Makefiles/scriptsMathias Kresin2016-11-301-1/+1
| | | | | | | | | | The SDK Makefile still trys to copy the docs folder which was removed with 882f4d2d63272abce8c1966983aa10178e2e971f. This causes an SDK build error. All other removals are just cleanup. Signed-off-by: Mathias Kresin <dev@kresin.me>
* target/sdk: Switch to xz compression instead of bz2Daniel Engberg2016-11-041-4/+4
| | | | | | Switch to xz compression instead of using bz2. This makes a considerable difference in size, ar71xx SDK from 60M to 35M. Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
* sdk: predefine SOURCE_DATE_EPOCHJo-Philipp Wich2016-10-211-0/+1
| | | | | | | | | When building packages within the SDK, there is no Git revision history available so prepopulate SOURCE_DATE_EPOCH in version.mk, similar to how we handle REVISION already. Acked-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* target/{sdk,imagebuild}: Fix for symlink-treeDaniel Dickinson2016-09-301-1/+1
| | | | | | | | | With symlink tree some directories are just symlinked which means IB and SDK end up with a symlink instead of an actual directory; this fixes the missing files by dereferencesing the directories instead of copying the symlinks. Signed-off-by: Daniel Dickinson <lede@cshore.thecshore.com>
* target/sdk: ship toolchain and kernel module packageFelix Fietkau2016-08-011-0/+2
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* IB/SDK/toolchain: use lower cases filenamesAlexander Couzens2016-06-011-1/+1
| | | | Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* IB/SDK/toolchain: use VERSION_DIST_SANITIZED instead of VERSION_DISTAlexander Couzens2016-06-011-1/+1
| | | | | | VERSION_DIST can contains spaces which produces problems when used as file name Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* sdk: stop shipping a .configJo-Philipp Wich2016-05-241-1/+0
| | | | | | | | | | | | | | | | Now that the most important options are exposed via menuconfig in the SDK we can stop shipping a (possibly outdated) copy of .config from the emitting buildroot. Leaving out .config has two positive side effects: - A simple "make" run without any prior config will launch menuconfig, forcing interactive users to make appropriate choices - Buildbot systems (e.g. our phase2 builder) can issue a "make defconfig" to obtain a .config enabling all packages by default Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* sdk: bundle required firmware filesJo-Philipp Wich2016-04-211-0/+2
| | | | | | | | Bundle all firmware files which have been built along with the kernel to fix packaging of kmods in the SDK environment that rely on in-tree firmwares, specifically kmod-e100. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* sdk: do not exclude ccache executableJo-Philipp Wich2016-04-181-1/+2
| | | | | | | Change tar exclude pattern to skip ccache directory contents but not the ccache executable itself. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* sdk: fix generation of base feed urlJo-Philipp Wich2016-04-171-1/+1
| | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* sdk: add base repository fallbackJo-Philipp Wich2016-01-121-0/+1
| | | | | | | | | | | | | | When the build system cannot infer its own repository url then let it fall back to http://git.openwrt.org/ for the base feed. The path to openwrt.git is guessed from the VERSION_NUMBER variable: "unknown" or "r12345" -> http://git.openwrt.org/openwrt.git "15.05.1" -> http://git.openwrt.org/15.05/openwrt.git Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 48212
* target/sdk: include modules.builtin, it is necessary for packaging kernel ↵Felix Fietkau2016-01-111-0/+1
| | | | | | | | modules Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48206
* target/sdk: do not include the target staging dir anymore, it is unnecessary nowFelix Fietkau2016-01-081-2/+0
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48157
* target/sdk: ship .ko files to allow rebuild of the base kmod-* packagesFelix Fietkau2016-01-081-0/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48156
* target/sdk: Fix filename with external toolchainFelix Fietkau2016-01-031-1/+1
| | | | | | | | | When building SDK with external toolchain, don't include _gcc in the filename Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com> SVN-Revision: 48084
* targets: Use configured distribution name for SDK, IB, and Toolchain tarball ↵Felix Fietkau2016-01-031-1/+1
| | | | | | | | | | | | names We allow to configure the version distribution name; let's also use it for the tarballs (SDK, ImageBuilder, and SDK). Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com> SVN-Revision: 48081
* sdk: use prepare target to initialize git snapshotJo-Philipp Wich2015-02-081-0/+1
| | | | | | | | | The new approach is less prone to race conditions and will properly snapshot the symlinks prepared by the prereq-build target. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 44330
* sdk: rename file to mention target/subtarget and move host system to suffixJo-Philipp Wich2015-02-071-4/+1
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 44312
* build: add version number to filenamesJo-Philipp Wich2015-01-081-1/+2
| | | | | | | | | | | | This commit introduces a new option CONFIG_VERSION_FILENAMES which causes OpenWrt to embed the version number in generated image files, SDK- and ImageBuilder archives. The option is enabled by default if CONFIG_VERSIONOPT is set. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 43869
* sdk: add missing kernel include filesFelix Fietkau2014-12-111-0/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43621
* sdk: improve feed setupJo-Philipp Wich2014-10-161-7/+12
| | | | | | | | | - Add current buildroot scm url as base feed to feeds.conf - Prefer feeds.conf over feeds.conf.default when generating the SDK feeds.conf.default Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 42935
* sdk: predefine kernel version magicJo-Philipp Wich2014-09-171-0/+1
| | | | | | | | | | | | | | | Kernel modules which are built using the SDK do not have access to the .vermagic file in the Linux build dir, therefore the generated .ipk metadata depends on kernel versions like '3.10.49-1-unknown' which are not satisfiable by the kernel meta package in the image. Fix this problem by substituting 'unknown' with the current version magic in include/kernel.mk when packing the SDK. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 42590
* sdk: keep $(STAGING_DIR)/usr/bin, at least curl needs itFelix Fietkau2014-09-011-2/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 42397
* target/sdk: strip host binaries before packingFelix Fietkau2014-03-131-2/+19
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39915
* target/sdk: leave out some unnecessary directoriesFelix Fietkau2014-03-131-1/+11
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39914
* target/sdk: generate a Config.in file with the settings of the build that ↵Felix Fietkau2014-03-101-0/+1
| | | | | | | | | | the SDK was generated from This allows make oldconfig/menuconfig to run Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39864
* target/sdk: remove obsolete compatibility makefilesFelix Fietkau2014-03-101-1/+0
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39863
* target/sdk: remove obsolete exclude lineFelix Fietkau2014-03-101-1/+0
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39861