summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* ptxdist: reorder icecc environment creationptxdist-2021.04.0Michael Olbrich2021-04-081-1/+3
| | | | | | | | | | | | Without this, clang may be missing from the environment. The problem is, that the real/clang symlink is provided by ptxd_lib_setup_target_wrapper because the clang from the toolchain can be used as a host compiler as well. So run ptxd_lib_setup_host_icecc later to ensure that this symlink was already created. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: cleanup lint outputMichael Olbrich2021-02-041-1/+4
| | | | | | | | | - shorten the error messages - just one error at the end instead of 3 different ones (from the function, make and ptxdist) Acked-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add new command 'lint'Michael Olbrich2021-02-011-0/+6
| | | | | | | | | | | For now it contains the following checks: - unused patch directories - use of undefined symbols in menu files - use of undefined kconfig symbols in rule files and other makefiles - use of undefined macros in rule files and other makefiles Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: fallback to icerun if icecc cannot be usedMichael Olbrich2021-01-221-0/+2
| | | | | | | | If icecc is disabled for packages or individual files, then use icerun instead. This that the local parallelization is still limited even if a significant number of files bypass icecc. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add cgdb commandMarian Cichy2020-10-301-2/+11
| | | | | | | | | | | | cgdb is a curses-frontend for gdb with some visual conveniences for debugging. ptxdist already has a 'ptxdist gdb' command to invoke gdb with configured sysroot etc., and it would be nice to have when we can also use cgdb. Signed-off-by: Marian Cichy <m.cichy@pengutronix.de> Message-Id: <20201028153543.5092-1-m.cichy@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* use '$(< ...)' instead catMichael Olbrich2020-08-151-2/+2
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: improve umask handlingMichael Olbrich2020-08-141-0/+18
| | | | | | | | | | | | | Currently any umask other than 0022 is not really supported. There is no check but strange things may happen, either at build-time or at runtime. Improve this by: - setting the umask to 0022 if it it currently more permissive - fail with a clear error message if it is more restrictive Expand the documentation to explain the new behaviour. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add licensecheck command for individual packagesMichael Olbrich2020-06-051-1/+8
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: print: handle empty shell variablesMichael Olbrich2020-06-051-1/+1
| | | | | | | | Shell variables can be defined but empty. In this case, don't try to handle the variable in 'make' but print the empty value instead. This is a lot faster for such variables, e.g. PTXDIST_COLLECTIONCONFIG. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: optimize ordering only when dependencies are neededRoland Hieber2020-05-291-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | There are use cases where -j is useful to have on the command line to speed up runs with large amount of packages, but when the install stages are not needed at all. For example: ptxdist -j license-check ptxdist -j make license-report ptxdist -j extract <long list of package names> Commit 2e695987211c2c2e6e19 ("ptxd_lib_dgen: add order-only dependency to extract") introduced better interleaving of extract stages to optimize IO load during full builds. This also had the effect that in the above cases all install stages of dependencies were built too, even when they are not needed at all. Improve those use cases by only optimizing the extract stage ordering if at least the prepare stage(s) of the packages being requested are needed (since the prepare stage depends on the install stages of dependencies, those will be needed anyway). Signed-off-by: Roland Hieber <rhi@pengutronix.de> Message-Id: <20200525202209.24858-1-rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add licensecheck commandRoland Hieber2020-05-291-0/+6
| | | | | | | | | | Make it possible to check all MD5 sums of license files by building all report stages without also building the license report (which produces tons of LaTeX output). Signed-off-by: Roland Hieber <rhi@pengutronix.de> Message-Id: <20200529091339.8396-1-rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* icecc: evaluate ICECC_VERSION path when neededMichael Olbrich2020-05-091-0/+1
| | | | | | | | | | | | This makes it possible to create the icecc environment later during building. This can be used by toolchain builds to generate the target environment after building the cross-compiler. Note: Using echo to set ICECC_VERSION= is ok here. If there is no environment then ICECC_VERSION points to a non-existing file and icecc will be disabled later. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: refactor wrapper & icecc setupMichael Olbrich2020-05-091-293/+13
| | | | | | | This just moves the code. No functional changes. This makes it possible to overwrite the wrapper and icecc setup in the BSP if necessary. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: wrapper: readd extra tools in wrapper dirMichael Olbrich2020-02-211-1/+1
| | | | | | | | This was broken in 3a08f00c1ba93127cd533b26852597e0a55076ce ("ptxdist: wrapper: handle toochain switching"). Don't just replace existing links, but add new ones as well. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: add python wrapperMichael Olbrich2020-01-231-0/+11
| | | | | | | | | It enforces a dependency on host-system-python{,3} and chooses the corresponding Python version when called as 'python'. This makes it possible to use Python 3 for packages that support it but use 'python' to support both Python versions. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: _get_config_ptx: fix --force logicRoland Hieber2019-11-171-1/+1
| | | | | | | | When --force is used to override that message, PTXDIST_FORCE is set to true in parse_first(), resulting in the message to be shown. Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: make 'drop' idempotent with enough --forceRoland Hieber2019-11-171-1/+1
| | | | | | | | | This should make 'drop' suitable for use in a scripting environment, e.g. equivalent to 'rm --force'. In this case, the following rm is actually a no-op, but the message after that is useful nevertheless. Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: setup_auto_version: always pick the correct versionMichael Olbrich2019-10-251-1/+1
| | | | | | | | Even if -f / --force is used. Otherwise, using --force for non-version related issues can have unexpected results because the wrong version is used. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: _check_config_platform: configfile_version should be localMichael Olbrich2019-10-251-0/+1
| | | | | | | It's not needed outside of the function and may not be set. Make it local to avoid unexpected effects in the future. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: _get_config_ptx: make sure configfile_version is always definedMichael Olbrich2019-10-251-5/+3
| | | | | | | It may be used outside the function, so check PTXDIST_FORCE only on failure. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* 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>