summaryrefslogtreecommitdiffstats
path: root/scripts/libptxdist.sh
Commit message (Collapse)AuthorAgeFilesLines
* ptxd_source_kconfig: dont't suppress errorsChristian Hermann2019-05-171-1/+1
| | | | | | | | | | In case of any issue with `selcted_*` (non-exising for example), it failed (silently at the bottom of ./ptxdist) showing only > PTXdist: fatal error ... cannot start, sorry! which isn't helpful, so let's see the real error as well. Signed-off-by: Christian Hermann <christian.hermann@hytera.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* introduce ptxd_replace_copy_from_path()Michael Olbrich2019-05-171-0/+24
| | | | | | | New helper to find a file with ptxd_in_path() and then atomically replace the target file. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add --progress optionMichael Olbrich2018-12-061-0/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_log: redirect stdin to /dev/null for -qMichael Olbrich2018-11-231-0/+2
| | | | | | | This ensures that nothing waits for user input. Any output that requests the input will not be visible anyways. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_get_path_filtered: define new helper functionMichael Olbrich2018-11-151-0/+27
| | | | | | | It is mostly the same as ptxd_get_path() but it filters out any results that are symlinks to /dev/null. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_warning: allow multi-line warnings and backslash escapesMichael Olbrich2018-10-171-1/+4
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_{extract,patchin}: handle lndir:// like file://Michael Olbrich2018-10-091-0/+1
| | | | | | | PTXDIST_PATH_LAYERS is used to find the absolute path for Relative file:// URLs. Do the same thing for lndir://. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptx/in-platformconfigdir: rewrite in makeMichael Olbrich2018-10-091-0/+3
| | | | | | This is a lot faster than starting a shell. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptx/in-path: rewrite in makeMichael Olbrich2018-10-091-0/+2
| | | | | | This is a lot faster than starting a shell. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_file_url_path: add layer support for relative file URLsMichael Olbrich2018-09-211-1/+5
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_kconfig: move to a separate scriptMichael Olbrich2018-09-201-193/+0
| | | | | | Just move the functions and whitespace changes. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* rules: implement & use ptx/in-platformconfigdirMichael Olbrich2018-09-201-0/+29
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_in_path: expand relative paths with PTXDIST_PATH_LAYERSMichael Olbrich2018-09-201-2/+20
| | | | | | | This is needed to support layers in custom search paths, e.g. in PTXCONF_DTC_OFTREE_DTS_PATH. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_get_alternative: add layer supportMichael Olbrich2018-09-201-14/+25
| | | | | | | | This just extends the search list to include all layers. Each layer has the usual BSP search paths. If a file is not found on one layer, then the previous layer is checked. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_print_path: handle layers correctlyMichael Olbrich2018-09-201-1/+1
| | | | | | | | | | | 'oldconfig' is executed recursivly. Each time, the last layer is removed from PTXDIST_PATH. As a result, ptxd_print_path will produce paths starting with 'base/' in the current layer. Also, any platformconfigdir or layer paths are not used anyways, because the workspace matches first. So just use the workspace and topdir explicitly. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_bailout: support multi-line error messagesMichael Olbrich2018-09-201-5/+21
| | | | | | | Each argument is printed as one line. If the last argument is a number, then it is uses as exit code. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_bailout: add empty lines to make error messages more visibleMichael Olbrich2018-09-191-2/+2
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* scripts: fix position sensitive options for tar 1.30Michael Tretter2018-01-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | tar 1.30 reports position sensitive options and returns with an error code. This causes the following error during barebox prepare. tar: The following options were used after any non-optional arguments in archive create or update mode. These options are positional and affect only arguments that follow them. Please, rearrange them properly. tar: --exclude '.svn' has no effect tar: --exclude '.pc' has no effect tar: --exclude '.git' has no effect tar: --exclude '*.in' has no effect tar: --exclude '*.in.*' has no effect tar: --exclude '*/*~' has no effect tar: Exiting with failure status due to previous errors Reorder the arguments to tar and put the --exclude arguments before the current directory. Signed-off-by: Michael Tretter <michael.tretter@posteo.net> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* scripts: consolidate file URL usageMichael Olbrich2017-11-231-0/+12
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_log: order bailout messages correctlyMichael Olbrich2017-06-211-8/+4
| | | | | | | | | | | | This basically reverts bf1a5b588e4c1b0ac7dbfd52d4acb4c0d1b81539 ("ptxd_make_log: improve output handling") and implements it differently. Showing the bailout message even when quiet is enabled is good, but using the error path breaks the ordering in the logfile when output-sync is enabled. Use the normal output explicitly write the message to stdout if quiet is enabled. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_log: improve output handlingMichael Olbrich2017-06-141-1/+8
| | | | | | | | Make it possible to use PTXDIST_FD_LOGERR to bypass output redirection. Ensure that ptxd_bailout() output is always logged and printed to the console. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_compile.sh: conditionally redirect stderr>stdoutJon Ringle2017-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I discovered after updating to a new version of ptxdist that all of my compile output including errors/warnings are now all going to stdout instead of having the errors/warning going to stderr. This is causing some problem when I use qtcreator as my IDE because qtcreator will only filter stderr for errors/warnings to put into the Issues tab, where one can simply click on the error/warning and be taken right to the source line where the error/warning is found. I found that this problem was introduced by commit 30b9267e35eea1c2edb4da0231a428bfa25b6766 This patch will conditionally redirect stderr>stdout on compile output if ptxdist has output synchronization enabled. This small program demonstrates the behavior with this patch applied: $ cat local_src/testprog/testprog.c int main(int argc, char *argv[]) { printf("Hello World, I'm testprog!\n"); exit(EXIT_SUCCESS); } $ ptxdist compile testprog >/dev/null testprog.c:4:2: error: #error An error here #error An error here ^ make[1]: *** [testprog] Error 1 make: *** [/home/jringle-admin/code/gpec/ec1k-rootfs/platform-EC1K/state/testprog.compile] Error 2 $ ptxdist compile --output-sync testprog >/dev/null make: *** [/home/jringle-admin/code/gpec/ec1k-rootfs/platform-EC1K/state/testprog.compile] Error 2 $ ptxdist compile --no-output-sync testprog >/dev/null testprog.c:4:2: error: #error An error here #error An error here ^ make[1]: *** [testprog] Error 1 make: *** [/home/jringle-admin/code/gpec/ec1k-rootfs/platform-EC1K/state/testprog.compile] Error 2 Signed-off-by: Jon Ringle <jringle@gridpoint.com> [mol: bailout to PTXDIST_FD_STDERR and more cleanup] Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_kconfig: avoid duplicate workMichael Olbrich2017-05-261-20/+23
| | | | | | | This is called 4 times before 'make' is executed. No need to do this multiple times. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_verbose: verbose log to stdoutMichael Olbrich2017-04-121-1/+1
| | | | | | stderr goes to the shell when quite is enable and that is not wanted here. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* use ^_ as separator in perms filesLadislav Michl2016-08-121-1/+0
| | | | | | | | Change separator to allow ':' in filenames. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> [mol: fix old perm file detection] Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* kconfig: update to latest versionMichael Olbrich2016-05-131-1/+2
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add support for alldefconfigMichael Olbrich2016-05-041-11/+2
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_kconfig: allow the BSP to overwrite kconfig subtrees in config/Michael Olbrich2015-08-041-1/+10
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add option for global parallel buildingMichael Olbrich2015-05-261-1/+1
| | | | | | | With this option enabled the make jobserver is shared between outer and inner 'make' to optimize parallel building. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: apply load limit to outer make as wellMichael Olbrich2015-05-261-1/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_kgen: optimizeMichael Olbrich2014-06-301-1/+1
| | | | | | | The generated Kconfig files for the sections don't change during on ptxdist run. There is no need to generate those more than once. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* libptxdist: remove some useless echoMichael Olbrich2014-06-101-4/+3
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: atomically replace wrapper linksMichael Olbrich2014-02-251-0/+12
| | | | | | | This way, it should be possible to call e.g. 'ptxdist kernelconfig' while 'ptxdist go' is still running. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_in_path: don't add trailing '/'Michael Olbrich2013-06-111-1/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add randconfig optionMichael Olbrich2013-04-141-0/+3
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* move ptxd_abs2rel to libptxdist.shMichael Olbrich2012-12-171-0/+44
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_verbose: fix logfile file descriptorMichael Olbrich2012-12-141-1/+1
| | | | | | | | Redirecting with ">&${PTXDIST_FD_LOGFILE}" would be better, however this does not work if the function using it is define outside of 'make' and then called inside 'make'. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: cleanup output redirectionMichael Olbrich2012-12-131-27/+23
| | | | | | | | | 5, 6 and 7 are also used in configure scripts, so avoid those. Allocate PTXDIST_FD_STDOUT and PTXDIST_FD_STDERR dynamically Set PTXDIST_FD_LOGFILE=9 so the wrapper works when 'dash' is /bin/sh for the wrapper scripts: dash only works with 0-9 for fd redirection. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* libptxdist: add ptxd_get_kconfigMichael Olbrich2012-09-121-19/+24
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* libptxdist: verbose: only use fd 7 when it's setupMarc Kleine-Budde2012-09-061-1/+1
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* libptxdist: really fix verbose printingMichael Olbrich2012-09-031-1/+1
| | | | | | PTXDIST_VERBOSE is set to '0' or '1' Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* libptxdist: fix verbose printingMarc Kleine-Budde2012-08-011-1/+1
| | | | | | | PTXDIST_VERBOSE is set to "1" when enabled, not "true". So test for non zero length instead of true. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* ptxdist: add --verbose option and start using itMichael Olbrich2012-07-291-0/+22
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* libptxdist: add file descriptor to log only to the logfileMichael Olbrich2012-07-291-1/+2
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_abspath: fix for directories ending with '..'Michael Olbrich2012-06-131-2/+9
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_init_sysroot_toolchain: improve sysroot detectionMichael Olbrich2012-06-131-0/+24
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* libptxdist: define ptxd_get_alternativeMichael Olbrich2012-06-131-0/+30
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_replace_magic: allow lowercase magicMichael Olbrich2011-12-171-2/+2
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* libptxdist: improve version compareMichael Olbrich2011-12-091-5/+7
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_ipkg_rev_smaller: fix compareBenoît Burnichon2011-12-051-13/+63
| | | | | | | | | Derived from solution of the script given in the following thread: http://list.us.dell.com/pipermail/dkms-devel/2004-July/000142.html Porting it to ptxdist. Signed-off-by: Benoît Burnichon <benoit.burnichon@airtag.com>