Commit Graph

115 Commits (9601d94138de66e4fc9f55a08dfb348cdfcc3181)

Author SHA1 Message Date
Felix Fietkau 29b2199eb0 build: fix target metadata scan dependencies
Move SCAN_DEPS to scan.mk to eliminate redundancy with scripts/feeds
Add image/*.mk to SCAN_DEPS for targets to pick up newly added devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Alif M. Ahmad 23dd6db2ea include/toplevel.mk: Add xconfig target
Add xconfig target to include/toplevel.mk, so that ``make xconfig`` can
be invoked from $TOPDIR to use Qt based configuration tool to prepare
.config file.

The qconf related sources are taken from linux 4.9.13 archive.

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
7 years ago
Alexander Couzens acc5ab6b92
include/toplevel: set env GIT_ASKPASS=/bin/true
When git-https request a service (e.g. github) which ask for credentials
git will pass this request to the user resulting download.pl to wait for
user input. Set GIT_ASKPASS to stop asking.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Felix Fietkau 737b063cc2 build: ensure that flock is available for make download
It ensures that make download can parallelize downloads, even when some
packages download the same files (e.g. gcc/initial, gcc/final)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Sergey Ryazanov e06d8f0f6f build: new fixes for symlinked .config handling
When running "make {config|defconfig|oldconfig}" with symlinked .config
(e.g. to env/.config) it renames symlink to .config.old, creates new
.config file, and writes the updated configuration into it.

This breaks the desired workflow when changes in the configuration can
be checked using "scripts/env diff" and commited using "scripts/env
save". Since the env/.config file is not updated.

The things become even worse when working with feeds, since feeds script
quite often silently invokes "make {oldconfig|defconfig}" and breaks the
symlink.

Fix this issue by exporting KCONFIG_OVERWRITECONFIG=1, which forces
mconf to overwrite the .config content, instead of renaming it and
creating a new file. This variable is set only if .config is a symlink,
otherwise the variable is not exported and the old behaviour is
preserved.

This change uses the same behaviour as "make menucofig", which has
already been fixed in commit 5bf98b1acc.

Also make a tiny cosmetic update to the "make menuconfig" target code
layout to make it look like other config handling targets.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
7 years ago
Felix Fietkau ddbb036bbb build: allow val.% targets to bypass the prepare steps
Significantly reduces time spent processing those targets and should
also silence some log clutter which could confuse buildbot

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Sergey Ryazanov 5bf98b1acc build: fix symlinked .config handling
When running "make menuconfig" with symlinked .config (e.g. to
env/.config) it renames symlink to .config.old, creates new .config file
and writes updated configuration here.

This breaks the desired workflow when changes in the configuration could
be checked using "scripts/env diff" and commited with
"scripts/env save". Since the env/.config file is not updated.

Fix this issue by exporting KCONFIG_OVERWRITECONFIG=1, which forces
mconf to overwrite the .config content, instead of renaming it and
creating a new file. This variable is set only if .config is a symlink,
otherwise the variable is not exported and the old behaviour is
preserved.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
7 years ago
Felix Fietkau b044bd5921 build: remove package makefile overlay functionality
Recent attempts to use it have shown that it does not work properly
except for a few undocumented cases. It's better to remove this now to
avoid having more people fall into the same trap

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 9467ce42da build: get rid of host.mk
Defined required host related variables in toplevel.mk instead

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Baptiste Jonglez f938de7914 build: fix dependency of kernel_menuconfig target
When running "make kernel_menuconfig" in a clean tree, it fails with:

    make[1]: *** No rule to make target 'tools/quilt/install'.  Stop.

Replacing the dependency with 'tools/quilt/compile' fixes the issue (quilt
and all its prerequisites will be built, and quilt will be installed in
staging_dir).

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
7 years ago
Felix Fietkau d2ddda691e build: ensure that prereq-build is run before metadata scan from feeds (FS#367)
Fixes ./scripts/feeds update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
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>
7 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