You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openwrt/scripts
Michal Sojka b1f102b03e scripts/feeds: Reuse TOPDIR if defined in environment
The feeds script sets value of TOPDIR in a way that is inconsistent
with how toplevel Makefile sets it. The inconsistency manifests when I
use a "build directory" with symlinks to LEDE source (see below).

When make is invoked in such a directory, make's TOPDIR variable is
set to that directory, whereas scripts/feeds sets TOPDIR to the top of
LEDE source, which results in creating feeds directory inside the LEDE
source instead of in the build directory.

This patch changes the script so that it reuses the TOPDIR value form
the environment if it exists. The result is that 'make
package/symlinks' correctly fetches feeds to the build directory
instead in the source.

I use the following commands to create the build directory:

    ln -s $SRC/config config
    ln -s $SRC/Config.in Config.in
    ln -s $SRC/feeds.conf.default feeds.conf.default
    ln -s $SRC/include include
    ln -s $SRC/Makefile Makefile
    mkdir package
    ln -s $SRC/package/base-files package/base-files
    ln -s $SRC/package/boot package/boot
    ln -s $SRC/package/devel package/devel
    ln -s $SRC/package/firmware package/firmware
    ln -s $SRC/package/kernel package/kernel
    ln -s $SRC/package/libs package/libs
    ln -s $SRC/package/Makefile package/Makefile
    ln -s $SRC/package/network package/network
    ln -s $SRC/package/system package/system
    ln -s $SRC/package/utils package/utils
    ln -s $SRC/rules.mk rules.mk
    ln -s $SRC/scripts scripts
    ln -s $SRC/target target
    ln -s $SRC/toolchain toolchain
    ln -s $SRC/tools tools

This allows me to easily test changes in LEDE on multiple targets.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
7 years ago
..
config scripts/config: properly handle select on symbols with unmet direct dependencies 8 years ago
flashing scripts: fix wrong usage of '==' operator 10 years ago
arm-magic.sh scripts/arm-magic.sh: make the generated kernels also include $IMG_PREFIX 9 years ago
brcmImage.pl scripts: avoid hard-coded paths in scripts 8 years ago
bundle-libraries.sh build: rework library bundling 7 years ago
checkpatch.pl docs: remove all refrences in Makefiles/scripts 8 years ago
clang-gcc-wrapper build: fix build on Mac OS X 10.9 11 years ago
clean-package.sh build: clean up stale files from a previous build when installing a package build to the staging dir 11 years ago
cleanfile scripts/{cleanfile,cleanpatch}: Add scripts for cleaning up file and patch whitespaces 11 years ago
cleanpatch scripts/{cleanfile,cleanpatch}: Add scripts for cleaning up file and patch whitespaces 11 years ago
combined-ext-image.sh build: use mkhash to replace various quirky md5sum/openssl calls 7 years ago
combined-image.sh build: use mkhash to replace various quirky md5sum/openssl calls 7 years ago
config.guess update config.guess & config.sub 9 years ago
config.rpath add config.rpath and link it in autotools.mk if missing, some packages might need it, especially users of lib-link.m4 or iconv.m4 13 years ago
config.sub update config.guess & config.sub 9 years ago
deptest.sh scripts: avoid hard-coded paths in scripts 8 years ago
diffconfig.sh scripts/diffconfig.sh: fix output if TARGET_PER_DEVICE_ROOTFS is set 8 years ago
dl_cleanup.py dl_cleanup: Fix linux blacklist 9 years ago
download.pl download.pl: fix detecting download errors with curl 7 years ago
env env: allow passing a commit message on save 9 years ago
ext-toolchain.sh treewide: replace jow@openwrt.org with jo@mein.io 8 years ago
feeds scripts/feeds: Reuse TOPDIR if defined in environment 7 years ago
fixup-makefile.pl build: add FIXUP option for make check 7 years ago
gen-dependencies.sh gen-dependencies.sh: fix handling variations in "file" output 7 years ago
get_source_date_epoch.sh scripts: get_source_date_epoch.sh: fix mercurial support, add mtime fallback 7 years ago
getver.sh scripts/getver.sh: append short git hash based on upstream commit 7 years ago
ipkg-build scripts: ipkg-build: do not require git or svn 8 years ago
ipkg-make-index.sh build: use mkhash to replace various quirky md5sum/openssl calls 7 years ago
kconfig.pl treewide: replace nbd@openwrt.org with nbd@nbd.name 8 years ago
make-ipkg-dir.sh branding: add LEDE branding 8 years ago
md5sum improve support for building on mac os x by improving detection of missing components 15 years ago
metadata.pm scripts/package-metadata.pl: fix kmod pakage dependencies within the SDK 8 years ago
mkhash.c build: add a small standalone utility for calculating md5/sha256 hash 7 years ago
mkits.sh scripts: avoid hard-coded paths in scripts 8 years ago
om-fwupgradecfg-gen.sh scripts/om-fwupgradecfg-gen.sh: add support for the A60 7 years ago
openbsd.sh branding: add LEDE branding 8 years ago
package-metadata.pl scripts/package-metadata.pl: fix overriding conditional dependencies with conditional select 7 years ago
pad_image scripts: avoid hard-coded paths in scripts 8 years ago
patch-kernel.sh scripts/patch-kernel.sh: remove -E flag to preserve empty files touched by patches 9 years ago
patch-specs.sh patch-specs.sh: gcc 3.4.6 has an additional "(OpenWrt-2.0)" after the version tag, cope with that 12 years ago
portable_date.sh scripts: fix GNU data invocation 8 years ago
redboot-script.pl scripts: avoid hard-coded paths in scripts 8 years ago
relink-lib.sh base-files: relink uclibc and libgcc libraries to remove leftovers of the statically linked initial libgcc saves a few kb and gets rid of unused not exported functions as well should also improve the reliability of mklibs 13 years ago
remote-gdb build: remove libc version suffix from build/staging directories 7 years ago
rstrip.sh rstrip.sh: fix handling variations in "file" output 7 years ago
slugimage.pl use #!/usr/bin/env perl instead of #!/usr/bin/perl in openwrt scripts (fixes #2998) 16 years ago
srecimage.pl treewide: replace jow@openwrt.org with jo@mein.io 8 years ago
strip-kmod.sh scripts/strip-kmod.sh: remove a few extra sections to slightly reduce kernel module size 8 years ago
symlink-tree.sh docs: remove all refrences in Makefiles/scripts 8 years ago
sysupgrade-tar.sh build: rename sysupgrade-nand to sysupgrade-tar 8 years ago
target-metadata.pl build: add buildbot specific config option for setting defaults 7 years ago
timestamp.pl fix timestamp checks for build system paths which have '.svn' in their directory name 14 years ago
ubinize-image.sh scripts/ubinize-image.sh: add support for adding custom partitions 8 years ago