Commit Graph

104 Commits (7a315b0b5d6aa91695853a8647383876e4b49a7a)

Author SHA1 Message Date
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
Mathias Kresin 59261cbf38 docs: remove all refrences in Makefiles/scripts
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>
8 years ago
Jo-Philipp Wich 8cc9224115 sdk: predefine SOURCE_DATE_EPOCH
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>
8 years ago
John Crispin 1b13b35231 include/toplevel.mk: fix defconfig when ~/.openwrt/defconfig exists - take 2
commit 5b72807416 ("include/toplevel.mk: fix defconfig when
~/.openwrt/defconfig exists") was missing a !

Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin 5b72807416 include/toplevel.mk: fix defconfig when ~/.openwrt/defconfig exists
./scripts/feeds update will reset the .config file if ~/.openwrt/defconfig
exists, thus resetting the target to ar71xx.

Signed-off-by: John Crispin <john@phrozen.org>
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
Hannu Nyman 3193053df7 Centralize setting of all version info to include/version.mk
Centralize setting all version information in include/version.mk
* Set RELEASE env variable in include/version.mk instead of toplevel.mk.
  Stop exporting the variable.
* Remove hardcoded release name from /etc/banner

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
8 years ago
Felix Fietkau 470442ea0f build: fix make download in the SDK
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 471ca4197c toplevel.mk: rescan target metadata if the image makefile changes
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 82522dbaee build: introduce SOURCE_DATE_EPOCH variable
SOURCE_DATE_EPOCH is the date of the last modified file using git/svn
as date source.
See https://reproducible-builds.org/specs/source-date-epoch/

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48584
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 830c308cf9 build: ignore the linux package in the sdk only for generating package data, not for dependencies
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48171
8 years ago
Felix Fietkau c390359418 build: prevent host default LDFLAGS from leaking into packages
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48158
8 years ago
Felix Fietkau dd537242a2 build: filter out relative directory entries from $PATH
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48107
8 years ago
Felix Fietkau c3d3dbc191 toplevel.mk: fix distclean
- remove logs like "make dirclean" does
- remove key-build*

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>

SVN-Revision: 47397
9 years ago
Jo-Philipp Wich dea417017e toplevel.mk: drop LD_LIBRARY_PATH overrides
Overriding LD_LIBRARY_PATH for host utilities frequently leads to problems
with host executables loading shared libraries from the staging_dir, leading
to crashes due to incompatible ABIs.

Since most host utilties either embed a proper rpath or are reworked to link
statically we do not need the workaround anymore.

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

SVN-Revision: 47103
9 years ago
Rafał Miłecki 164ac62643 include: toplevel: drop unused OPENWRTVERSION variable
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 46906
9 years ago
Steven Barth d1f6bd2541 toplevel: fix release name
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46899
9 years ago
Jo-Philipp Wich b052a00c0b toplevel.mk: fix LD_LIBRARY_PATH for host binaries
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 46394
9 years ago
Felix Fietkau 5868331214 build: don't call prereq for any package/symlinks rules
Most of the time, we want to make sure OpenWrt has been configured and
setup before start running make. However, in case of package/symlinks,
forcing prereq as a dependency creates multiple issues:
*when executed on a clean workspace, it will prompt for user input
 and open a menuconfig window before executing the feeds command
*the only way around that is to provide a .config. However, the "prereq"
 target would then run a "make defconfig", which will remove all the
 packages in the .config but from external feeds, as feeds have not been
 installed yet.

The only way to currently work around this, is to generate a fake config
by running "make defconfig", then "make package/symlinks", copy the real
config (which at this point disregards the previously generated config),
and run make defconfig again. Something like this:

make defconfig
make package/symlinks
cp real.config .config
make defconfig

This change is removing the need for the first defconfig, making the
process more logical for OpenWrt users using the package/symlinks target.

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

SVN-Revision: 45657
9 years ago
Felix Fietkau a0ced5164a build: tell users to do non-paralle builds on errors
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

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

SVN-Revision: 45127
9 years ago
Felix Fietkau 379dc5c11f build: move tmp/.prereq-build to staging_dir/host to gracefully handle staging_dir deletion
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44551
9 years ago
Jo-Philipp Wich 1a27d74827 include: remove SDK specific target from toplevel.mk
Instead introduce a generic "make prepare" target which is executed if
include/prepare.mk exists.

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

SVN-Revision: 44329
9 years ago
Jo-Philipp Wich 2cdba572f9 include: let HOSTCC default to $(CC), not gcc
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44277
9 years ago
Jo-Philipp Wich d3610773a1 include: test build prereqs before preparing tempinfo
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44270
9 years ago
Jo-Philipp Wich 4685e4f273 sdk: track files with git and use it to implement proper clean targets
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
9 years ago
John Crispin c22bebf6ab Fix build when TAR_OPTIONS env variable is set
The build system sets a make variable TAR_OPTIONS to the unpacking
command, i.e. "-xf -". Now if an environment variable with the same
name is set, the make variable is automatically exported to the
environment. The make variable is added to the tar command in the
makefile, and tar adds the environment variable. This results in a
command like "tar -c /some/dir -xf - -xf -" which of course doesn't
work. It is also difficult to spot as the second "-xf -" is not
visible on the command line.
I suggest this is fixed by unexporting TAR_OPTIONS as I see no use
of the evironment variable, and it is changed from the original
value anyway.

Signed-off-by: Jan Kardell <jan.kardell@telliq.com>

SVN-Revision: 42794
10 years ago
Jo-Philipp Wich a720dd209f build: introduce per feed repository support
This changeset implements a new menuconfig option to generate separate
repositories for each enabled package feed instead of one monolithic one.

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

SVN-Revision: 42002
10 years ago
John Crispin 18a4d9fded include/toplevel.mk: more chaos calmer renaming
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41871
10 years ago
Felix Fietkau ee4110aff0 target/sdk: use .config instead of unconditionally enabling all build dirs
Call make defconfig on every build to catch newly added packages

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

SVN-Revision: 39913
10 years ago
Felix Fietkau 1879c5f8e7 build: fix build on Mac OS X 10.9
Add a wrapper around the clang gcc emulation to fix -print-file-name=<lib>

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

SVN-Revision: 38560
11 years ago
Florian Fainelli c463728b2d build scripts: fix 'make defconfig' damage
Looking at the target 'defconfig' in include/toplevel, it doesn't
directly reference $(HOME)/.openwrt/defconfig nor does it reference any
prerequisites using it as a target.

Therefore, building "defconfig" as a target uses the defaults in the
tree, but not the defaults that a user might have explicitly specified.

This patch fixes this regression from r36361.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
[florian: apply with the proper patch level, wrap at 80 columns]
Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 37883
11 years ago
Felix Fietkau cf46e78b5f build: fix make defconfig
SVN-Revision: 36362
11 years ago
Felix Fietkau 9d5510a500 build: add new menuconfig code based on linux 3.9
SVN-Revision: 36361
11 years ago
Felix Fietkau a4c8d4e377 build: make the color of the 'configuration out of sync' warning red to make it harder for users to overlook
SVN-Revision: 36082
11 years ago
Jonas Gorski 45846230ab include/toplevel.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: 35716
11 years ago
Felix Fietkau b495423a22 build: increase file descriptor count limit for the build, some systems (e.g. Mac OS X default to 256, which is too little for some parallel builds)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 34023
12 years ago
Imre Kaloz c5e5e70ab0 it's time to break the barriers
SVN-Revision: 33666
12 years ago
Felix Fietkau 7950f996e0 build: pass MAKE_JOBSERVER via environment to avoid leaking it to error messages
SVN-Revision: 33521
12 years ago
Felix Fietkau c4198ce48d build: move the -j flag to package.mk instead of grabbing it from makeflags, otherwise it occasionally gets omitted on full builds
SVN-Revision: 33422
12 years ago
Felix Fietkau be6f437649 build: add a config option for passing the top-level make jobserver to packages that have parallel build enabled, significantly improves parallelization and gets rid of CPU overcommit during intra-package parallel builds
SVN-Revision: 33414
12 years ago
Felix Fietkau 6ae20bf412 scripts/config: build with gcc instead of clang on mac os x
SVN-Revision: 32749
12 years ago
Jo-Philipp Wich 64f5b45d8f toplevel.mk: unexport ARCH, it ends up in CONFIG_ARCH if defined and messes the buildroot up
SVN-Revision: 32663
12 years ago
Felix Fietkau 8068562453 build: prevent the environment variable CROSS_COMPILE from leaking into builds (fixes #11603)
SVN-Revision: 32081
12 years ago
Felix Fietkau fe99e3c5b5 make: do a better job of sanitizing LD_LIBRARY_PATH (fixes #8069)
SVN-Revision: 31780
12 years ago
Felix Fietkau 85f1a2c67a add further countermeasures against the git core.autocrlf option (fixes #9075)
SVN-Revision: 31650
12 years ago
John Crispin e8c19a56db prevent distro default LPATH from interfering
Attach patch unsets LPATH flag (found configured in some custom host
distributions) to make OpenWRT compile its toolchain without any issues.
LPATH is used on some distros to define the linkers search path.

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

SVN-Revision: 31203
12 years ago
Felix Fietkau 0cdeb6e4b2 build: unexport C_INCLUDE_PATH to prevent user settings from interfering with the build (fixes #9865)
SVN-Revision: 30830
12 years ago
Jo-Philipp Wich 690701d26e make prepare_kernel_conf target depend on quilt instead of sed. Preparing the source tree requires quilt and installing quilt implies installing sed.
SVN-Revision: 29697
13 years ago