summaryrefslogtreecommitdiff
path: root/common.mk
AgeCommit message (Collapse)Author
2023-05-16common.mk: Remove deprecated legacy toolchainsAlvin Chang
The legacy toolchain support is added in commit: 92582b5 ("Support legacy compiler") However, it is removed later in commit: 6a0fc2b ("toolchain: Remove legacy toolchains") Since legacy toolchain is removed, we also remove unnecessary variables in common.mk. Signed-off-by: Alvin Chang <alvinga@andestech.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2023-04-24common, qemu: Add support for konsole terminal emulatorCésar Pastorini
Make's `run` target for QEMU already has support for gnome-terminal. This change adds support for konsole which is the default terminal emulator for the KDE desktop environment. This already includes the correct `-e` flag for Konsole. Signed-off-by: César Pastorini <cesar.pastorini@gmail.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2023-04-13common.mk: add PYTHON3 variableImre Kis
Add PYTHON3 variable and replace python calls in common makefiles and in trusted-services.mk. This way the Python interpreter can be selected externally. Signed-off-by: Imre Kis <imre.kis@arm.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
2023-03-30common.mk: set CFG_USER_TA_TARGETSJens Wiklander
Sets CFG_USER_TA_TARGETS to ta_arm32 or ta_arm64 based on COMPILE_S_USER to match the used TA devkit. This avoids problems with in-tree TAs like pkcs11_ta being compiled for a different TA devkit than what is used by buildroot to populate the rootfs. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
2023-02-14optee_rust: change toolchain path searching priorityYuan Zhuang
Use the toolchains in OP-TEE repo instead of those in $PATH, to avoid potential inconsistency of toolchains. Related issue: https://github.com/OP-TEE/build/issues/624 Signed-off-by: Yuan Zhuang <demesne@foxmail.com> Acked-by: Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2022-09-13rust: fix make optee-rustJerome Forissier
In some environments it has been noted that the Rust setup fails with a netowrk error [1]. It seems to be an issue with the built-in Git library, a workaround being to tell the Rust setup to use the Git command instead. This commit does exactly that, regardless of the environment. Note: I chose not to restore the OP-TEE Rust build commands removed by [1] in order to reduce the size of the image ($TOP/optee_rust is 1.8GB after building) and avoid disk space issues in the "make check (QEMUv8)" job which uses this image but doesn't build the Rust tests. The "make check-rust (QEMUv8)" job will do whataver it takes. Link: [1] https://github.com/jforissier/docker_optee_os_ci/commit/6d7f39aec9436168e5e4ce44c4b6f7791575e313 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Yuan Zhuang <zhuangyuan04@baidu.com>
2022-08-22common.mk: buildroot: force make -j1 in buildroot when not per-packageJerome Forissier
Buildroot parallel build is allowed when BR2_PER_PACKAGE_DIRECTORIES is 'y', see commit e9bff1c86e93 ("common.mk: buildroot: enable top-level parallel build"). When disabled, Buildroot is not supposed to spawn several make jobs simultaneously. However for some reason it seems it can happen, see the IBART failure at [1]. The steps: >>> optee_client_ext 1.0 Fixing libtool files and: >>> pcsc-lite 1.9.4 Fixing libtool files ...seem to be running simultaneously and touching the same path (since per-package is disabled), which results in: mv: cannot stat '/home/optee/devel/qemu/out-br/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libpcsclite.la.fixed': No such file or directory package/pkg-generic.mk:331: recipe for target '/home/optee/devel/qemu/out-br/build/pcsc-lite-1.9.4/.stamp_staging_installed' failed I confirmed the fact by adding a 'sleep 5' after "Fixing libtool files" in package/pkg-generic.mk, as well as a 'ps -ef | grep sleep | grep -v grep || :' just before the sleep. Then when building with 'make -j32 BR2_PER_PACKAGE_DIRECTORIES=n' (32 core machine) the 'sleep 5' is displayed occasionally. To avoid that, let's explicitly invoke make with -j1 when BR2_PER_PACKAGE_DIRECTORIES is disabled. Link: [1] https://optee.mooo.com:5000/logs/OP-TEE/optee_os/5487/1027234243/9147c347fb53612f62bf7de1c17e47a246d61ef2#02-qemu-build line 16398: Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
2022-07-05common: add -t to set initial title for gnome-terminalMark-PK Tsai
The warning on option "-t" is remove in below commit. https://gitlab.gnome.org/GNOME/gnome-terminal/-/commit/54da2fe919634e2d6a6aab392b36449947b812cd And it seens work again, so add it back to make the terminal title understandable. Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
2022-06-28fvp: separate Measured Boot and fTPM configBalint Dobszay
The Measured Boot option not only enables the relevant config options for TF-A and optee_os, but also building the fTPM TA and its Linux driver. This is unnecessary when the consumer of the Event Log is not fTPM but e.g. the PSA Attestation SP (as introduced in the next commit). This commit modifies the MEASURED_BOOT option to only set the TF-A and optee_os config, and adds the MEASURED_BOOT_FTPM option for the fTPM related components. To keep backwards compatibility if MEASURED_BOOT is selected, by default MEASURED_BOOT_FTPM is enabled too. Reviewed-by: Gyorgy Szing <gyorgy.szing@arm.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
2022-06-06optee-rust: prevent new execution after successful buildJerome Forissier
"make optee-rust OPTEE_RUST_ENABLE=y" always runs the setup.sh script in $(ROOT)/optee_rust. The script clones about 600 MB of data. That can't be done each time especially since the check-rust target depends on optee-rust. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Yuan Zhuang <zhuangyuan04@baidu.com> Acked-by: Yuan Zhuang <zhuangyuan04@baidu.com>
2022-05-12qemu_v8: build Xen with BuildrootJerome Forissier
Commit 8b808915f856 ("qemu_v8: xen: apply patch to fix issue with RPC buffer release") really did only one part of the job. Only the Xen tools are built with Buildroot; the hypervisor itself (which needs the patch mentioned in the commit) is actually built from the top-level xen/ directory. As a result the issue is stil present. This commit changes the QEMUv8 makefiles as well as the Buildroot configuration for Xen so that both the hypervisor and the tools are built. As for the Xen configuration (enabling OP-TEE support), it is introduced via a patch to the defconfig file. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2022-05-06optee-rust: set OPTEE_DIR before initializing environmentYuan Zhuang
In the new version of Teaclave TrustZone SDK, OPTEE_DIR is checked in setup.sh. If OPTEE_DIR is not set, it will download OP-TEE source code. Set OPTEE_DIR as the directory of OP-TEE repo. Signed-off-by: Yuan Zhuang <zhuangyuan04@baidu.com> Acked-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2022-05-04qemu_v8: xen: apply patch to fix issue with RPC buffer releaseJerome Forissier
Adds a patch to be applied by Buildroot when building Xen. This fixes a race condition in RPC buffer management, which causes random failures in the OP-TEE CI jobs [1]. The patch is being upstreamed [2]. Link: [1] https://dev.azure.com/OPTEE/optee_os/_build/results?buildId=2827&view=logs&j=705748f3-7146-5e86-79af-1c0266d20a8c&t=d3458a7d-1a81-5639-8e63-8927d807e53a&l=7812 Link: [2] https://lists.xenproject.org/archives/html/xen-devel/2022-05/msg00245.html Fixes: https://github.com/OP-TEE/optee_os/issues/5288 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
2022-02-15common.mk: buildroot: enable top-level parallel buildJerome Forissier
Set BR2_PER_PACKAGE_DIRECTORIES=y to allow better parallelism when building Buildroot packages [1] and therefore faster build times on multi-core machines. Link: [1] https://buildroot.org/downloads/manual/manual.html#top-level-parallel-build Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2022-02-10common.mk: Fix build error with CFG_TEE_BENCHMARKSadiq Hussain
Steps to reproduce: 1)cd into the QEMU build directory 2)make CFG_TEE_BENCHMARK=y run We end up in a compile error as mentioned in https://github.com/OP-TEE/build/issues/489 and https://github.com/linaro-swg/optee_benchmark/issues/17 Turns out the path to benchmark sources wasn't properly defined and hence "BR2_PACKAGE_OPTEE_BENCHMARK_EXT_SITE" was incorrect. Signed-off-by: Sadiq Hussain <sadiq.muchumarri@intel.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2022-01-03qemu: Enable Linux Trusted Keys test setupSumit Garg
Brief description of changes: - Enable Qemu kernel configs for Trusted Keys. - Add keyutils buildroot package. - Enable Trusted Keys early TA in OP-TEE. - Create a new test script (trusted-keys.exp) which is invoked as part of "make check" for automated Trusted Keys tests. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org>
2022-01-03toolchain: Add optimizations for aarch64 hostSumit Garg
Lets switch over to using aarch64 hosted cross-compiler for aarch32 rather than building toochain for aarch32 from source which is very cumbersome. But in case of native build for aarch64 on aarch64 host we are left with no choice but to use buildroot toolchain as Arm doesn't provide binary toolchain releases for aarch64 native compiler. Also, we can't rely on distribution toolchain as buildroot doesn't support it (refer here [1] for details). Link: [1] https://buildroot.org/downloads/manual/manual.html#_cross_compilation_toolchain Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
2021-11-04common.mk: fix cargo error when building Rust examplesYuan Zhuang
"cargo: command not found" occurs when building Rust examples. BR2_PACKAGE_OPTEE_RUST_EXAMPLES_TC_PATH_ENV clears the PATH when building optee_rust_examples_ext. Add the cargo PATH to BR2_PACKAGE_OPTEE_RUST_EXAMPLES_TC_PATH_ENV. Signed-off-by: Yuan Zhuang <zhuangyuan04@baidu.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org>
2021-10-18optee_rust_examples_ext.mk: fix linker not found errorRong Fan
Following error occurs when running make buildroot QEMU_RUST_ENABLE=y: $ make buildroot QEMU_RUST_ENABLE=y ... error: linker not found | = note: No such file or directory (os error 2) error: aborting due to previous error The toolchains path is not add to the PATH. Fix it. Signed-off-by: Rong Fan <fanrong03@baidu.com> Acked-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
2021-09-15Add Rust examplesRong Fan
Add OPTEE_RUST_ENABLE option to common.mk and define buildroot packages for OP-TEE Rust examples Build Rust examples in optee_rust/examples: $ cd build && make OPTEE_RUST_ENABLE=y CFG_TEE_RAM_VA_SIZE=0x00300000 Signed-off-by: Rong Fan <fanrong03@baidu.com> Signed-off-by: Yuan Zhuang <zhuangyuan04@baidu.com> Acked-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org>
2021-08-31linux-defconfig: explicit cross compile flag usageIbai Erkiaga
Current linux config file generation does not add the cross compilation flag, leading potentially to compilation errors. Not sure how a proper config file is generated with current implementation but issues are observerd specially when buildling the linux image with a single thread. This commit ensures that both ARCH and CROSS_COMPILE flags are set when using the merge_config script. Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com> Reviewed-by: Jerome Forissier <jerome@forissier.org>
2021-08-24qemu, qemu_v8: use soc_term.pyJerome Forissier
Use soc_term.py instead of the C version and stop building the soc_term project. Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
2021-06-30Add support to build (and run) an image with Measured Boot and fTPM support.Javier Almansa Sobrino
This patch enables Measured Boot on TF-A and builds the TSS tools and the TPM Kernel Module for the FVP toolkit. The functionality is disabled by default. To enable it, build with MEASURED_BOOT=y. Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2021-06-25Use security_model mapped-xattr for QEMU Persistent Secure StorageChristoph Gellner
Use security_model mapped-xattr for QEMU_PSS_HOST_DIR. This allows folders/files below /data/tee to be owned by any uid/gid of the QEMU context. Fixes https://github.com/OP-TEE/build/issues/478 Signed-off-by: Christoph Gellner <cgellner@de.adit-jv.com> Suggested-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
2021-06-24qemu_v8.mk: Enable DomU in Dom0 rootfsRuchika Gupta
Xen tools are required to launch the other DomU's from Dom0. Enable them in Buildroot. Since Xen is built outside Buildroot, it is essential to maintain the same version of Xen built in build system and Xen tools built in Buildroot. DomU needs a rootfs without the Xen tools. So another target is introduced to build rootfs for DOMU without Xen tools. To launch & run DomU: make XEN_BOOT=y run From Dom0 prompt: > cd /mnt/host/qemu_v8/xen > xl create guest.cfg # This will create a DomU To goto DomU's console: > xl console domu To run and check xtests from Dom0 and DomU: make XEN_BOOT=y check Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2021-06-24qemu_v8.mk: Add option to add Xen in boot flowRuchika Gupta
Introduce option XEN_BOOT to add xen in the bootflow. When built with XEN_BOOT=y, boot flow currently supported is : BL1 -> BL2 -> BL31 -> OP-TEE -> uboot -> Xen -> Dom0 xtests can be run over Dom0 Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2021-06-21qemu_v8.mk: Add option to use U-Boot instead of edk2Ruchika Gupta
Add an option to build and use U-Boot instead of edk2 as BL33 in the bootflow. To use this option: make UBOOT=y Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Tested-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
2021-06-15Build needed cross toolchain with buildroot for non-x86_64 hostsJens Wiklander
The needed precompiled toolchains provided by Arm are only available for x86_64 hosts. For all other host architectures we build it with Buildroot itself. Reviewed-by: Jerome Forissier <jerome@forissier.org> Tested-by: Jerome Forissier <jerome@forissier.org> (QEMUv8 64/64, host uname -m: aarch64) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2021-04-13common: remove deprecated dependency for optee-os-clean-commonEtienne Carriere
Remove deprecated dependencies on target optee-os-clean-common: benchmark-app-clean-common, xtest-clean-common and optee-examples-clean-common where removed by commit [1]. Fixes build failure with trace like: bash> make clean -j$(nproc) (...) make: *** No rule to make target 'xtest-clean-common', needed by 'optee-os-clean-common'. Stop. Link: [1] 819066fb88a6 ("common.mk: remove unused targets and definitions") Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
2021-03-17qemu_v8: fix error in edk2-cleanJerome Forissier
'make edk2-clean' fails with the following error: build.py... : error 000E: One Path in PACKAGES_PATH doesn't exist /home/jerome/work/optee_repo_qemu_v8/edk2/../edk2-platforms The reason is $(ROOT)/edk2-platforms does not exist on this platform. Fix this by using the proper platform-specific variable $(EDK2_PLATFORMS_PATH) in the edk2-clean-common target like is done in edk2-common. Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2021-03-16common.mk: remove unused targets and definitionsJerome Forissier
The OP-TEE client, examples, tests (xtest) and benchmark projects are built using Buildroot. Therefore all the related targets and definitions in common.mk are unused. Remove them. Similarly, gen_rootfs can be removed since the root FS is created by Buildroot. Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
2021-02-01common.mk: qemu: do not build docsJerome Forissier
Add the --disable-docs option to QEMU_CONFIGURE_PARAMS_COMMON so that no documentation is generated during the QEMU build. Documentation is not needed and it may fail to build in some environments. For instance on Ubuntu 18.04.5 LTS: Warning, treated as error: docs/qemu-option-trace.rst.inc:4:Malformed option description '[enable=]PATTERN', should look like "opt", "-opt args", "--opt args", "/opt args" or "+opt args" make[1]: *** [.docs_built_system_qemu.1_docs_built_system_qemu-block-drivers.7_docs_built_system_qemu-cpu-models.7.sentinel.] Error 2 The error is caused by sphinx-build: $ sphinx-build --version sphinx-build 3.2.1 The version that comes with Ubuntu 20.04.1 LTS works fine: $ sphinx-build --version sphinx-build 1.8.5 Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
2021-01-21br-ext: embed opensc for pkcs11-toolEtienne Carriere
Embed opensc package for pkcs11-tool to play with the PKCS11 TA. Examples of using pkcs11-tool with PKCS11 TA: # Get tokens/slots info pkcs11-tool --show-info pkcs11-tool --list-token-slots pkcs11-tool --list-mechanisms # Initialize token and user PIN pkcs11-tool --init-token --label test-token --so-pin 1234567890 pkcs11-tool --label test-token --login --so-pin 1234567890 \ --init-pin --pin ABCDEFGHIJ # Generate a 2048bit RSA key pkcs11-tool --token-label test-token --pin ABCDEFGHIJ \ --keypairgen --key-type RSA:2048 --id 123 --label rsa-test-key # List token object pkcs11-tool --token-label test-token --list-objects Co-developed-by: Gábor Székely <szvgabor@gmail.com> Signed-off-by: Gábor Székely <szvgabor@gmail.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2020-11-17Introduce BR2_PACKAGE_OPTEE_TEST_EXT_WITH_CXX_TESTSJerome Forissier
Conditionally enable TA C++ tests in the optee_test_ext Buildroot package. Some toolchains may not support this feature [1] so it is best to let the user decide. common.mk enables the tests by default when $(COMPILER) is not clang, assuming that the default GCC toolchain from toolchain.mk is used (which works fine with the C++ tests). The command line option is 'make WITH_CXX_TESTS=y|n'. Link: https://github.com/OP-TEE/optee_test/issues/458 Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2020-11-17Introduce BR2_PACKAGE_OPTEE_TEST_EXT_WITH_TLS_TESTSJerome Forissier
Conditionally enable Thread Local Storage tests in the optee_test_ext Buildroot package. Some toolchains may not support this feature [1] so it is best to let the user decide. common.mk enables the tests by default since the GCC toolchain from toolchain.mk supports them. The command line option is 'make WITH_TLS_TESTS=y|n'. Link: https://github.com/OP-TEE/optee_test/commit/30efcbeaf8864d0f2a5c4be593a5411001fab31b Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2020-10-06Add support for gp-suite in optee_testJens Wiklander
By passing GP_PACKAGE=<path to GP-suite archive> optee_test is configured to compile with the GlobalPlatform test suite. The test suite is unpacked and patched in the build directory as part of the buildroot process when building optee_test. Acked-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2020-08-27common.mk: set CFG_ARM64_core=n when COMPILE_S_KERNEL != 64Jerome Forissier
common.mk currently assumes that optee_os defaults to a 32-bit build for the TEE core, in other words that CFG_ARM64_core is not set by default and that only a 64-bit build requires setting CFG_ARM64_core=y. Let's set CFG_ARM64_core=n explicitly when a 32-bit build is desired. This will let platforms such as QEMUv8 (PLATFORM=vexpress-qemu_armv8a) to select a 64-bit core by default in optee_os which makes more sense since (1) build.git would not support 32-bit until parent commit ("qemu_v8: do not force COMPILE_S_KERNEL := 64"), and (2) 32-bit is usually tested with QEMU (PLATFORM=vexpress-qemu_virt). Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2020-08-14qemu: optionally preserve secure storage between rebootsRoland Nagy
Usage: set QEMU_PSS_ENABLE=y and adjust QEMU_PSS_HOST_DIR. It also requires QEMU_VIRTFS_ENABLE to be set to "y". Also added a buildroot post-script which appends lines to /etc/fstab, so shared directories can be automatically mounted if QEMU_VIRTFS_AUTOMOUNT and QEMU_PSS_AUTOMOUNT are set to "y". Signed-off-by: Roland Nagy <rnagy@xmimx.tk> Reviewed-by: Jerome Forissier <jerome@forissier.org> Tested-by: Jerome Forissier <jerome@forissier.org>
2020-05-29common.mk: Rename BENCHMARK_APP_PATH to OPTEE_BENCHMARK_PATHEtienne Carriere
Rename BENCHMARK_APP_PATH to OPTEE_BENCHMARK_PATH for consistency with the other OP-TEE packages. Remove unused BENCHMARK_APP_OUT and LIBYAML_LIB_OUT that were related to OP-TEE benchmark package. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2020-05-29Remove deprecated busybox rulesEtienne Carriere
Busybox is no more built as a single package but built as part of the buildroot environment. This change removes busybox rules and resources from Makefile scripts. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2020-05-29Use generic OPTEE_OS_PLATFORM to define platformEtienne Carriere
Define OPTEE_OS_PLATFORM for each supported platform to define the target platform for which OP-TEE OS package is built. It is used in common.mk (and ti/ti-common.mk). Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2020-05-29br-ext: Rename OP-TEE packages with _ext suffixEtienne Carriere
Rename OP-TEE packages in br-ext with a _ext suffix so that they do not conflict with the OP-TEE packages from Buildroot. This change essentially renames Buildroot configuration switches BR2_OPTEE_* to BR2_OPTEE_*_EXT_* without changing the current build process. This change is needed for OP-TEE build environment to synchronize with Buildroot GIT version [1] or later in the Buildroot integration tree. [1] points where OP-TEE packages were introduced in Buildroot, right after 2019.02 is released. This was tested with all Buildroot release tags from 2018.11 to 2020.02, and recent 2020.05-rc1. Link: [1] https://git.buildroot.net/buildroot/commit/?id=da49312af9e0c3e7f6df50e7d6f77e1fa2921b7a Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2020-01-09qemu: Add VirtIORNG random data sourceAlbert Schwarzkopf
Adds /dev/urandom from the host as a source for random data so the guest does not block on calls to getentropy() etc. Signed-off-by: Albert Schwarzkopf <githubc@quitesimple.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
2020-01-08common.mk: add macro cc-option to test compiler supportJerome Forissier
Adds the cc-option macro to be used to detect wether a C compiler supports a given option or not. It is similar to the macro added in optee_os [1] except that it takes the compiler as the first argument for flexibility. Link: [1] https://github.com/OP-TEE/optee_os/commit/989ac108b0ef Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
2019-09-10common.mk: use ccache to build OP-TEE user space librariesJerome Forissier
Currently, when ccache is available, it is used to build OP-TEE but due to some wrong settings the user space libraries use the compiler directly without ccache. Fix that. Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
2019-09-04common.mk: buildroot: append BR2_ variables to config automaticallyJerome Forissier
To set additional BR2_ variables, the user currently needs to edit common.mk and modify the buildroot recipe. It is inconvenient, especially since a line with a cumbersome syntax has to be added. One would expect to be able to specify the desired value on the make command line or directly in the Makefile. For instance, to enable debug mode: make BR2_ENABLE_DEBUG=y. This patch updates the buildroot recipe to enumerate all the Makefile variables that start with BR2_, and each such variable is automatically added to ../out-br/extra.conf. As a result the existing BR2_ variables can be set in a simpler way. Tested on QEMU, results in the same ../out-br/.config except for the line order. Signed-off-by: Jerome Forissier <jerome@forissier.org> Suggested-by: Heino Madsen <heino.madsen@huawei.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
2019-06-11common.mk: add mmc-utils buildroot packageVictor Chong
This is useful for debugging or testing eMMC and RPMB issues. Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
2019-05-10common: remove deprecated gnome-terminal flagJoakim Bech
On recent versions of gnome-terminal you will get this warning: "Option "-t" is deprecated and might be removed in a later version of gnome-terminal." There seems to be no substitution for it, therefore let's just get rid of it. Signed-off-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
2019-05-06set CFG_TA_TEST_PATH=y for optee_client buildVictor Chong
With CFG_TA_TEST_PATH now defaulting to n in optee_client for better security, this needs to be set explicitly to pass xtest 1008. Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
2019-03-19buildroot: add optee_os package to copy shared libraries into the root FSJerome Forissier
When OP-TEE is built with CFG_ULIBS_SHARED=y, TA shared libraries are created. They have to be installed into the target root FS in order to be found at runtime. This patch adds a custom package to do just that. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>