summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* ptxd_lib_dgen: fix <PKG>_CONFIG handlingptxdist-2019.10.1stable/ptxdist-2019.10.xMichael Olbrich2019-10-171-3/+4
| | | | | | | | | Don't evaluate <PKG>_CONFIG when it's not needed and only undefine it when the variable is actually empty. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> (cherry picked from commit 08f7e13bb0558eca32c5ed7a69c2b03ab30c3d34) Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_init: unset MAKELEVELMichael Olbrich2019-10-101-0/+3
| | | | | | | | MAKELEVEL is incremented for each sub-make call. The ptxdist make should not be counted because this can confuse package makefiles that use this variable to detect the make recursion level. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: make sure the package license report is regenerated as neededMichael Olbrich2019-10-101-1/+4
| | | | | | | Add the dependency on the cfghash for <pkg>.report as well to ensure that changes to <PKG>_LICENSE* are noticed. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* pkg-config-wrapper: remove sysroot only from specified variablesMichael Tretter2019-10-081-3/+3
| | | | | | | | | | | | | | | | | The PTXDIST_PKG_CONFIG_VAR_NO_SYSROOT variable allows to specify pkg-config variable that shall be relative to the target rootfs and not contain the sysroot path. This is important for variables that are used for writing files to the target rootfs, e.g., systemduserunitdir. Currently, the sysroot is removed from all pkg-config variables, if PTXDIST_PKG_CONFIG_VAR_NO_SYSROOT is set, but packages already specify the name of the variable that must not include the sysroot. Add a check to remove the sysroot only from variables that are actually contained in PTXDIST_PKG_CONFIG_VAR_NO_SYSROOT. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: make sure <PKG>_CONFIG is only evaluated onceMichael Olbrich2019-10-061-0/+3
| | | | | | | | | Packages may define <PKG>_CONFIG with '=' to avoid evaluating a complex shell call if the package is not selected. However, this means the variable is evaluated multiple time if the package _is_ selected. Avoid this by overwriting the variable with itself using ':='. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: remove unnecessary dependency on the config filesMichael Olbrich2019-10-061-9/+0
| | | | | | The config file is part of the hash. No need to depend on it. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: speed up hash generationMichael Olbrich2019-10-062-7/+77
| | | | | | | | | | To create the hash for patch files, ptxdist executes several processes for each package with patches. With many packages with patches, this creates quite a lot of startup overhead. To avoid this, collect all patch directories first and handle them with an extra awk script and one find call. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_patchin: allow specifying a custom patch directoryMichael Olbrich2019-10-032-5/+10
| | | | | | | | If <PKG>_PATCHES is set, then it is used instead of $(<PKG>) to find the patch directory. It must be a relativ directory name that can be found in the usual search path. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* rules: add PTX_PACKAGES_ALL and PTX_PACKAGES_DISABLEDMichael Olbrich2019-10-031-0/+3
| | | | | | | | | | | Note: we cannot determine PTX_PACKAGES_DISABLED using PACKAGES- etc. With the way various packages handle platform specific exceptions, this would result in missing or dplicate packages. Instead, list all packages in ptxd_lib_dgen and filter out the enabled packages. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_kconfig: handle oot builds correctlyMichael Olbrich2019-09-281-0/+1
| | | | | | | | ptxd_make_world_kconfig() ist used for <pkg>_oldconfig targets. For packages that build out-of-tree the pkg_build_dir may not yet exist so create it if necessary. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* host-meson: version bump 0.49.2 -> 0.51.1Lucas Stach2019-09-281-1/+1
| | | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> [mol: set CMAKE=false, otherwise preparing most packages will fail] Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_init: fix parallel building with ninja without jobserverMichael Olbrich2019-09-281-2/+4
| | | | | | | | Without jobserver, the correct PTXDIST_PARALLELMFLAGS_INTERN must be preserved. Otherwise ninja will just use the default. This is especially important when '-j1' or '-ji1' is used for debugging. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_normalize_config: fix typo in variable nameRoland Hieber2019-09-191-11/+11
| | | | | | | A simple s/nomalized/normalized/g in that function did the trick. Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_prepare_init: allow keeping the build tree during prepare ↵Michael Olbrich2019-09-162-4/+8
| | | | | | for oot packages Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_install_post: check the correct path before replacing itMichael Olbrich2019-09-161-1/+1
| | | | | | | | The symlink is '.${pkg_label}' so check for this instead of '${pkg_label}'. Earlier revisions of the original patch used '${pkg_label}' and not all occurrences where replaced. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_clean_sysroot: don't change the current directoryMichael Olbrich2019-09-161-5/+4
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_meson_cross_file: use ptxd_get_alternative to allow a custom ↵Michael Olbrich2019-09-111-1/+3
| | | | | | cross-file.meson Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: handle removed patches betterMichael Olbrich2019-09-081-2/+3
| | | | | | | | | | If all patches for a package are removed then the package is currently not reextracted because the .srchash dependency is just dropped and not changed. Fix this by defining a fake hash. This way the dependency changes and the package is extracted again. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: add support for clang with OSELAS.ToolchainMichael Olbrich2019-09-078-10/+64
| | | | | | | | | | | | | | | 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>
* ptxd_make_world_prepare/install/clean: sanitize sysrootMichael Olbrich2019-09-063-9/+31
| | | | | | | | | | | | | | | After a version bump or package configuration changes, files from the previous version may still be in sysroot. This can cause all kinds of problems. Also, some packages fail to build if sysroot contains the files from the same packages but with a different configuration. To avoid this, do the following: - remember <PKG>_PKGDIR in a way to find the old path after a version bump - remove all files of a packages from sysroot at the beginning of the prepare stage and the install stage Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* configure_helper: add cmake supportMichael Olbrich2019-09-051-6/+78
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_normalize_config: handle symlinks in the workspace path correctlyptxdist-2019.09.0Michael Olbrich2019-09-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the workspace path contains a symlink, which means "${PTXDIST_LAYERS[0]}" != $(readlink -f "${PTXDIST_LAYERS[0]}") and 'base' is a symlink to another subdirectory of the workspace, then ptxd_normalize_config() returns the wrong result: For example: PTXDIST_WORKSPACE = /tmp/link/BSP $(readlink -f $PTXDIST_WORKSPACE) = /tmp/real/BSP $(readlink -f $PTXDIST_WORKSPACE/base) = /tmp/real/BSP/layer file_dotconfig = /tmp/link/BSP/base/configs/ptxconfig After the first loop iteration: nomalized = /tmp/link/BSP/layer/configs/ptxconfig For the next loop iteration the substitution fails because now $nomalized contains a symlink. As a result, ptxd_normalize_config() returns the wrong path. Fix this by checking if the original resolved path is within each layer and update $nomalized if that is the case. This way the path is normalized correctly even if other layers patch as well. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* migrate_ptx: fix typos in reason commentsRoland Hieber2019-07-161-6/+6
| | | | | Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* sqlite: fix typo in option SQLITE_LOAD_EXTENTIONRoland Hieber2019-07-161-1/+9
| | | | | Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_kconfig_create_config_merge: fix merging options that start with the ↵Michael Olbrich2019-07-081-1/+1
| | | | | | | | | | | | | | symbol prefix The 'config' script removes the CONFIG_ or PTXCONF_ prefix automatically if an argument starts with it. Currently ptxd_kconfig_create_config_merge() also removed the prefix when collecting the 'config' arguments. This breaks if the actual symbol starts with the prefix. In this case, the prefix is removed twice. To fix this, pass the unmodified string and let 'config' remove the prefix for all of them. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_xpkg_prepare: allow /dev/null overwrites for pre/post scriptsMichael Olbrich2019-07-041-1/+2
| | | | | | | Allow disabling {pre,post}{inst,rm} scripts by providing a local symlink to /dev/null. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* CREDITS: remove unmaintained fileRoland Hieber2019-07-0356-114/+0
| | | | | | | | | | | | | | | This file has been touched 2 times in the last 7 years, and is no longer up to date. Remove it to carry less unmaintained stuff around. Also remove all references to it from file headers using for file in `g grep -l 'See CREDITS for details about who has'`; do sed -i '/See CREDITS for details about who has/,+1d' $file done as well as the different wording from rules/other/Toplevel.make. Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_init: don't let meson use cmakeMichael Olbrich2019-07-031-1/+1
| | | | | | | | | This might circumvent pkg-config blacklisting. This is needed only for host packages. For target packages cmake is already not in use because it is not defined in the cross file. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* libwrapper: don't add linker arguments for preprocessingMichael Olbrich2019-06-201-1/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: error out for targetinstall stages in host/cross/image packagesRoland Hieber2019-06-121-0/+14
| | | | | | | | | | This point came up multiple times in the past and the special handling of targetinstall stages lead to confusion when trying to depend on image packages. Document it to prevent further confusion in that matter, and warn the user if such a make target exists. Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: fix typosRoland Hieber2019-06-121-1/+1
| | | | | Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: add line counterRoland Hieber2019-06-121-1/+4
| | | | | | | | | We cannot simply use NR for line counting because RS is changed in function dump_file. Add an extra variable to count lines, and reset it on each new file. Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: some cleanupMichael Olbrich2019-06-061-7/+10
| | | | | | | Add variables for the filename and full path of the command that will be executed. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_*: allow ninja generator for cmakeMichael Olbrich2019-06-053-22/+40
| | | | | | | | | cmake can be used with 'make' and 'ninja'. Currently only 'make' is supported. This introduces a check to determine which generator is selected and calls the corresponding tool in the compile and install stages. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* templates: src-meson-prog: introduce version into template projectUlrich Ölmann2019-06-051-1/+1
| | | | | Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* templates: add src-meson-prog templateUlrich Ölmann2019-06-051-0/+7
| | | | | Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_hash: print correct commentMichael Olbrich2019-06-051-1/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: fix dependencies with --progressMichael Olbrich2019-06-051-2/+3
| | | | | | | | | | With --progress, 'make' is called twice so extra handling is needed to only add the patches and config files to the hash files once. This is broken for packages with patches but no config file: The stamp file is never created. Fix this by creating separate stamp files. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_prepare: allow cross cmake packagesMichael Olbrich2019-06-041-7/+0
| | | | | | This is needed for llvm / clang in the toolchain. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: improve formating a bitMichael Olbrich2019-06-041-2/+4
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* detect patch changes and reextract when neededMichael Olbrich2019-06-043-1/+28
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* clean: make it more intelligentMichael Olbrich2019-06-041-0/+27
| | | | | | Refuse to delete git repositories unless --force is used. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_cfghash: make it more genericMichael Olbrich2019-05-311-7/+12
| | | | | | This is in preparation to use it for other hashes. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_patchin: drop support for old generic/ subdirMichael Olbrich2019-05-311-4/+8
| | | | | | | | For legacy reasons, patches could be in a 'generic' subdir. This has not been used in a long time. Remove support for this but add a check to fail, if such patches are found. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_patchin_fixup: skip for non-autoconf packagesMichael Olbrich2019-05-271-0/+6
| | | | | | | | | It's not needed here. It wastes unnecessary build time and makes working with '--git' harder because extra files may be are modifies. This is relevant for packages that support multiple build systems and autoconf is not used. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: handle --progress correctlyMichael Olbrich2019-05-231-1/+4
| | | | | | | | In that case make is called twice. Append the <PKG>_CONFIG file to the hash file only once. Otherwise a incorrect hash is generated when --progress is used. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_install_mangle_pc: match pkgdir paths in .pc filesMichael Olbrich2019-05-201-3/+2
| | | | | | e.g. glew uses the destdir for includedir/libdir Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: handle config changes when using devpkgsMichael Olbrich2019-05-201-0/+3
| | | | | | | | | | Then devpkgs exist for two different configurations, then switching between them then the .install.unpack stage will not be triggered again, because the tarball is older. Fix this by adding a extra dependency on .cfghash to handle this the same way as the normal build. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: fix order of generated outputMichael Olbrich2019-05-201-5/+15
| | | | | | Without this <PKG>_CFGHASH is used in dependencies before it is set. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* 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>