summaryrefslogtreecommitdiffstats
path: root/bin/ptxdist
Commit message (Collapse)AuthorAgeFilesLines
* ptxdist: help: --force also exists as the short option -fRoland Hieber2019-03-011-1/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add new command 'bsp-info'Michael Olbrich2019-02-201-0/+6
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add --progress optionMichael Olbrich2018-12-061-0/+5
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: ignore /dev/null symlinks when looking for config filesMichael Olbrich2018-11-151-4/+4
| | | | | | | This can happen if the top layer would have an empty diff and on the next lower layer the config is a /dev/null symlink. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: run the trap handler before executing the correct ptxdist for ↵Michael Olbrich2018-11-141-0/+2
| | | | | | | | | --auto-version Without this $PTXDIST_TEMPDIR is never deleted and remains as a empty directory. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: handle --autoversion and non-directory 'base' in the BSPptxdist-2018.11.0Michael Olbrich2018-11-071-0/+3
| | | | | | | Pre-layer BSPs may contain a 'base' that is not a layer directory. Ignore it for --autoversion. The next ptxdist will check again if necessary. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add --dirty optionMichael Olbrich2018-10-171-0/+6
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: impove error message for config failuresMichael Olbrich2018-10-171-1/+1
| | | | | | | Use the command-line order for 'config' and 'part'. Drop whitespace if 'part' is empty. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: rename PTX_FORCE -> PTXDIST_FORCE for consistency and export itMichael Olbrich2018-10-171-7/+8
| | | | | | | All other variables like this start with PTXDIST_. Export it, so it can be used later during the build. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: handle explicit ptxdist layer with --auto-versionMichael Olbrich2018-10-121-18/+36
| | | | | | | If the last explicit layer is PTXdist then this exact version should be used, regardless of the version in the config file. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: fix PTXDIST_TOPDIR as explicit last layerMichael Olbrich2018-10-121-4/+5
| | | | | | | | | | | | | If PTXdist is an explicit last layer, then it is often a symlink. PTXDIST_TOPDIR is always resolved with 'realpath', so do the same when setting up the layers. Make sure that the last path in PTXDIST_LAYERS is exactly PTXDIST_TOPDIR. This is needed used in other places (e.g. ptxd_kconfig_update()). This also fixes calling ptxdist from PTXDIST_TOPDIR when $PWD != `realpath $PWD`. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: make sure PTXDIST_PTXCONFIG/PTXDIST_PLATFORMCONFIG are never emptyMichael Olbrich2018-10-031-0/+2
| | | | | | | | | Before the introduction of layers, these variables referred to the nonexistent selected_* link if no config was selected of found. The corresponding error handling rely on the behaviour. Restore this behaviour to get the correct error message. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: improve layer error messageMichael Olbrich2018-09-281-1/+1
| | | | | | | This only happens if the path exists but is not a directory, e.g. a broken link or a file. Change the error message to make this clearer. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: find config files in multiple layersMichael Olbrich2018-09-201-25/+88
| | | | | | | | | | | | | | This is the first step to support layers in PTXdist. A layer is just a subdirectory (or symlink) named 'base' in the BSP workspace. Each layer looks just like another BSP. The first layer is implicitly or explicitly PTXdist itself. Automatic config file detection works as before in the last layer. If no config file is found, then the previous tlayer is checked the same way, and so on. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add package-info commandMichael Olbrich2018-09-191-0/+10
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* improve dependency handlingMichael Olbrich2018-07-101-1/+0
| | | | | | | Check the content of make and in files for packages in addition to the package options to trigger the prepare stage. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* remove old base platform codeMichael Olbrich2018-06-041-54/+5
| | | | | | It's obsolete and broken. dev packages should be used instead. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: remove 'clone' and 'projects' commandsMichael Olbrich2018-05-311-84/+2
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* remove obsolete and broken klibc/initramfsMichael Olbrich2018-05-301-3/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: autobuild is long goneMichael Olbrich2018-05-301-1/+0
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* improve feature requested by molRoland Hieber2017-12-051-2/+2
| | | | | | References: commit c22b59105d7596ee7ae561f9aa68c45355672620 Signed-off-by: Roland Hieber <r.hieber@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* PTXdist: add virtual environment awarenessJuergen Borleis2017-11-171-1/+19
| | | | | | Required to work with local python tools. Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
* ptxdist: fix printing variables that are not valid shell variable namesMichael Olbrich2017-10-211-1/+1
| | | | | | | | Otherwise printing variables such as PACKAGES-y fails with ptxdist: line 2042: PACKAGES-y: bad substitution Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add documentation for -j to --helpMichael Olbrich2017-09-151-1/+4
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: handle symlinks correctly when comparing PTXDIST_TOPDIR and ↵Michael Olbrich2017-07-141-1/+1
| | | | | | | | | | | | PTXDIST_WORKSPACE PTXDIST_TOPDIR is set to based on the path to ptxdist with all symlinks resolved. PTXDIST_WORKSPACE is set to the current working directory. If this path contains symlinks then comparing the strings does not work as expected. Use '-ef' instead to check if both paths point to the same directory. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add gdb commandMichael Olbrich2017-06-211-0/+6
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: add gdb wrapperMichael Olbrich2017-06-211-1/+1
| | | | | | Add arguments to set sysroot and debug-file-directory. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_compile.sh: conditionally redirect stderr>stdoutJon Ringle2017-06-021-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ptxdist: remove license report files during 'clean'Michael Olbrich2017-04-111-0/+2
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* create_docs: fix copy destinationBastian Stender2017-01-041-1/+1
| | | | | | | | | Collecting files from doc/_static in a BSP lead to two nested _static directories. This results in broken javascript and image links in the html documentation. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: improve 'print' handlingMichael Olbrich2016-11-291-2/+2
| | | | | | | | | | 'print-%' does not match 'print-/some/path'. This would be useful to debug the tarball/package mappings that are defined as '$(<PKG>_SOURCE) = <PKG>'. Using '/print-%' instead seems to work better. Use it but keep the old patterns for backwards compatibility. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* bin/ptxdist: setup_libs: add missing ;Marc Kleine-Budde2016-11-231-1/+1
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* ptxdist: try harder to detect if a new icecc environment must be createdMichael Olbrich2016-11-111-3/+9
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* create_docs: create srcdir recursivelyRoland Hieber2016-11-111-1/+1
| | | | | | | | This allows to build the documentation on a fresh tree when platform-dir/ does not exist yet Signed-off-by: Roland Hieber <rohieb@rohieb.name> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: use PTXCONF_SETUP_HOST_MAKE to check if --output-sync is supportedMichael Olbrich2016-10-301-1/+1
| | | | | | That's the make version that is used later with the detected argument. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add urlcheck commandMichael Olbrich2016-09-021-3/+5
| | | | | | | | | | Checking if an archive is available without downloading it is difficult and not 100 percent reliable. For best result curl needs to fail for error http status codes (--fail) and follow redirects (--location). A HEAD request (--head) is used to avoid downloading the whole file, but we send a GET anyways (--request GET) because some servers don't allow HEAD requests. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: document 'get' without argumentMichael Olbrich2016-09-021-0/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: implement image specific nfsrootMichael Olbrich2016-08-011-0/+2
| | | | | | | | | | | | For the simple use-case (the rootfs contains all packages) the normal nfsroot works well. However, this is not useful to work with root filesystems that contain only a subset of all packages. With this change, if <IMAGE>_NFSROOT can be set to 'YES' then <platformdir>/nfsroot/<image> will be filled with the files from only the packages that are part of this image. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* root-debug: remove it everywhereMichael Olbrich2016-07-231-3/+2
| | | | | | | | | | | Separate debug files in .debug/ directories in root/ have been available for some time. This is supported by all modern toolchains and much less confusing. Remove all references to root-debug except for cleaning: This way there won't be old root-debug/ directories lying around after upgrading and running 'ptxdist clean' or 'ptxdist clean root'. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* doc: latex improvementsMichael Olbrich2016-06-211-0/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add support for BSP specific documentationMichael Olbrich2016-06-201-0/+34
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: fix --no-output-syncMichael Olbrich2016-05-271-0/+3
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add --output-sync optionMichael Olbrich2016-05-261-1/+20
| | | | | | | | Calling make with --output-sync=... can have unexpected effects. So don't enable it by default for parallel building. Instead this adds an option for this and enables it by default for quiet builds. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: improve output ordering for parallel buildingMichael Olbrich2016-05-171-0/+4
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add support for alldefconfigMichael Olbrich2016-05-041-3/+4
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: use all tools via wrapper linkMichael Olbrich2016-01-121-5/+8
|
* ptxdist: show short error message for unknown argumentsMichael Olbrich2015-12-031-1/+4
| | | | | | | | The full 'usage' text is rarely useful because this is often triggered by typos. Print the unknown argument instead and a hint where to find more information. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: show man page for '--help'Michael Olbrich2015-12-031-1/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: rework 'print' commandMichael Olbrich2015-10-271-0/+3
| | | | | | | | | | | | - avoid "recipe for target '...' failed" messages - generate '<variable>=<value>' when running in verbose mode - produce and empty value instead of an error when "-k" is used This makes is possible to use $ ptxdist -v--k make print-<VAR1> print-<VAR2>·... to dump a useful list of many variables that may or may not be defined. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: run compiler setup for 'get'Michael Olbrich2015-07-301-1/+1
| | | | | | | It may be needed in case a tarball depends on a host package. This is currently true for the nodejs modules. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>