path: root/boot/uboot/uboot.mk
Commit message (Collapse)AuthorAgeFilesLines
* boot/uboot: fix kconfig with per-package directories and host-makeGravatar Nicolas Toromanoff2021-03-131-0/+1
| | | | | | | | | | | | If PER_PACKAGE_DIRECTORIES=Y and using host-make package (because BR2_FORCE_HOST_BUILD=Y or local make is too old) .stamp_dotconfig target needs per-package/uboot/host/bin/host-make that doesn't exist yet. Add host-make into UBOOT_KCONFIG_DEPENDENCIES. Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@foss.st.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* uboot: fix binman with a new dependencyGravatar Francois Perrad2021-02-121-2/+2
| | | | | | | | | | since 2021.01, tools/binman is broken. tools/binman/control.py imports pkg_resources the module pkg_resources is supplied by setuptools, so this new dependency is required. Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Replace LIBFOO_CPE_ID_NAME by LIBFOO_CPE_ID_PRODUCTGravatar Fabrice Fontaine2021-01-211-1/+1
| | | | | | | | | | Replace LIBFOO_CPE_ID_NAME by LIBFOO_CPE_ID_PRODUCT to better "comply" with the official "Well-Formed CPE Name Data Model" parameters: - https://csrc.nist.gov/publications/detail/nistir/7695/final - https://nvlpubs.nist.gov/nistpubs/Legacy/IR/nistir7695.pdf Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* boot/uboot: introduce BR2_TARGET_UBOOT_NEEDS_OPENSBIGravatar Bin Meng2021-01-161-0/+5
| | | | | | | | | Some RISC-V platforms (such as SiFive HiFive Unleashed) encapsulate the OpenSBI firmware image inside U-Boot. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* package: provide CPE ID details for numerous packagesGravatar Matt Weber2021-01-041-0/+2
| | | | | | | | This patch adds CPE ID information for a significant number of packages. Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* boot/uboot: fix custom repo error messageGravatar Garret Kelly2020-11-161-1/+1
| | | | | | | | | | When using a custom git or mercurial repository for u-boot the error message indicating a version had not been provided incorrectly stated that the URL was missing. Update the error message to indicate that it's the version that's missing. Signed-off-by: Garret Kelly <garret.kelly@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* boot/uboot: add stm32 binary formatGravatar Shlomi Vaknin2020-10-131-0/+5
| | | | | | | | Add `.stm32` binary format that U-Boot generates for the trusted configuration of STM32MP platforms. Signed-off-by: Shlomi Vaknin <shlomi.39sd@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* package/uboot-tools: migrate BR2_TARGET_UBOOT_BOOT_SCRIPT from U-Boot pkgGravatar Matt Weber2020-10-061-13/+0
| | | | | | | | | | For consistancy and dependencies between uboot and uboot-tools, this patch migrates the script creation over in a similar way as the env image creation. Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* package/uboot-tools: migrate BR2_TARGET_UBOOT_ENVIMAGE from U-Boot pkgGravatar Matt Weber2020-10-061-25/+0
| | | | | | | | | | | | | | | | | | | | Migrating the support for this feature to uboot-tools to gain the ability to build env files when BR2_TARGET_UBOOT isn't selected. When _ENVIMAGE_SOURCE is not set, we generate a default environment. However, this default depends on the U-Boot configuration. Therefore, this can only be done if uboot itself is built as well, and host-uboot-tools needs to depend on uboot. For the same reason, the commands for creating the environment have to be adapted a little. Take this occasion to drastically simplify them. Note: This patch creates a circular dependency with uboot until the similar migration patch is merged for uboot scripts Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* boot/uboot: Fix kconfig to use $(BR2_MAKE)Gravatar Brandon Maier2020-08-061-2/+3
| | | | | | | | | | | | U-Boot must use $(BR2_MAKE) as it uses a Make feature from v4.0. We already use $(BR2_MAKE) in the BUILD_CMDS, but the kconfig commands still uses $(MAKE). Without this fix, building U-Boot with kconfig will fail with the following cryptic error. > Makefile:37: *** missing separator. Stop. Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* uboot: zynqmp: Support loading a PMU configGravatar Brandon Maier2020-06-271-0/+17
| | | | | | | | | | | | | | | | | Before now, U-Boot SPL could only load the Platform Management Unit (PMU) by patching the board-specific pm_cfg_obj.c file into the generic PMU firmware, but that then requires generating a new PMU firmware for every board configuration. To fix that, Luca Ceresoli added support to U-Boot to load the pm_cfg_obj[1]. Like the PMU firmware, we need a way to pass the PMU cfg to U-Boot during build. U-Boot only accepts the binary format of the cfg, so we must convert the source file with the tool provided with U-Boot. [1] https://lucaceresoli.net/zynqmp-uboot-spl-pmufw-cfg-load/ Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* boot/uboot: change from FTP to HTTPS for official releasesGravatar Joachim Nilsson2020-06-041-1/+1
| | | | | | | | | The HTTPS URL seems to be more reliable and quicker for download than FTP. FTP may also be a blocked protocol on some sites and in CI/CD setups. Signed-off-by: Joachim Nilsson <troglobit@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* boot/uboot: support building U-Boot with Python 3.xGravatar Thomas Petazzoni2020-05-151-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot versions newer than 2020.01 use Python 3.x instead of Python 2.x in various scripts. We already had the BR2_TARGET_UBOOT_NEEDS_PYLIBFDT and BR2_TARGET_UBOOT_NEEDS_PYELFTOOLS options, but depending on the U-Boot version, we now need to indicate if Python 2.x or Python 3.x should be used. In addition, it turns out that some U-Boot configurations need a Python interpreter, without needing pylibfdt or pyelftools. Some of our defconfigs were abusing the BR2_TARGET_UBOOT_NEEDS_PYLIBFDT option to make sure a Python interpreter was built. To solve this issue, we introduce a choice, that let the users specify what, if any, host python version is needed. The default is 'no', to preserve the previous behaviour, unless any of the pylibfdt or the pyelftools options is enabled, in which case we hide the 'no' option, and use python 2 by default. This dfault is guaranteed by the order of options in the choice. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> [yann.morin.1998@free.fr: - explicitly make the choice a bool - make BR2_TARGET_UBOOT_NEEDS_PYTHON a blind option - introduce the 'no' option in the choice - reword the commit log accordingly ] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* boot/uboot: don't specify .config to mungeGravatar Yann E. MORIN2020-05-011-4/+2
| | | | | Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* boot/uboot: license files hashes only valid for latest versionGravatar Yann E. MORIN2020-02-061-0/+2
| | | | | | | | | | | | | | We can only know the details of the license files for known versions. For custom, older or newer versions, the license files may change, or may be moved around. So, do for U-Boot as was done for ATF, linux, and linux-headers, and only define the list of license files for the latest version. Reported-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Markus Mayer <mmayer@broadcom.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* boot/uboot: needs make >= 4.0Gravatar Yann E. MORIN2020-02-031-2/+5
| | | | | | | | | | | | | | | | | Starting with 2020.01, uboot started using the 'undefine' make directive, which was only introduced with make 4.0. In the general case, we do not have a way to know if the uboot selected by the user is older or later than 2020.01, so we have no way to know before hand if make >= 4.0 is needed or not. As such, we have no other option than to always require it. So, use the existing $(BR2_MAKE_HOST_DEPENDENCY) and $(BR2_MAKE), both of each will ensure that we do use a make that is at least 4.0. Reported-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* boot/uboot: cover more u-boot versions when fixing up libfdt include pathsGravatar Arnout Vandecappelle (Essensium/Mind)2020-01-011-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original UBOOT_FIXUP_LIBFDT_INCLUDE hook only works for u-boot versions starting from v2017.11. As older u-boot versions are still in common use today, e.g. in the ci20_defconfig, extend the hook to cover a wider range of u-boot versions. The main code change was proposed by Arnout Vandecappelle in [1]. Testing and comment changes were done by Thomas De Schampheleire. Additional (build) testing done by Yann. [1] http://lists.busybox.net/pipermail/buildroot/2019-May/251231.html This was tested with the following defconfigs, that each excercise one case: ----.-- No defconfig identified 2010.06 'lib/libfdt/', used to be simply 'libfdt' before upstream commit 0de71d507157... 2013.10 ci20_defconfig 2014.04 'srctree' used to be called 'SRCTREE' before upstream commit 01286329b27b27ea... 2017.05 olimex_a13_olinuxino_defconfig 2017.11 scripts/dtc/libfdt only exists since upstream commit c0e032e0090d6541549b19cc... 2018.01 mx6udoo_defconfig 2018.03 core change is equivalent to upstream commit e0d20dc1521e74b82dbd69be53a04884... 2019.10 nanopi_neo_defconfig Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> [yann.morin.1998@free.fr: add the build-test results] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
* boot/uboot: add option to build u-boot.itb imageGravatar Dario Binacchi2019-12-081-0/+5
| | | | | | | | | It allows you to add the u-boot.itb to the list of U-Boot images that can be created. Like the others, this one is also copied to the image folder. Signed-off-by: Dario Binacchi <dariobin@libero.it> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* boot/uboot: add missing spaces around variable assignmentGravatar Thomas Petazzoni2019-10-271-1/+1
| | | | | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* boot/uboot: use proper spelling of "U-Boot"Gravatar Pierre-Jean Texier2019-08-041-2/+2
| | | | | Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* boot/uboot: add option to pass custom variables to U-Boot buildGravatar Thomas Petazzoni2019-08-031-1/+2
| | | | | | | | | | | | | | | | | | | | | U-Boot supports a number of environment variables to pass specific information. The following patches were submitted in the past to one some specific Config.in option to pass some of these variables: - http://patchwork.ozlabs.org/patch/881197/ proposed an option to pass a custom EXT_DTB= variable - http://patchwork.ozlabs.org/patch/1018245/ proposed an option to pass a custom DEVICE_TREE= variable Instead of adding one Config.in option for each of those variables, let's provide a generic mechanism to pass arbitrary variables during U-Boot build step. Cc: Konstantin Porotchkin <kostap@marvell.com> Cc: Clemens Gruber <clemens.gruber@pqgruber.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* boot/uboot: add option to generate env image from default envGravatar Denis Osterland2019-08-011-4/+4
| | | | | | | | This patch adds support to extract compiled in default env via u-boot's get_default_envs script and generate env image from it. Signed-off-by: Denis Osterland <Denis.Osterland@diehl.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* boot/uboot: add support for having host-python-pyelftools as a dependencyGravatar Shyam Saini2019-04-201-0/+4
| | | | | | | | | | | Rockchip rk3399 SOC based boards require python pyelftools library for parsing dtb files, so lets add it as uboot dependency. This commit introduces a new config option BR2_TARGET_UBOOT_NEEDS_PYELFTOOLS to achieve this. Signed-off-by: Shyam Saini <shyam.saini@amarulasolutions.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* boot/uboot: add support for bundling ATF BL31 in ELF format into U-BootGravatar Michał Łyszczek2019-02-061-0/+4
| | | | | | | | | | | | Rockchip's rk3328 encapsulates the BL31 part of ATP but it needs image in ELF format. This is extension to 2c4809e6088660dc71de9de8cee0bba312aafbe4 This commit introduces a BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF variable to achieve this. Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* boot/uboot: use HOSTCC_NOCCACHE as kconfig HOSTCCGravatar Thomas Petazzoni2019-01-161-2/+3
| | | | | | | | | | | | | | | | | At kconfig time, dependencies are not built, and therefore host-ccache is not ready. Due to this, using $(HOSTCC) as the host compiler in KCONFIG_OPTS does not work: a "make uboot-menuconfig" invocation from a clean tree with ccache enabled fails. This commit fixes this by using $(HOSTCC_NOCCACHE). We cannot rely on the default value of HOSTCC passed by the kconfig-package infrastructure, because $(UBOOT_MAKE_OPTS) also contains a HOSTCC definition that would override the one passed by the kconfig-package infrastructure. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* uboot: replace mkimage invocation with MKIMAGEGravatar Danomi Manchego2018-10-261-1/+1
| | | | | | | | We already use $(MKIMAGE) instead of $(HOST_DIR)/bin/mkimage in xvisor, linux, and cpio; use it here too. Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* boot/uboot: fix environment image generation on big endian systemsGravatar Thomas Petazzoni2018-10-141-1/+1
| | | | | | | | | | | | | | As reported by Jeff Wittrock in bug #11396, the U-Boot environment image checksum is invalid for big endian targets, because the test on the BR2_ENDIAN Config.in option doesn't take into account that it is double quoted. The fix was provided by Jeff himself on bugzilla. Fixes bug #11396. Reported-by: Jeff Wittrock <jwittrock@faultrecorder.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* boot/uboot: needs bison/flex even for the legacy buildsystemGravatar Yann E. MORIN2018-09-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | When using the legacy buildsystem, the kconfig parser may still be used, as reported by Thomas: >>> uboot 2018.09 Configuring ...] HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o YACC scripts/kconfig/zconf.tab.c bin/sh: 1: bison: not found ake[3]: *** [scripts/kconfig/zconf.tab.c] Error 127 ake[3]: *** Waiting for unfinished jobs.... LEX scripts/kconfig/zconf.lex.c bin/sh: 1: flex: not found However, in that case, the kconfig parser is only generated during the 'configure' step, so we can add bison/flex as standard dependencies. Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* Merge branch 'next'Gravatar Peter Korsgaard2018-09-071-0/+4
|\ | | | | | | Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
| * uboot: add option to depend on host-lzopGravatar Thomas Petazzoni2018-08-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some U-Boot configurations use lzop, which may not be available on the build machine since it's not a mandatory dependency of Buildroot. To solve this, a new option BR2_TARGET_UBOOT_NEEDS_LZOP is introduced, and handled in a similar way to the existing BR2_TARGET_UBOOT_NEEDS_OPENSSL option. This fixes the build of the dra7xx_evm U-Boot defconfig as of U-Boot 2018.07, on a build machine without lzop installed. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* | boot/uboot: Set MAKE_ENV for kconfig build systemGravatar Thomas Preston2018-09-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | U-Boot fails to build in a GitLab CI context because the kconfig-package build stage is unable to find bison or flex even though they are installed in HOST_DIR. To fix this, set UBOOT_MAKE_ENV so that UBOOT_KCONFIG_MAKE uses the correct PATH. Signed-off-by: Thomas Preston <thomas.preston@codethink.co.uk> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* | boot/uboot: needs host-{flex,bison}Gravatar Yann E. MORIN2018-08-201-0/+3
|/ | | | | | | | | | | | | | Recent U-Boot no longer ship the flex/bison generated kconfig parser, as of commit e91610da7c8a9fe42f3e5a75f06c3d1a0cb5f815 (kconfig: re-sync with Linux 4.17-rc4). So, add the conditional kconfig dependencies, as we just did for the kernel. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* uboot: zynqmp: allow to use custom psu_init filesGravatar Luca Ceresoli2018-07-281-0/+11
| | | | | | | | | | | | | | | | | | | | | | U-Boot SPL configures pinmuxes, clocks and other low-level devices. On the Xilinx ZynqMP SoCs the code to do this resides in a file called psu_init_gpl.c which is initially generated by the Xilinx development tools. Add an option to pass these files from the outside (e.g. in the board files). For this to work properly, a patch to U-Boot is needed. However this patch must be applied by each defconfig using BR2_TARGET_UBOOT_ZYNQMP_PSU_INIT_DIR. If it were in boot/uboot/ to be applied unconditionally, it would break the build for configs using a U-Boot version where the patch is already applied. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Joel Carlson <joelsoncarl@gmail.com> Reviewed-by: Joel Carlson <JoelsonCarl@gmail.com> Tested-by: Joel Carlson <JoelsonCarl@gmail.com> [Thomas: add comment about U-Boot version requirements to use this option.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* uboot: zynqmp: generate SPL image with PMUFW binaryGravatar Luca Ceresoli2018-07-281-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | In order to boot on the Xilinx ZynqMP SoCs, U-Boot SPL requires a recent PMU firmware loaded. Instruct U-Boot to add pmufw.bin to the boot.bin file together with U-Boot SPL, and the boot ROM will load both. For this to work properly, a patch to U-Boot is needed. However this patch must be applied by each defconfig that wishes to use BR2_TARGET_UBOOT_ZYNQMP_PMUFW. If it were in boot/uboot/ to be applied unconditionally, it would break the build for configs using a U-Boot version higher than 2018.7-rc1 where the patch is already applied. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Joel Carlson <joelsoncarl@gmail.com> Reviewed-by: Joel Carlson <JoelsonCarl@gmail.com> Tested-by: Joel Carlson <JoelsonCarl@gmail.com> [Thomas: - indicate that this feature requires U-Boot 2018.07, since commit c7df098a71e05dc81cee818747759e8060b59626 is needed. - define UBOOT_ZYNQMP_KCONFIG_PMUFW only once, and instead use a variable named UBOOT_ZYNQMP_PMUFW_PATH to store the path to the PMU firmware] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* uboot: Introduce BR2_TARGET_UBOOT_FORMAT_DTB_IMXGravatar Fabio Estevam2018-07-071-0/+5
| | | | | | | | | | | Some i.MX boards which use device tree to describe the hardware for U-Boot generate a u-boot-dtb.imx binary. Introduce the BR2_TARGET_UBOOT_FORMAT_DTB_IMX option to handle such case. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* uboot: don't override HOSTCC/HOSTLDFLAGS for kconfigGravatar Peter Korsgaard2018-06-241-1/+9
| | | | | | | | | | | So the host ncurses includes and library are used instead of a mix of both, causing corrupted characters. Similar to the linux fix in commit 6d3d09e23213e8 (linux: don't override HOSTCC for kconfig), except that we pass the linker flags in HOSTLDFLAGS. Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Acked-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* boot/uboot: remove Blackfin related codeGravatar Thomas Petazzoni2018-04-151-4/+0
| | | | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* boot/*/*.mk: fix code styleGravatar Ricardo Martincoski2018-04-011-7/+7
| | | | | | | | Use only one space before backslash. Indent with tabs. Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* uboot: fix build for older uboot source treesGravatar Stefan Becker2018-03-121-1/+5
| | | | | | | | | | The change in commit bf733342324b414a1142b57781504111f81c97ea only works for newer uboot source trees. Add a check that scripts/dtc/libfdt directory exists before making this change. [Peter: add comment explaining why] Signed-off-by: Stefan Becker <chemobejk@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* uboot: fix build when libfdt-devel is installed system-wideGravatar Thomas Petazzoni2018-03-101-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When libfdt-devel is installed system-wide, the build of U-Boot host programs currently fails with lots of: HOSTCC tools/aisimage.o In file included from tools/../include/../lib/libfdt/libfdt.h:10:0, from tools/../include/libfdt.h:1, from tools/fdt_host.h:11, from tools/imagetool.h:24, from tools/aisimage.c:8: /usr/include/libfdt_env.h:70:30: error: conflicting types for ‘fdt64_t’ typedef uint64_t FDT_BITWISE fdt64_t; ^~~~~~~ In file included from <command-line>:0:0: ././include/libfdt_env.h:19:16: note: previous declaration of ‘fdt64_t’ was here typedef __be64 fdt64_t; ^~~~~~~ In file included from ././include/libfdt_env.h:12:0, from <command-line>:0: /usr/include/libfdt_env.h:90:24: error: expected ‘)’ before ‘x’ static inline uint32_t fdt32_to_cpu(fdt32_t x) ^ This commit adds a fixup in the U-Boot code to fix this problem. The fixup is equivalent to applying upstream commit http://git.denx.de/?p=u-boot.git;a=commitdiff;h=e0d20dc1521e74b82dbd69be53a048847798a90a, but we can't use a patch for the uboot package, since people are using arbitrary versions. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* uboot: ensure host includes are searched before system default includesGravatar Peter Korsgaard2018-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | Commit baae5156ce37e (uboot: use local fdt headers) changed the uboot logic to pass the host include directories with -idirafter instead of -I, so include files local to u-boot would be preferred over host includes. This unfortunately breaks configurations using BR2_TARGET_UBOOT_NEEDS_OPENSSL on hosts with incompatible openssl headers installed in the system default include directories as explained here: http://lists.busybox.net/pipermail/buildroot/2018-March/214651.html The problem is that -idirafter directories gets added to the very end of the search order, AFTER the system default directories. Instead use -isystem which causes the directories to be added after -I but before the system default directories. With this in place, the include directories of u-boot will first be scanned, followed by the host includes and finally the system default include directories. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* uboot: revert "uboot: use local libfdt.h"Gravatar Thomas De Schampheleire2018-02-251-7/+0
| | | | | | | | | This reverts commit 3a6573ccee2624de0c604abf2c7df6704a4cf566. It is no longer necessary after solving the problem differently. Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* uboot: use local fdt headersGravatar Thomas De Schampheleire2018-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit b8c3e941731d ("package/dtc: qemu system build need libfdt") changed the dtc install target from 'install-bin' to 'install', uboot compilation failures occurred because libfdt related headers were now suddenly taken from output/host/include rather than from the uboot sources itself. Commit 3a6573ccee26 ("uboot: use local libfdt.h") solved this by patching one specific uboot source file, tools/fdtgrep.c, to replace '<...>'-style includes by '"..."'-style includes. However, depending on the uboot version, this may not be enough: there may be other references to fdt header files. In particular taking into account that it is not uncommon to have vendor-provided uboot trees which have custom changes. The root of the problem is that the uboot.mk file passes the host compiler as follows: UBOOT_MAKE_OPTS += \ ... HOSTCC="$(HOSTCC) $(HOST_CFLAGS)" \ ... where HOST_CFLAGS contains the string '-I$(HOST_DIR)/include' The uboot makefiles then use constructs of the form: $(CC) $(CPPFLAGS) $(CFLAGS) ..... where CPPFLAGS may contain -I references pointing to local directories. On the expanded compiler command-line, Buildroot's '-I$(HOST_DIR)/include' is thus present _before_ any -I to local directories, and thus takes precedence. And that becomes a problem for header files present both locally as in the Buildroot host directory, which is the case for libfdt. To fix this problem without having to patch u-boot sources, use '-idirafter' rather than '-I' to pass the Buildroot host include directory. '-idirafter' is basically the same thing, but adds the specified directory at the end of the include precedence chain, rather than at the beginning. Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* package/uboot: detect missing user-supplied environment source filesGravatar Yann E. MORIN2017-12-141-6/+13
| | | | | | | | | | | | | | | | | | | | | | Since 0542bb79e8 (uboot: Support multiple environment source files), missing user-supplied environment source files is no longer detected. This is because we cat them all, and feed the concatenation to the stdin of mkenvimage. So, if one source file is missing, the cat exits in error, but the compound command exits with the exit code of the last command, which is that of mkenvimage, which happens to be happy with whatever it is fed on its stdin, even is empty. We fix that by creating a temporary file, that we even leave afterward for the user to inspect. We also move it out of the _CMDS block and into a macro of its own, so that it is easier to write and maintain. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Cam Hutchison <camh@xdna.net> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* uboot: add support for bundling ATF BL31 into U-BootGravatar Jagan Teki2017-12-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some ARM64 platforms (such as Allwinner A64/H5) have a boot process where U-Boot encapsulates the BL31 part of the ARM trusted firmware. For such platforms, we need to build ATF before U-Boot, and pass a BL31 variable pointing to ATF bl31.bin to the U-Boot build process. This commit introduces a BR2_TARGET_UBOOT_NEEDS_ATF_BL31 variable to achieve this. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> [Thomas: - Rename option to BR2_TARGET_UBOOT_NEEDS_ATF_BL31 - Drop changes to arm-trusted-firmware.mk, they are taken care of by previous commits. - Improve Config.in help text - Add missing dependency on arm-trusted-firmware when BR2_TARGET_UBOOT_NEEDS_ATF_BL31 is enabled. - Use bl31.bin from $(BINARIES_DIR) instead of taking it from ATF's build dir.] [Peter: depend on toplevel atf option and select bl31 option. Ensure it cannot be enabled together with ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33 as that would cause circular dependencies] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* uboot: use local libfdt.hGravatar Matt Weber2017-11-061-0/+7
| | | | | | | | | | | | | | | | | Use of libfdt.h by u-boot is currently using the <system-path>. Jan submitted the following upstream https://patchwork.ozlabs.org/patch/833760/ Resolves a failure like this one observed on uboot-tools http://autobuild.buildroot.net/results/347cde4b5c0e6ca76d354396385be4ec1294da73 [Peter: only sed if file exists] CC: Jan Kundrát <jan.kundrat@cesnet.cz> CC: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* u-boot: add option to specify config fragmentsGravatar Peter Korsgaard2017-10-061-0/+1
| | | | | | | | U-Boot nowadays also uses kconfig, so we can handle config fragments like we do for barebox/busybox/linux. Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* uboot: bump to version 2017.07Gravatar Jörg Krause2017-07-211-0/+4
| | | | | | | | | Add a new config option BR2_TARGET_UBOOT_NEEDS_PYLIBFDT for U-Boot targets, like sunxi, needing the Python libfdt library. Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks> [Thomas: drop bogus selects on BR2_PACKAGE_HOST_{PYTHON,SWIG}.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* uboot: apply xtensa overlayGravatar Max Filippov2017-07-091-0/+8
| | | | | | | | | | Xtensa core configuration must be added to U-Boot before it can be built for that xtensa CPU variant. Extract configuration files from the xtensa overlay as is done for other packages that need to be configured for a specific xtensa core. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/binGravatar Arnout Vandecappelle2017-07-051-6/+6
| | | | | | | | | | | Since things are no longer installed in $(HOST_DIR)/usr, the callers should also not refer to it. This is a mechanical change with git grep -l '$(HOST_DIR)/usr/bin' | xargs sed -i 's%$(HOST_DIR)/usr/bin%$(HOST_DIR)/bin%g' Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>