summaryrefslogtreecommitdiffstats
path: root/scripts/lib
Commit message (Collapse)AuthorAgeFilesLines
* ptxd_make_world_inject: Introduce new variable <PKG>_INJECT_OOTAlexander Dahl3 days1-3/+20
| | | | | | | | | | | | | | | | | | | | | Setting the new variable to 'YES' allows to inject into <PKG>_BUILD_DIR instead of <PKG>_DIR as before. When building out-of-tree some bootloaders like U-Boot expect injected files in the build dir, not in the source dir. Backwards compatibility is ensured, the source dir is still the default, the new inject dest is optional and in case set it overwrites the default. For using this in u-boot package, on top of the things already done to use the old inject mechanism in general, add this line to 'rules/u-boot.make' for example: U_BOOT_INJECT_OOT := YES Signed-off-by: Alexander Dahl <ada@thorsis.com> Acked-by: Michael Riesch <michael.riesch@wolfvision.net> Message-Id: <20240506105051.323546-5-ada@thorsis.com> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_inject: Use <PKG>_DIR directlyAlexander Dahl3 days1-1/+5
| | | | | | | | | | | pkg_source was defined as "$($(1)_DIR)" which is the same as pkg_dir in ptxd_make_world_common. We can use pkg_dir directly. Add a safe-guard to bail out early if that var is empty. Signed-off-by: Alexander Dahl <ada@thorsis.com> Acked-by: Michael Riesch <michael.riesch@wolfvision.net> Message-Id: <20240506105051.323546-3-ada@thorsis.com> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_inject: Remove useless testAlexander Dahl3 days1-3/+0
| | | | | | | | | | | One line above $target is set to "${var}/$(subshell)" and even if $var _and_ the result of the subshell call is empty, there's still the slash. Thus target is never empty. Signed-off-by: Alexander Dahl <ada@thorsis.com> Acked-by: Michael Riesch <michael.riesch@wolfvision.net> Message-Id: <20240506105051.323546-2-ada@thorsis.com> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_nested: only redirect PTXDIST_FD_STD{OUT,ERR} if definedMichael Olbrich2024-04-051-4/+8
| | | | | | This is necessary for nested "menuconfig" etc. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_kconfig_update: don't forget changes made by the migrate helperMichael Olbrich2024-03-231-1/+3
| | | | | | | | | | Updating the stamp here is done so that updated to the .config timestamp done by the migrate helper will not always cause the config to be saved. However, if the migrate helper actually changes something in the file then don't update the timestamp to ensure that the config is actually updated with those changes. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_install_generic: drop set-group-ID for directories with explicit groupMichael Olbrich2024-03-181-0/+6
| | | | | | | | | | | | | | | | If the group is explicitly overwritten and not used from the directory that is copied, then it does not make sense to keep the set-group-ID bit meant for a different group. This is relevant for install_alternative_tree. If the directory where a BSP is cloned has the set-group-ID bit set, then the whole source tree inherits it, including all directories in projectroot/. As a result install_alternative_tree would copy it. In such a use-case install_alternative_tree is typically called with group=0 (or another explicitly specified group) so that can be used as indicator when the set-group-ID bit should be dropped. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_init: allow cargo inside a package that uses autoconfMichael Olbrich2024-03-171-0/+3
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_report_yaml: add source git commit if requested and availableMichael Olbrich2024-03-163-29/+102
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_report_yaml: create and reference sboms for npm packagesMichael Olbrich2024-03-161-0/+9
| | | | | | | npm can create an sbom from the package-lock.json. Do that and reference the result in the full-bsp-report. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_extract: add <PKG>_SRC_FILTER variable to extract only part ↵Michael Olbrich2024-03-152-2/+8
| | | | | | | | | of the source archive This is especially useful in combination with <PKG>_STRIP_LEVEL when only a subdirectory is relevant. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_get: don't try to download nested archivesMichael Olbrich2024-03-153-1/+11
| | | | | | | | | | Some packages contain vendored dependencies as a tarball. With this, <PKG>_PARTS can be used for those and the default extract stage can extract them. Extracting early instead of allowing the package buildsystem to do this, makes it possible to patch the vendored dependencies. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_init: propagate -v to cargoMichael Olbrich2024-03-151-6/+8
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_extract_cargo: move cargo config creation to extract.postMichael Olbrich2024-03-152-25/+27
| | | | | | | | This step reads the Cargo.lock file. For packages where this is not provided by upstream, it will be created with a patch, so do this step when the patches are applied. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: propagate variables to host-system-python3-* packagesMichael Olbrich2024-03-141-6/+14
| | | | | | | | | | This is basically the same thing already done for host-* packages. It allows those packages to share the version etc. from the host or target package. Remove the now obsolte definitions from the rule files. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_get: actually limit downloadsMichael Olbrich2024-03-111-0/+3
| | | | | | | | | The downloads actually happen in the source archive target. Here pkg_stage is not set so the fifo to limit parallelization does not exist. Set pkg_stage if needed to fix this. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_get: improve logging with --quietMichael Olbrich2024-03-111-2/+11
| | | | | | | Put stderr directly into the logfile and let wget output something useful to help with debugging. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_get_http: refactorMichael Olbrich2024-03-111-26/+22
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_extract_cargo: improve workspace handlingMichael Olbrich2024-03-111-3/+11
| | | | | | | | | | | | | To handle all downloads manually, PTXdist basically fakes vendoring all dependencies. This can cause problems with workspaces where packages inherit from the workspace. 'cargo vendor' used to have the same problem[1] and fixed it by rewriting the Cargo.toml. Do the same thing here to fix this. [1] https://github.com/rust-lang/cargo/issues/11192 Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_template: fix "ptxdist newpackage host" with an existing target ↵Markus Heidelberg2024-03-081-1/+1
| | | | | | | | | | | counterpart In that case, "prompt" and "help" lines were added to the .in file and "SECTION" was set to "project_specific" instead of "hosttools_noprompt". Signed-off-by: Markus Heidelberg <m.heidelberg@cab.de> Message-Id: <20240304072708.50708-1-m.heidelberg@cab.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_report_yaml: add missing directory to devpkgMichael Olbrich2024-03-071-1/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_report_yaml: don't generate empty md5s entryMichael Olbrich2024-03-071-1/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_report_yaml_fragment: md5 is not a listMichael Olbrich2024-03-071-1/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_report_yaml: fix devpkg checkMichael Olbrich2024-03-071-2/+2
| | | | | | ptxd_get_ptxconf needs the kconfig symbol with the PTXCONF_ prefix. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_get_s3: fix download semanticsMichael Olbrich2024-03-071-0/+4
| | | | | | | Skip during urlcheck and balance the serialize fifo. Otherwise a token is added that was never removed. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_get: restrict pattern when removing old filesMichael Olbrich2024-03-071-2/+4
| | | | | | | | | | Sometimes users rename the downloaded file to '<filename>.somthing' to test the download again. Then they are confused that the original file is gone. So restrict the pattern a bit and try to delete only files that where created during a previous aborted download. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_get: indent like the rest of the shell codeMichael Olbrich2024-03-071-366/+366
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_install_file_extract_debug: don't choke on non-sha1 build-idsMichael Olbrich2024-03-071-1/+1
| | | | | | | Other build-ids by be shorted, e.g. those generated with the 'fast' style from lld. Fallback to the old debug file path in that case. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* templates: add template for host-system-python packagesMichael Olbrich2024-03-071-13/+20
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* rules: support host-system-python3-* packages with setup.pyMichael Olbrich2024-03-071-1/+5
| | | | | | | Provide the options with the correct prefix for packages that need to specify it explictly and use them as default when needed. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_cargo_sync_package: switch to <PKG>_PARTSMichael Olbrich2024-02-091-2/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_report_yaml: add list of sources for each package with more ↵Michael Olbrich2024-02-091-0/+37
| | | | | | details Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: introduce <PKG>_PARTS to replace <PKG>_SOURCESMichael Olbrich2024-02-091-4/+15
| | | | | | | | | | | | | | <PKG>_SOURCES cannot be used to match back to the package parts because the same source path may be used by multiple packages. So define <PKG>_PARTS that contains <PKG> and can be extended with <PKG>_EXTRA etc. for additional sources. In that case, <PKG>_EXTRA_SOURCE, etc. is expected to be defined. This makes it possible to extract all components in the default rule among other things. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* fix compile_commands.json for external kernel modulesMichael Olbrich2024-02-041-11/+45
| | | | | | | | | | | gen_compile_commands.py defined the wrong directory when creating compile_commands.json for external kernel modules: It must be the kernel build tree instead of the module build dir. To fix that, move the compile_commands.json generations into the core and fix it afterwards. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* compile_commands.json for all packagesMichael Olbrich2024-02-042-1/+127
| | | | | | Create it manually if the build-system does not do this for us. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* kernel-fit: Allow using 'kernel_noload' as sub-image typeAlexander Dahl2024-02-041-5/+15
| | | | | | | | | | | | | | | | | | | | Multi platform kernels built by the kernel-fit rule before are not usable in U-Boot, which adheres more strictly to the Flat Image Tree (FIT) spec than barebox does. For image sub-type 'kernel' U-Boot expects valid 'load' and 'entry' addresses. Setting those addresses to a generic value is impossible however for generic kernels, e.g. the DistroKit v7a kernel needs different addresses on at91 SAMA5 than on i.MX6. barebox circumvents this by ignoring missing 'load' and 'entry' addresses and finding a suitable address by itself. For using generic kernels in U-Boot you need sub-image type 'kernel_noload' and dummy addresses, which is also supported in barebox from v2024.01.0 release onwards. Link: https://github.com/open-source-firmware/flat-image-tree/releases/download/v0.8/fit-specification-v0.8.pdf Link: https://lore.barebox.org/barebox/20231129203106.2417486-1-a.fatoum@pengutronix.de/ Signed-off-by: Alexander Dahl <ada@thorsis.com> Message-Id: <20240202151209.2535721-3-ada@thorsis.com> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_spdx: update with latest dataMichael Olbrich2024-01-071-2/+179
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* host-system-python3: use a real virtualenvMichael Olbrich2023-12-073-18/+18
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_install_python_cleanup_host: use python3.x for host-pythonMichael Olbrich2023-11-201-1/+6
| | | | | | | The python wrapper may be used to call host-python3. In that case, it must be called as python3.x so fix the shebang accordingly. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_nested: Fix parameter passing for --dirty, --force and --pedanticUwe Kleine-König2023-11-171-3/+3
| | | | | | | | | | | | | | | Some variables corresponding to ptxdist parameters use "true" as value when given, others use "1". PTXDIST_DIRTY, PTXDIST_FORCE and PTXDIST_PEDANTIC are in the first group according to git grep -E 'PTXDIST_(DIRTY|FORCE|FEDANTIC)=' . Adapt ptxd_make_nested_ptxdist() accordingly. Fixes: 5169ae99daf8 ("add support for nested PTXdist execution") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Message-Id: <20231110093705.45879-2-u.kleine-koenig@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_init_readlink: add more possible symlinksMichael Olbrich2023-11-171-2/+41
| | | | | | | | | | | If PTXDIST_WORKSPACE has two levels of symlink indirection then the include path produced by cmake don't match the expected paths and are filtered out by the toolchain wrappers. Reproduce the cmake symlink handling and add the resulting paths to the whitelist to fix this. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* cleanup meson cross-file handlingMichael Olbrich2023-11-161-0/+3
| | | | | | | | The --cross-file can be used multiple times and all files will be combined. So don't expand the existing file. Instead, write the extra options so individual files. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* new license report toolingMichael Olbrich2023-10-292-0/+35
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_kconfig_update: potentially run migrate for all*configMichael Olbrich2023-10-281-3/+7
| | | | | | | | 'ptxdist all*config ...' can be used to set all new symbols to a certain value by setting KCONFIG_ALLCONFIG to the used ptxconfig. In that case, run migrate to update the existing symbols. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_lint: don't allow section project_specific is ptxdist upstreamMichael Olbrich2023-10-201-0/+5
| | | | | | This section is for BSP packages, not for upstream. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: improve image dependenciesMichael Olbrich2023-10-191-4/+22
| | | | | | | | | | Images and their reports where not always recreated correctly, e.g. when a package was disabled. Fix this by adding packages and files to the cfghash and depend on it for the reports. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: add gfortran wrapperMichael Olbrich2023-10-191-1/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_install_python_cleanup: don't call sed with no input filesMichael Olbrich2023-09-291-1/+1
| | | | | | | | | There may be not scripts. Don't call sed in that case. Otherwise it will print a warning: sed: no input files Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: propagate _SUBDIR and _STRIP_LEVEL to host/cross packagesMichael Olbrich2023-09-221-0/+3
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* templates: add template for custom FIT imagesRoland Hieber2023-09-151-0/+25
| | | | | | Signed-off-by: Roland Hieber <rhi@pengutronix.de> Message-Id: <20230912165759.3492269-2-rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_cmake_toolchain: fix CMAKE_SYSTEM_PROCESSOR for x86ptxdist-2023.09.0Michael Olbrich2023-09-071-1/+0
| | | | | | | | | | | | | | | | | | CMAKE_SYSTEM_PROCESSOR defaults to 'uname -m' and this is i*86 for 32-bit x86. So just use $PTXCONF_ARCH_STRING. Without this building qt6 fails with: In file included from .../qtmultimedia/src/3rdparty/pffft/pffft.c:141: .../include/xmmintrin.h: In function 'passf2_ps': .../include/xmmintrin.h:193:1: error: inlining failed in call to 'always_inline' '_mm_sub_ps': target specific option mismatch .../qtmultimedia/src/3rdparty/pffft/pffft.c:148:19: note: called from here .../qtmultimedia/src/3rdparty/pffft/pffft.c:290:23: note: in expansion of macro 'VSUB' [...] Because -DPFFFT_SIMD_DISABLE is not added to COMPILE_OPTIONS. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>