summaryrefslogtreecommitdiffstats
path: root/bin/ptxdist
Commit message (Collapse)AuthorAgeFilesLines
* ptxdist: dump icecc-create-env output when it failsptxdist-2019.10.0Michael Olbrich2019-10-101-6/+15
| | | | | | | | Save the output of icecc-create-env and dump it when creating the environment fails. The output may contains important error messages that can be used to fix the problem. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: improve variable printingMichael Olbrich2019-10-031-11/+23
| | | | | | | | | This adds a new 'printnext' command. It prints the value of the value of the variable. The print code is refactored to allow this. The make error must be parsed to determine which variable is undefined. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: wrapper: handle toochain switchingMichael Olbrich2019-09-071-1/+7
| | | | | | | | Correctly update all symlinks and remove any that don't exist in the new toolchain. Without this, all extra tool links will still point to the old toolchain. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: enable clang with iceccMichael Olbrich2019-09-071-1/+20
| | | | | | | | | | | | | | | This is a bit more complicated. The symlink for clang that is passed to icecc-create-env must contain a proper cross-compile prefix. Otherwise, querying 'as' will return the wrong path (host instead of the toolchain 'as'). The same happens for 'objcopy'. In addition icecc-create-env for all releases including 1.2 is broken and resolves the symlink first, so the created environment contains the wrong 'as'. So ptxdist needs a check for this and disable icecc clang support if necessary. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: add support for clang with OSELAS.ToolchainMichael Olbrich2019-09-071-0/+11
| | | | | | | | | | | | | | | This is a bit complex: Clang does not have default CPU features that can be specified at build-time. Instead the some features are derived from the compiler name (e.g. via a symlink with target triple). Others must be specified on the command-line (e.g. -mfpu=...). The toolchain provides wrapper scripts with the target triple to do this. However, using those is incompatible with icecc, because this only works if the actuall binary is called. So we let the toolchain provide the extra options and call clang directly. And fall back to just the target triple if necessary. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: try harder when looking for a toolchainMichael Olbrich2019-09-041-2/+2
| | | | | | | The next OSELAS.Toolchain may contain an extra component (for clang) in the path. Add an extra '*' to the pattern to match those toolchains as well. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* treewide: remove all leftover references to "u-boot-v2"Roland Hieber2019-08-241-14/+1
| | | | | | Fixes: 8def36f40f44f2cdb83c ("u-boot-v2: remove in favor of barebox") Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: document 'getdev' actionRoland Hieber2019-08-241-0/+1
| | | | | Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: fix ptxdistrc handling if no old config existsMichael Olbrich2019-07-181-1/+1
| | | | | | | | | | tmpptxrc is always set, but the file may not exist. So check for existence instead. Without this, ptxdist fails to start if ~/.ptxdist does not exist, or is empty. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: fix autoversion ptxconfig handlingMichael Olbrich2019-06-061-1/+3
| | | | | | | | | | | | | | | | | | The autoversion was changed to pick the version from the bottom layer. This is accomplished by temporarily using the ptxconfig from that layer. If the version is already correct, then no new ptxdist is executed. As a result, the ptxconfig from the bottom layer is used. This fails with: ptxdist: error: The selected config file: ptxdist: error: BSP/base/configs/ptxconfig ptxdist: error: is overwritten by: ptxdist: error: BSP/configs/ptxconfig ptxdist: error: The config file in the outer layer must be used! Fix this by switching back to the correct ptxconfig after fetching the version from the config. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: refactor ptxdistrc handlingMichael Olbrich2019-06-041-33/+54
| | | | | | | | | | The ptxdistrc is needed twice. First during the early environment setup to extract the environment variable whitelist and later to load the full config. Combine this into a single function that can be called multiple times. This will allow extending the ptxdistrc handling later. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: clean root should clean all image packages tooRoland Hieber2019-05-241-0/+2
| | | | | | | | The images are already removed by 'clean root', so the image packages are built again anyways on the next build. Remove all left-over state for the image packages too, as those files are now useless. Signed-off-by: Roland Hieber <rhi@pengutronix.de>
* ptxdist: introduce the "clean target" subcommandRoland Hieber2019-05-241-0/+16
| | | | | Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: allow overwriting wrapper scripts in the BSPMichael Olbrich2019-05-171-2/+6
| | | | | | | | This makes it possible to overwrite individual wrapper scripts in the BSP. Copy the files instead of using symlinks now. This is necessary to find libwrapper.sh by resolving all links. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: autoversion: the bottom layer decides the versionMichael Olbrich2019-05-161-3/+7
| | | | | | | | | If different layers in a BSP use different PTXdist versions then the bottom layer decides which version to use. This can happen during version migration. It allows upper layers to automatically follow version changes of the lower layers. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* kconfig: warnings are errors unless PTXDIST_FORCE is setMichael Olbrich2019-05-101-0/+3
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: always check if PTXDIST_ICECC_REMOTE_CPP should be setptxdist-2019.05.0Michael Olbrich2019-05-031-3/+3
| | | | | | | The check is in the wrong place and PTXDIST_ICECC_REMOTE_CPP is only set when new icecc environments are built. Make sure it happens every time. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: build with -Wno-implicit-fallthrough if necessaryMichael Olbrich2019-05-011-0/+3
| | | | | | | | | | If icecc does not support remote cpp or if it is disabled then implicit fallthrough warnings may occur because the corresponding comments are no longer available. In combination with -Werror this can cause build errors. So disable implicit fallthrough in this case to avoid the errors. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: cleanup before executing gdbMichael Olbrich2019-03-211-0/+1
| | | | | | | Otherwise the temporary files are not deleted and the logfile close marker is not written. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add PTXDIST_ENV_WHITELIST to the whitelistMichael Olbrich2019-03-211-1/+1
| | | | | | | | This is necessary to the whitelist to work in combination with --auto-version. Otherwise the whitelist itself is not propagated to the second ptxdist. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* 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>