summaryrefslogtreecommitdiffstats
path: root/scripts/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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-071-1/+3
| | | | | | | | | | | | | | | 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>
* 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>
* 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-0352-104/+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>
* 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>
* 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_lib_dgen: include content of <PKG>_CONFIG in <PKG>_CFGHASHMichael Olbrich2019-05-171-7/+7
| | | | | | | To do this, append the <PKG>_CONFIG files to the pkghash-<PKG> files in ptx_dgen_deps.post and delay the md5 generation until that is done. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_kconfig: handle removed symbols when creating and applying diffsMichael Olbrich2019-05-161-2/+20
| | | | | | | | | | | | | If a dependency for a symbol is disabled, then the symbol will be dropped from the config. In that case, it will not appear in the diff. This is not exactly a problem, because kconfig will drop the symbol anyways. However, mconf detects this as a modification and will always ask to save the config. To avoid this, add all dropped symbols in the diff and use that information to drop them when applying the diff. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_kconfig: fix boardsetupMichael Olbrich2019-05-161-4/+4
| | | | | | | | | This got broken in many ways with the layer rework. - config/ was missing from the path to Kconfig - it's a single file outside the BSP, similar to 'setup' - the file may not exist when 'boardsetup' is called. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_kconfig_create_config: create empty target file if no source existsMichael Olbrich2019-05-161-0/+2
| | | | | | This can happen for 'boardsetup' when the config file does not exist yet. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_kconfig_update_config: keep an empty diff for cosmetic changesMichael Olbrich2019-05-151-0/+5
| | | | | | | | | | If comments or the order of symbols change then the diff is empty. Create the diff anyways. Otherwise the sanity check in the prepare stage of kconfig packages may fail. This can happen for example with a new kernel patch stack that modifies the kernel version in the top layer. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_kconfig: stop using silentoldconfigMichael Olbrich2019-05-101-14/+2
| | | | | | | | | It will be gone with the next kconfig update. It is no longer necessary here because ptxd_kconfig_sync_config() handles all changes to the config file anyways. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: fix warningChristian Hermann2019-05-101-1/+1
| | | | | | | As experienced with gawk 5.0.0, `#` is needlessly escaped. Signed-off-by: Christian Hermann <christian.hermann@hytera.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_get_http: only create the temp file when it is usedMichael Olbrich2019-05-021-1/+1
| | | | | | Otherwise, the empty file remains if the urlcheck succeeds. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: build with -Wno-implicit-fallthrough if necessaryMichael Olbrich2019-05-011-0/+1
| | | | | | | | | | 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>
* ptxd_make_world_patchin_post: call autogen.sh in the correct directoryMichael Olbrich2019-04-251-1/+1
| | | | | | | | | autogen.sh will operate on configure.ac in the current directory. If <PKG>_SUBDIR is set then autogen.sh must be called in this subdirectory. ${pkg_conf_dir_abs} will be used to call configure later anyways, so we can use it here as well. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_patchin_fixup: some whitespace fixesMichael Olbrich2019-04-251-3/+3
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxconfig: make reproducible builds configurableMichael Olbrich2019-04-122-20/+67
| | | | | | | | | | | | | | | | | | | | Some PTXdist packages use SOURCE_DATE_EPOCH to make the build more reproducible. Make this behaviour more configurable via a newly introduced ptxdist options. And make it possible to disable the stable SOURCE_DATE_EPOCH via 'ptxdist setup'. By default, this will set SOURCE_DATE_EPOCH to the year and month of the PTXdist version. Using the toolchain version and a custom value is also possible. Move setting SOURCE_DATE_EPOCH to the scripts that are evaluated just before make is called. This way, the toolchain setup and validation already happened. Otherwise ptxd_timestamp_toolchain() may fail early before the relevant checks and errors. Based on a patch from Florian Bäuerle <florian.baeuerle@allegion.com> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_kconfig: find Kconfig files in all layersMichael Olbrich2019-04-121-14/+7
| | | | | | | | | The top-level Kconfig file for the various config files should be found in all layers, not just the top layer and PTXdist. Also allow config/Kconfig everywhere for consistency, not just in PTXdist. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_release: handle relative lndir:// URLsMichael Olbrich2019-04-121-1/+1
| | | | | | | The URLs should not contain PTXDIST_WORKSPACE to ensure that layers work correctly. So just match any lndir:// URL. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_image_extract_xpkg_files: use ptxd_get_alternative to find opkg.confMichael Olbrich2019-04-121-7/+1
| | | | | | | This ensures that the file used here is also used to create the okpg.conf for the target. And this makes searching for the file layer aware. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>