aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-10-15binman: Allow support for writing a size symbol to binariesSimon Glass4-9/+12
It is useful to be able to access the size of an image in SPL, with something like: binman_sym_declare(unsigned long, u_boot_any, size); ... ulong u_boot_size = binman_sym(ulong, u_boot_any, size); Add support for this and update the tests. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Increase size of TPL and SPL test dataSimon Glass7-14/+14
At present these are large enough to hold 20 bytes of symbol data. Add four more bytes so we can add another test. Unfortunately at present this involves changing a few test files to make room. We could adjust the test files to not specify sizes for entries. Then we could make the tests check the actual sizes. But for now, leave it as it is, since the effort is minor. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Avoid needing the section size in advanceSimon Glass3-4/+49
Entries which include a section and need to obtain its contents call GetData(), as with any other entry. But the current implementation of this method in entry_Section requires the size of the section to be known. If it is unknown, an error is produced, since size is None: TypeError: can't multiply sequence by non-int of type 'NoneType' There is no need to know the size in advance since the code can be adjusted to build up the section piece by piece, instead of patching each entry into an existing bytearray. Update the code to handle this and add a test. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Rename some two-digit test filesSimon Glass3-2/+2
Two of the test files somehow were not converted to three digits. Fix them, using the next available numbers. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Use underscore in test filenamesSimon Glass14-14/+14
At present a small number of test files use hyphens instead of underscores. Rename them for consistency. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Allow symbols to be resolved inside sectionsSimon Glass4-10/+67
At present we only support symbols inside binaries which are at the top level of an image. This restrictions seems unreasonable since more complex images may want to group binaries within different sections. Relax the restriction, adding a new _SetupTplElf() helper function. Also fix a typo in the comment for testTpl(). Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Clean up unnecessary code related to ELF test filesSimon Glass3-12/+4
We use the Makefile for all ELF test files now, so drop all the code that checks whether to get the test file from the Makefile or from the git repo. Also add a comment to the Makefile indicating that it is run from binman. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Use the Makefile for u_boot_binman_syms_badSimon Glass3-3/+3
Remove this file from git and instead build it using the Makefile. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Use the Makefile for u_boot_binman_syms_sizeSimon Glass3-3/+4
Remove this file from git and instead build it using the Makefile. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Use the Makefile for u_boot_binman_symsSimon Glass5-9/+13
Remove this file from git and instead build it using the Makefile. With this change a few things need to be adjusted: 1. The 'notes' section no-longer appears at the start of the ELF file (before the code), so update testSymbols to adjust the offsets. 2. The dynamic linker is disabled to avoid errors like: "Not enough room for program headers, try linking with -N" 3. The interpreter note is moved to the end of the image, so that the binman symbols appear first. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Use the Makefile for u_boot_no_ucode_ptrSimon Glass3-6/+6
Remove this file from git and instead build it using the Makefile. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Use the Makefile for u_boot_ucode_ptrSimon Glass6-14/+26
Remove this file from git and instead build it using the Makefile. Update tools.GetInputFilename() to support reading files from an absolute path, so that we can read the Elf test files easily. Also make sure that the temp directory is report in ELF tests as this was commented out. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Use the Makefile to build ELF test filesSimon Glass4-7/+43
At present the ELF test files are checked into the U-Boot tree. This is covenient since the files never change and can be used on non-x86 platforms. However it is not good practice to check in binaries and in this case it does not seem essential. Update the binman test-file Makefile to support having source in a different directory. Adjust binman to run it to build bss_data, as a start. We can add other files as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Use tools.Run() to run objdumpSimon Glass1-1/+1
At present this command silently fails if something goes wrong. Use the tools.Run() function instead, since it reports errors. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Fix IFWI output when using an Intel FIT imageSimon Glass2-4/+4
At present this entry does not work correctly when a FIT image is used as the input. It updates the FIT instead of the output image. The test passed because the FIT image happened to have the right data already. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Add support for Intel FITSimon Glass6-0/+149
A Firmware Image Table (FIT) is a data structure defined by Intel which contains information about various things needed by the SoC, such as microcode. Add support for this entry as well as the pointer to it. The contents of FIT are fixed at present. Future work is needed to support adding microcode, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: x86: Separate out 16-bit reset and init codeSimon Glass8-57/+88
At present these two sections of code are linked together into a single 2KB chunk in a single file. Some Intel SoCs like to have a FIT (Firmware Interface Table) in the ROM and the pointer for this needs to go at 0xffffffc0 which is in the middle of these two sections. Make use of the new 'reset' entry and change the existing 16-bit entry to include just the 16-bit data. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Add support for an x86 'reset' sectionSimon Glass8-1/+203
At present binman has a single entry type for the 16-bit code code needed to start up an x86 processor. This entry is intended to include both the reset vector itself as well as the code to move to 32-bit mode. However this is not very flexible since in some cases other data needs to be included at the top of the SPI flash, in between these two pieces. For example Intel requires that a FIT (Firmware Image Table) pointer be placed 0x40 bytes before the end of the ROM. To deal with this, add a new reset entry for just the reset vector. A subsequent change will adjust the existing 'start16' entry. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Correct use of 'replace' in IFWI testsSimon Glass5-4/+16
At present the Intel IFWI entry uses 'replace' without the 'ifwi-' prefix. This is a fairly generic name which might conflict with the main Entry base class at some point, if more features are added. Add a prefix. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Handle hidden symbols in ELF filesSimon Glass1-1/+1
Some versions of binutils generate hidden symbols which are currently not parsed by binman. Correct this. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Drop .note section from ELFSimon Glass2-1/+4
Recent versions of binutils add a '.note.gnu.property' into the ELF file. This is not required and interferes with the expected output. Drop it. Also fix testMakeElf() to use a different file for input and output. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Allow use of help and entry-docs without libfdtSimon Glass9-13/+44
At present if libfdt is not available binman can't do anything much. Improve the situation a little. Ideally there should be a test to cover this, but I'm not quite sure how to fake this. Signed-off-by: Simon Glass <sjg@chromium.org> (fixed up missing ReadChildData() enty test)
2019-10-15binman: Use cls instead of self for class methodsSimon Glass1-27/+27
It is more common to use the name 'cls' for the class object of a class method, to distinguish it from normal methods, which use 'self' Update the binman tests accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15patman: Update command.Run() to handle failure betterSimon Glass1-2/+8
At present tools are not expected to fail. If they do an exception is raised but there is no detail about what went wrong. This makes it hard to debug if something does actually go wrong. Fix this by outputting both stderr and stdout on failure. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15patman: Drop binary parameterSimon Glass2-10/+8
Since cros_subprocess use bytestrings now, this feature not needed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-14Merge branch 'master' of git://git.denx.de/u-boot-socfpgaTom Rini12-132/+195
- vining_fpga updates
2019-10-14Merge tag 'u-boot-imx-20191014' of ↵Tom Rini49-665/+1270
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20191014 ------------------- Travis: https://travis-ci.org/sbabic/u-boot-imx/builds/597498628 - logicpd pinmux - i.MX7ULP: imx_ddr_size - fixes Toradex i.MX6/i.MX7 - pico-imx7d - tpc70 converted to DM - New Board: meerkat96 - add HAB version command - i.MX8 : imx8: Jump from alias to OCRAM address at SPL init imx8qm/qxp: Set SPL TEXT base to OCRAM base
2019-10-14Merge tag 'video-for-2020.01' of ↵Tom Rini30-61/+3941
https://gitlab.denx.de/u-boot/custodians/u-boot-video - panel bridge support in stm32 ltdc - DSI host uclass - sandbox DSI host uclass test driver and DSI host test - MIPI DSI helpers - Synopsys Designware MIPI DSI host bridge driver - STM32 DSI controller driver - OTM800A and RM68200 panel support - DSI host updates for stm32f769 and stm32mp1 dtsi files - splash screen for stm32f769 and stm32mp1 boards - stm32 defconfig updates for display support
2019-10-14Merge tag 'mmc-10-10-2019' of ↵Tom Rini9-12/+353
https://gitlab.denx.de/u-boot/custodians/u-boot-mmc - Add sdhci driver for Broadcom iProc platform - Add a driver callback for power-cycle for mmc - Implement host_power_cycle callback for stm32_sdmmc2 - spl: dm_mmc: Initialize only the required mmc device
2019-10-14i2c: imx_lpi2c: add ipg clkPeng Fan2-0/+12
The controller needs two clk, per clk and ipg clk, so let's add ipg clk. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-10-14imx :hab: Add hab version commandSjoerd Simons2-0/+22
THe RVT data includes a major and minor version in its header parameter. Add a new command to print this out. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2019-10-14imx: imx8mm_evk: add board_mmc_get_env_devPeng Fan1-0/+5
Add board_mmc_get_env_dev to correctly return devno for mmc env Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-10-14mx7ulp_evk: Use imx_ddr_size()Fabio Estevam1-1/+1
Use imx_ddr_size() to retrieve the total DDR size instead of passing a hardcoded memory size. imx_ddr_size() calculates the memory size based on the actual MMDC registers values and is useful to detect misconfigurations, so switch to this more robust approach. Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-10-14imx: mmdc_size: Allow building it for i.MX7ULPFabio Estevam2-2/+4
i.MX7ULP uses the same MMDC controller IP as found on i.MX53 and i.MX6, so build mmdc_size.c for i.MX7ULP as well. Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-10-14imx: mmdc_size: Fix checkpatch warningsFabio Estevam1-10/+10
The original imx_ddr_size() implementation had some issues reported by checkpatch like this: CHECK: Prefer kernel type 'u32' over 'uint32_t' #127: FILE: arch/arm/mach-imx/mmdc_size.c:16: + uint32_t ctl; WARNING: Prefer 'unsigned int' to bare use of 'unsigned' #151: FILE: arch/arm/mach-imx/mmdc_size.c:40: + unsigned ctl = readl(&mem->ctl); Fix all of them. Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-10-14imx: Place imx_ddr_size() into a separate fileFabio Estevam3-53/+58
Place imx_ddr_size() into a separate file. The motivation for doing this is to be able to easily reuse imx_ddr_size() on i.MX7ULP. Currently imx_ddr_size() is inside arch/arm/mach-imx/cpu.c, which is not built for i.MX7ULP. Changing the logic to allow building cpu.c for i.MX7UP would require adding several ifdef's, leading to a not a very elegant solution. To allow better reuse, just place imx_ddr_size() into a common mmdc_size.c file. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Stefano Babic <sbabic@denx.de>
2019-10-13stm32mp1: configs: add display devicesYannick Fertré3-0/+18
Add support of panels otm8009A, RM68200 & DSI controller. Limit resolution to 1280x800. Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13stm32mp1: configs: update videoYannick Fertré1-0/+7
Update video configs to support bitmap 16bpp, 24bpp, 32bpp & RLE8. Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13ARM: dts: stm32mp1: add dsi host for stm32mp157c-dk2 boardYannick Fertré1-0/+7
The new class dsi host allows the management of the bridge DPI to DSI. This bridge is embedded in the chipset mp1 (come from synopsys company). Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13ARM: dts: stm32mp1: add dsi host for stm32mp157c-ev1 boardYannick Fertré1-0/+5
The new class dsi host allows the management of the bridge DPI to DSI. This bridge is embedded in the chipset mp1 (come from synopsys company). Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13ARM: dts: stm32f769: add display for STM32F769 disco boardYannick Fertré1-0/+62
Enable the display controller, mipi dsi bridge & panel. Set panel display timings. Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13board: Add STM32F769 SoC, discovery board supportYannick Fertré2-0/+64
Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13video: add support of panel RM68200Yannick Fertré3-0/+361
Support for Raydium RM68200 720p dsi 2dl video mode panel. This rm68200 panel driver is based on the Linux Kernel driver from drivers/gpu/drm/panel/panel-raydium-rm68200.c. Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13video: add support of panel OTM8009AYannick Fertré3-0/+389
Support for Orise Tech otm8009a 480p dsi 2dl video mode panel. Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13video: add support of STM32 MIPI DSI controller driverYannick Fertré3-0/+500
Add the STM32 DSI controller driver that uses the Synopsys DesignWare MIPI DSI host controller bridge. Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13video: add MIPI DSI host controller bridgeYannick Fertré3-0/+849
Add a Synopsys Designware MIPI DSI host bridge driver, based on the Rockchip version from rockchip/dw-mipi-dsi.c with phy & bridge APIs. Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13dm: Add a dsi host uclassYannick Fertré11-1/+285
Display Serial Interface (DSI) host can usefully be modelled as their own uclass. DSI defines a serial bus and a communication protocol between the host and the device (panel, bridge). Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13configs: icorem6: Enable nandbcb commandShyam Saini1-0/+4
This also enables mtd configs which are required by nandbcb command. This command would be used to configure boot control block(BCB) while writing spl image on nand device. Signed-off-by: Shyam Saini <shyam.saini@amarulasolutions.com>
2019-10-13colibri_imx7: provide proper node name to pmic_getIgor Opaniuk1-2/+2
Implementation of pmic_get() uses uclass_find_device_by_name(), which behaviour was changed in 4213609cc7 ("drivers: core: use strcmp when find device by name"). Now we have to supply full node name with unit address. Fixes boot issue: U-Boot 2019.07-00788-g0ef6e69a1e-dirty (Jul 19 2019 - 15:27:02 +0300) CPU: Freescale i.MX7D rev1.3 1000 MHz (running at 792 MHz) CPU: Extended Commercial temperature grade (-20C to 105C) at 41C Reset cause: POR DRAM: 512 MiB initcall sequence 9ffd3a4c failed at call 87803c61 (err=-19) ERROR Please RESET the board Fixes: 4213609cc7("drivers: core: use strcmp when find device by name") Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-10-13spl, Makefile: Take external offset into account for fit imagesSjoerd Simons1-0/+1
When building a FIT image for SPL to load also take into account the configured external offset. This allows the SPL to load the u-boot FIT image correctly when configuring SECURE_BOOT on i.mx6 is enabled (with CONFIG_FIT_EXTERNAL_OFFSET=0x3000). Note this doesn't allow secure booting; but it does allow an unsigned SPL/u-boot with secure boot support eanbled to boot on open device. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>