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>
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>
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>
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>
This can be used to tweak the buildbot behavior without having to change
buildbot's configuration.
It will also allow us to add more aggressive clean steps (e.g. on
toolchain changes), which would break developers' workflows if enable
by default.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
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>
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>
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>
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>
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>
The SDK Makefile still trys to copy the docs folder which was removed
with 882f4d2d63. This causes an SDK build
error.
All other removals are just cleanup.
Signed-off-by: Mathias Kresin <dev@kresin.me>
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>
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>
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>
The configuration preservation mechanism fails to keep items was are unset
as unset. For busybox this causes issues when building with custom
settings in the SDK. Therefore preserve busybox unset settings.
In addition we preserve non-package selection unset settings because
they may be important for making sure we compile and identical
package for packages that are recompiled in the SDK.
Now that SDK not longer ships .config this becomes relevant for
any use of the SDK.
Signed-off-by: Daniel Dickinson <lede@daniel.thecshore.com>
Commit d79f8909c1 introduced CONFIG_ALL,
CONFIG_ALL_KMODS and CONFIG_ALL_NONSHARED as menuconfig choices to the SDK,
therefor we can drop the hardcoded CONFIG_ALL symbol declaration now.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
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>
It is desirable to be able to use ./scripts/feeds install -a
when in the SDK without being forced to build a great number
of packages that are not actually wanted.
We therefore add the option of changing the various ALL package
build options so that we can default to packages not being built
unless we select them.
Signed-off-by: Daniel Dickinson <lede@daniel.thecshore.com>
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>
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
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
Extend the SDK Config.in file to explicitely declare a MODULES symbol with
the "option modules" flag set in order to prevent a kconfig segmentation fault
whenever a "depends m" dependency is encountered.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 46514
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
Initialize a Git repository in the SDK and use git reset / git clean
to rollback any SDK changes with "make clean" or "make dirclean".
This approach is more robust than nuking entire directory trees because
some parts of them might have been shipped with the original archive.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 43904
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
- 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
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