summaryrefslogtreecommitdiff
path: root/Makefile
AgeCommit message (Collapse)Author
2019-05-09Add target to generate initial environmentStefano Babic
The initial environment is linked to the u-boot binary. Modifying the environment from User Space with the env tools requires that the tools are always built together with the bootloader to be sure that they contain the initial environment in case no environment is stored into persistent storage or when a board boots with just the default environment. This makes difficult for distros to provide a general package to access the environment. A simpler way is if the tools are generic for all boards and a configuration file is given to provide the initial environment. The patch just generates the initial environment by extracting it from the compiled object. This file can then be used for tools in user space to initialize the environment. Signed-off-by: Stefano Babic <sbabic@denx.de> (cherry picked from commit bdaa73a5b3923257add182b4ab8058dbfa33421b)
2019-04-11imx8 boot container: rework flash.bin generation for b0 siliconMax Krummenacher
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2019-01-30Makefiles: add a i.MX8 flash.bin targetMax Krummenacher
This is taken from the soc.mak makefile. It relies on an OE deploy dir with the relevant boot binaries. See mx8_boot_img/Makefile for where the mkimage-imx8 and the various boot binaries are taken from. use 'make flash.bin' to build U-Boot and then build the boot image. To flash use: dd if=flash.bin of=${SDCARD} conv=notrunc seek=33 bs=1K Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 72d2432e6fd3166fa45204b5515e04ae1524088e) (cherry picked from commit fe7b38897ec1339e77cf80b409f659019a76fb71)
2018-04-27MLK-17821-1 USB: gadget: Add the cadence USB3 gadget driverYe Li
Porting the cadence USB3 (CDNS3) driver from kernel to u-boot. We only support the gadget (device mode), while the host mode is not supported. Users remains to use xhci-imx8 driver for host mode. Some changes in the CDNS3 driver porting: 1. Add match_ep call back to usb_gadget_ops. The CDNS3 gadget driver replies on this operation to bind the usb_ep/usb_ss_ep with the endpoint descriptor when function layer uses usb_ep_autoconfig to add endpoint descriptors to gadget. So that CDNS3 driver can know the EP information and configure the EP once the set configuration request is received. 2. U-boot does not have CMA, so it won't allocate uncached memory. Need to flush TRB and its DMA buffer before prime to usb controller and after complete transfer. 3. In core.c, we add functions to hook with u-boot. It needs uplayer like to pass the register base address of each part of the USB controller. 4. Force the CDNS3 gadget max speed to HS. The SuperSpeed is not supported by u-boot, so disable it in gadget driver. A configuration USB_CDNS3_GADGET_FORCE_HIGHSPEED is selected. 5. Added gadget_is_cdns3 checking to provide bcdUSB value in device descriptor. 6. Moved some new fields in usb_ep structure to usb_ss_ep, since u-boot does not have them. 7. Remove host part codes as it is not supported by this driver. Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Peter Chen <peter.chen@nxp.com> (cherry picked from commit 70514bd095ff9a94e9a523845641381486284257)
2018-03-13Prepare v2018.03Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-03-05Prepare v2018.03-rc4Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-02-27Makefile: add u-boot-spl.srec targetMarek Vasut
The u-boot-spl.srec is needed for some platforms, add target to generate this file. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Tom Rini <trini@konsulko.com>
2018-02-27Makefile: add u-boot-elf.srec targetMasaru Nagai
The u-boot-elf.srec is needed for some platforms, add target to generate this file. Signed-off-by: Masaru Nagai <masaru.nagai.vx@renesas.com> Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2018-02-23Makefile: Don't mess with .text section location for selected archesAlexey Brodkin
Most of architectures have .text section situated in the very beginning of U-Boot binary and thus it is very logical that CONFIG_SYS_TEXT_BASE is used on final linkage step to specify where U-Boot gets linked to. For that we pass the following construction to the LD: ---------------------------->8----------------------- xxx-ld ... -Ttext $(CONFIG_SYS_TEXT_BASE) ... ---------------------------->8----------------------- But there could be exceptions. For example: 1. In case of ARCv2 we want to put vectors table in its own section .ivt in front of .text section which means we need either add an offset to CONFIG_SYS_TEXT_BASE to compensate for .ivt or don't pass "-Ttext" to the LD at all and specify link base in linker script directly. 2. Some architectures even though have .text section in the very beginning of the U-Boot image still use different symbols to specify link-base: * NIOS2: CONFIG_SYS_MONITOR_BASE (which I really like because that exactly what makes sense - where out image starts but not beginning of its .text section which just happened to match the whole image beginning) * EXTENSA: CONFIG_SYS_TEXT_ADDR * X86: Which doesn't use CONFIG_SYS_MONITOR_BASE in case of EFI otherwise sets explicit link base in u-boot.lds I think that's good to allow for flexibility and don't require each and every architecture or even platform to specify CONFIG_SYS_TEXT_BASE as well as use it to set .text section location. So let's only pass "-Ttext xxx" for those architectures who don't set link-base explicitly in their linker scripts. This patch iaddresses comments for previously sent https://patchwork.ozlabs.org/patch/867540/. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Max Filippov <jcmvbkbc@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com>
2018-02-20Prepare v2018.03-rc3Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-02-12Prepare v2018.03-rc2Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-01-29Prepare v2018.03-rc1Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-01-26Makefile: Add size check to the u-boot.itb make targetMaxime Ripard
The make macro to check if the binary exceeds the board size limit is not called. Make sure that is the case. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-01-12Merge git://git.denx.de/u-boot-tegraTom Rini
2018-01-12Makefile: ensure DTB doesn't overflow into initial stackStephen Warren
With CONFIG_SYS_INIT_SP_BSS_OFFSET enabled, the initial (pre-relocation) stack is placed some distance after bss_start. The control DTB is appended to the U-Boot binary at bss_start. If the DTB is too large, or the SP BSS offset too small, then the initial stack could corrupt the DTB. Enhance the Makefile to check whether this is likely to occur. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2018-01-12riscv: tools: Prelink u-bootRick Chen
Add prelink-riscv to arrange .rela.dyn and .rela.got in compile time. So that u-boot can be directly executed without fixup. Signed-off-by: Chih-Mao Chen <cmchen@andestech.com> Signed-off-by: Rick Chen <rick@andestech.com> Signed-off-by: Rick Chen <rickchen36@gmail.com> Signed-off-by: Greentime Hu <green.hu@gmail.com>
2018-01-08Prepare v2018.01Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-01-01Prepare v2018.01-rc3Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-12-18Prepare v2018.01-rc2Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-12-12binman: tegra: Convert to use binmanSimon Glass
Update tegra to use binman for image creation. This still includes the current Makefile logic, but a later patch will remove this. Three output files are created, all of which combine SPL and U-Boot: u-boot-tegra.bin - standard image u-boot-dtb-tegra.bin - same as u-boot-tegra.bin u-boot-nodtb-target.bin - includes U-Boot without the appended device tree The latter is useful for build systems where the device is appended later, perhaps after being modified. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-12-04Prepare v2018.01-rc1Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-11-21envtools: make sure version/timestamp header file are availableStefan Agner
With commit 84d46e7e8948 ("tools: env: allow to print U-Boot version") the fw_env utilities need the version.h header file. Building only the envtools in a pristine build directory will fail due to missing header files. Make sure the header files are a dependency of the envtools target. Fixes: 84d46e7e8948 ("tools: env: allow to print U-Boot version") Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Tested-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-20Makefile: Correct SPL/TPL/DTB build race conditionM. Vefa Bicakci
When building on a multi-core machine for an SPL-enabled board that also uses CONFIG_OF_EMBED, the following error can be encountered due to a race condition: make[3]: *** No rule to make target 'spl/dts/dt.dtb.o', needed by 'spl/dts/built-in.o'. Stop. ../scripts/Makefile.spl:364: recipe for target 'spl/dts' failed make[2]: *** [spl/dts] Error 2 make[2]: *** Waiting for unfinished jobs.... A reliable way to trigger this race condition is to add "sleep 60" to the end of the "arch-dtbs" rule's recipe in "dts/Makefile" and to build U-Boot against a board which uses the CONFIG_OF_EMBED and CONFIG_SPL options using "make -j8" or a similar command. This commit corrects this race condition via the use of CONFIG_OF_EMBED in the same way that commit 3c00a2c8b5e2 ("Makefile: Correct dependency race condition with TPL") and commit 054b3a1e80fc ("dm: Makefile: Build of-platdata before SPL") use CONFIG_OF_SEPARATE. Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-20Makefile: add coccicheck targetHeinrich Schuchardt
Coccinelle is a program for static code analysis. For details on Coccinelle see http://coccinelle.lip6.fr/ Add scripts/coccicheck copied from Linux kernel v4.14. The coccicheck script executes the tests *.cocci in directory scripts/coccinelle by calling spatch. In Makefile add a coccicheck target. You can use it with make coccicheck MODE=<mode> where mode in patch, report, context, org. Add a copy of Linux v4.14 file Documentation/dev-tools/coccinelle.rst as doc/README.coccinelle. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2017-11-17pylibfdt: compile pylibfdt only when dtoc/binman is necessaryMasahiro Yamada
Currently, pylibfdt is always compiled if swig is installed on your machine. It is really annoying because most of targets (excepts x86, sunxi, rockchip) do not use dtoc or binman. "checkbinman" and "checkdtoc" are wrong. It is odd that the final build stage checks if we have built necessary tools. If your platform depends on dtoc/binman, you must be able to build pylibfdt. If swig is not installed, it should fail immediately. I added PYLIBFDT, DTOC, BINMAN entries to Kconfig. They should be property select:ed by platforms that need them. Kbuild will descend into scripts/dtc/pylibfdt/ only when CONFIG_PYLIBFDT is enabled. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-17pylibfdt: move pylibfdt to scripts/dtc/pylibfdt and refactor makefileMasahiro Yamada
The pylibfdt is used by dtoc (and, indirectly by binman), but there is no reason why it must be generated in the tools/ directory. Recently, U-Boot switched over to the bundled DTC, and the directory structure under scripts/dtc/ now mirrors the upstream DTC project. So, scripts/dtc/pylibfdt is the best location. I also rewrote the Makefile in a cleaner Kbuild style. The scripts from the upstream have been moved as follows: lib/libfdt/pylibfdt/setup.py -> scripts/dtc/pylibfdt/setup.py lib/libfdt/pylibfdt/libfdt.i -> scripts/dtc/pylibfdt/libfdt.i_shipped The .i_shipped is coped to .i during building because the .i must be located in the objtree when we build it out of tree. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-11-13Prepare v2017.11Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-11-06Prepare v2017.11-rc4Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-30Prepare v2017.11-rc3Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-19x86: provide CONFIG_BUILD_ROMHeinrich Schuchardt
Up to now we depended on an exported variable to build u-boot.rom. We should be able to specify it in the configuration file, too. With this patch this becomes possible using the new Kconfig option CONFIG_BUILD_ROM. This option depends on CONFIG_X86 and is selected in qemu-x86_defconfig and qemu-x86_64_defconfig. Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-10-16Prepare v2017.11-rc2Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-05dts: renamed FIT_EMBED to MULTI_DTB_FIT and moved it to the dts KconfigJean-Jacques Hiblot
CONFIG_FIT_EMBED might be confused with CONFIG_OF_EMBED, rename it MULTI_DTB_FIT as it is able to get a DTB from a FIT image containing multiple DTBs. Also move the option to the Kconfig dedicated to the DTS options and create a README for this feature. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-02Prepare v2017.11-rc1Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-09-24dtc: Switch to building and using our own dtc unless providedTom Rini
This makes us act like the Linux Kernel does and allow for dtc to be provided externally but otherwise we use the version of dtc that is included in the sources. This in turn means that we can drop the checkdtc logic. We select DTC in the cases where we will need the dtc tool provided. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-09-22Makefile: Update minimum dtc version to 1.4.3Tom Rini
With support for overlays and calling the -@ flag to dtc we need to have at least 1.4.3 available now. Cc: Simon Glass <sjg@chromium.org> Reported-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-09-12kbuild: Enable -fshort-wcharRob Clark
EFI_LOADER really wants UTF-16 strings (ie. %ls and L"string" are 16bit chars instead of 32bit chars). But rather than enabling -fshort-wchar conditionally if EFI_LOADER is enabled, it was deemed preferrable to globally switch. Signed-off-by: Rob Clark <robdclark@gmail.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-09-11Prepare v2017.09Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-09-05env: Add 'envtools' target to 'make help'Simon Glass
The target is not currently mentioned anywhere. Add it to the help so people can find it. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-09-05env: Fix operation of 'make environ'Simon Glass
This was broken by the recent environment refactoring. Specifically: $ make environ scripts/Makefile.build:59: tools/environ/Makefile: No such file or directory make[1]: *** No rule to make target 'tools/environ/Makefile'. Stop. make: *** [Makefile:1469: environ] Error 2 Fix this by updating the Makefile and adjusting the #include filesnames in two C files. Fixes: ec74f5f (Makefile: Rename 'env' target to 'environ') Reported-by: Måns Rullgård <mans@mansr.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-09-05env: Fix out of tree building of tools-allTom Rini
With the move of environment code from common/ to env/ a number of changes needed to be made to various make targets. We missed updating some of the files required for out of tree builds of the tools. Correct the 'environ' target to know that we need to work under tools/env/ still (not tools/environ/) and then update the wrappers in env_attr.c and env_flags.c to point to the new correct file. Reported-by: Peter Robinson <pbrobinson@gmail.com> Tested-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-09-04Prepare v2017.09-rc4Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-28Prepare v2017.09-rc3Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-20Makefile: honor PYTHON configuration properlyClément Bœsch
On some systems `python` is `python3` (for instance, Archlinux). The `PYTHON` variable can be used to point to `python2` to have a successful build. The use of `PYTHON` is currently limited in the Makefile and needs to be extended in other places: First, pylibfdt is required to be a Python 2 binding (binman imports pylibfdt and is only compatible Python 2), so its setup.py needs to be called accordingly. An alternative would be to change the libfdt setup.py shebang to python2, but the binding is actually portable. Also, it would break on system where there is no such thing as `python2`. Secondly, the libfdt import checks need to be done against Python 2 as well since the Python 2 compiled modules (in this case _libdft.so) can not be imported from Python 3. Note on the libfdt imports: "@if ! PYTHONPATH=tools $(PYTHON) -c 'import libfdt'; then..." is probably simpler than the currently sub-optimal pipe. Reviewed-by: Jonathan Gray <jsg@jsg.id.au>
2017-08-15Move environment files from common/ to env/Simon Glass
About a quarter of the files in common/ relate to the environment. It seems better to put these into their own subdirectory and remove the prefix. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-15Makefile: Rename 'env' target to 'environ'Simon Glass
This target stops us using 'env' as a subdirectory. It is not mentioned in the help so seems to be an internal target. Rename it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-14Prepare v2017.09-rc2Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-13spl: dm: Kconfig: split OF_CONTROL and OF_PLATDATA between SPL and TPLPhilipp Tomsich
For the RK3368, we want to use OF_PLATDATA in TPL, but full OF_CONTROL in SPL: this requires the introduction of a new family of configuration options to decouple SPL_OF_CONTROL and SPL_OF_PLATDATA from TPL. Consequently, Makefile.spl needs to be adjusted to test for these configuration items through the $(SPL_TPL_) macro instead of hard-coding the SPL variant. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-31Prepare v2017.09-rc1Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-07-30Makefile: Export build date as integerAndy Shevchenko
In some cases we would need build date as integer value. Export U_BOOT_BUILD_DATE as %Y%m%d integer value. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-25Makefile: Allow arch post-link hookPaul Burton
This commit allows an architecture to provide a Makefile.postlink whose u-boot target gets invoked after the u-boot ELF is linked. This will be of use for MIPS in a following commit. This mirrors Linux commit fbe6e37dab97 ("kbuild: add arch specific post-link Makefile"). Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Simon Glass <sjg@chromium.org> Cc: u-boot@lists.denx.de Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Tested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>