summaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)AuthorFilesLines
2020-05-07menu: add support for client defined statusline functionThirupathaiah Annapureddy1-5/+8
Currently displaying status line is done in a weak function menu_display_statusline(). bootmenu.c overrides the weak default function. It calls menu_default_choice() and interprets the data as struct bootmenu_entry. pxe boot also uses common menu code for pxe menus. If there is a system that enables both bootmenu and pxe, menu_display_statusline() defined in bootmenu.c will be called and it will interpret struct pxe_label as struct bootmenu_entry. This leads to data aborts and pxe menu corruptions. This patch adds support for client defined statusline function to resolve the above bug. Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
2020-05-04Merge tag 'u-boot-imx-20200502' of ↵Tom Rini1-9/+0
https://gitlab.denx.de/u-boot/custodians/u-boot-imx i.MX for 2020.07 ---------------- - imxrt: fix LCD clock, fix doc - new board: Coral Dev - imx8: enable Cache in SPL. SNVS, update SCFW API - imx8MM: fix reset, 8MQ quand and QuadLite, CPU speed grading - MX6ULL : is_imx6ull to include i.MX6ULZ - Net: add config to enable TXC delay Travis: https://travis-ci.org/github/sbabic/u-boot-imx/builds/682033914
2020-05-01Revert "imx: Introduce CONFIG_SPL_FORCE_MMC_BOOT to force MMC boot on falcon ↵Harald Seiler1-9/+0
mode" The CONFIG_SPL_FORCE_MMC_BOOT config flag is not needed as its behavior is the correct one in all cases; using spl_boot_device() instead of the boot_device parameter will lead to inconsistency issues, for example, when a board_boot_order() is defined. In fact, this is the reason the parameter was introduced in the first place, in commit 2b1cdafa9fdd ("common: Pass the boot device into spl_boot_mode()"). This reverts commit 772b55723bcbe8ebe84f579d9cdc831d8e18579d. Link: https://lists.denx.de/pipermail/u-boot/2020-April/405979.html Signed-off-by: Harald Seiler <hws@denx.de>
2020-05-01common/board_r: Drop initr_bedbug wrapperOvidiu Panait1-10/+1
Drop initr_bedbug wrapper and call bedbug_init directly during the init sequence. Signed-off-by: Ovidiu Panait <ovpanait@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-05-01common/board_r: arm: Merge initr_enable_interrupts into interrupts_initOvidiu Panait1-12/+0
initr_enable_interrupts() is an ARM-specific wrapper over enable_interrupts(), which is run during the common init sequence. It can be eliminated by moving the enable_interrupts() call to the end of interrupt_init() function, in arch/arm/lib/interrupts*.c. Signed-off-by: Ovidiu Panait <ovpanait@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-05-01malloc: dlmalloc: add an ability for the malloc to be re-init/init multiple ↵Marek Bykowski1-3/+38
times Malloc gets initialized with a call to mem_malloc_init() with the address the allocation starts to and its size. Currently it is not possible to move the malloc from one memory area to another as the malloc would eventually fail. This patch adds in the ability to re-init the malloc with the updated start address and the size. One of the use cases of this feature is SPL U-Boot running from within the static memory and calling to malloc init from within board_init_f(): arch/arm/cpu/armv8/start.S:reset vector arch/arm/cpu/armv8/start.S:main() arch/arm/lib/crt0_64.S:board_init_f() board/<my_board>/common/spl.c:board_init_f() board/<my_board>/common/spl.c:mem_malloc_init((ulong)CONFIG_SYS_SPL_MALLOC_START, CONFIG_SYS_SPL_MALLOC_SIZE); Shortly after the DDR (main) memory is init and ready we call to malloc init again but this time with the start address in the DDR memory and a much greater size for moving the allocation off the static to the DDR memory: board/<my_board>/common/spl.c:mem_malloc_init((ulong)CONFIG_SPL_MALLOC_OFFSET, CONFIG_SPL_MALLOC_SIZE); Where CONFIG_SYS_SPL_MALLOC_START and CONFIG_SPL_MALLOC_OFFSET are the start addresses of the malloc in the static and DDR memories respectively and CONFIG_SYS_SPL_MALLOC_SIZE=SZ_16K and CONFIG_SPL_MALLOC_SIZE=SZ_2M are the sizes of the mallocs in these memories. Note, now we have a much greater memory, enlarging from 16K to 2M, available for allocation. There is an alternative approach already existing in U-Boot with the use of an early (simplified) malloc and the proper (dlamalloc) malloc however necessitating managing the two mallocs whereas this approach proposes using a single dlmalloc. Signed-off-by: Marek Bykowski <marek.bykowski@gmail.com>
2020-05-01rsa: sig: fix config signature check for fit with paddingPhilippe Reynes1-1/+1
The signature check on config node is broken on fit with padding. To compute the signature for config node, U-Boot compute the signature on all properties of requested node for this config, except for the property "data". But, when padding is used for binary in a fit, there isn't a property "data" but two properties: "data-offset" and "data-size". So to fix the check of signature, we also don't use the properties "data-offset" and "data-size" when checking the signature on config node. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2020-05-01hush: avoid NULL check before free()Heinrich Schuchardt1-2/+1
free() checks if its argument is NULL. Don't duplicate this in the calling code. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-04-28Merge tag 'dm-pull-27apr20' of git://git.denx.de/u-boot-dmTom Rini4-1/+660
Move Python tools to use absolute paths Minor buildman fixes for new features Make libfdt code more similar to upsteam
2020-04-27spl: spl_legacy: Add lzma decompression support for legacy imageWeijie Gao1-2/+60
This patch adds support for decompressing LZMA compressed u-boot payload in legacy uImage format. Using this patch together with u-boot-lzma.img may be useful for some platforms as they can reduce the size and load time of u-boot payload. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com> Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2020-04-27spl: spl_nor: Remove unused variable 'ret' warningStefan Roese1-6/+6
With the if statement now for the legacy image handling, the compiler now generates this compile time warning: common/spl/spl_nor.c:27:6: warning: unused variable 'ret' [-Wunused-variable] This patch removes this warning by changing the 'ret' variable handling. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Weijie Gao <weijie.gao@mediatek.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2020-04-27spl: spl_nor: Move legacy image loading into spl_legacy.cStefan Roese2-8/+27
Move the legacy image loading into spl_legacy.c. This makes it easier to extend the legacy image handling with new features that other SPL loaders might use (e.g. spl_spi.c etc). No functional change intended. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Weijie Gao <weijie.gao@mediatek.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2020-04-27spl: spl_legacy: Use IS_ENABLED() to remove #ifdefStefan Roese1-3/+2
Use IS_ENABLED() instead of #ifdef CONFIG_ to remove one #ifdef. No functional change intended. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Weijie Gao <weijie.gao@mediatek.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2020-04-27spl: Extract legacy image handling into separate fileStefan Roese3-44/+67
This patch moves the legacy image handling into a separate file, which will be extended with other legacy image features later. No function change intended. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Weijie Gao <weijie.gao@mediatek.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2020-04-26log: remove useless castHeinrich Schuchardt1-1/+1
There is no need to cast from (void *) before assigning to a pointer. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-04-26libfdt: split fdt_region declarations out to <fdt_region.h>Masahiro Yamada2-0/+658
fdt_region APIs are not part of libfdt. They are U-Boot extension for the verified boot. Split the declarations related to fdt_region out of <fdt_region.h>. This allows <linux/libfdt.h> to become a simple wrapper file, like Linux does. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-04-26fdt_region: move fdt_region.c to common/ from lib/libfdt/Masahiro Yamada1-0/+1
My goal is to sync lib/libfdt/ with scripts/dtc/libfdt/, that is, make lib/libfdt/ contain only wrapper files. fdt_region.c was written only for U-Boot to implement the verified boot. So, this belongs to the same group as common/fdt_support.c, which is a collection of U-Boot own fdt helpers. Move lib/libfdt/fdt_region.c to common/fdt_region.c . This is necessary only when CONFIG_(SPL_TPL_)_FIT_SIGNATURE is enabled. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-04-24spl: fit: do not check argument of free()Heinrich Schuchardt1-2/+1
The free() function checks if its argument is NULL. It is superfluous to do the same check on the calling side. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-04-24common/board_f: Make reserve_mmu genericOvidiu Panait1-3/+6
Introduce arch_reserve_mmu to allow for architecture-specific reserve_mmu routines. Also, define a weak nop stub for it. Signed-off-by: Ovidiu Panait <ovpanait@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-04-24common/board_f: Move arm-specific reserve_mmu to arch/arm/lib/cache.cOvidiu Panait1-28/+0
Move the ARM-specific reserve_mmu definition from common/board_f.c to arch/arm/lib/cache.c. Signed-off-by: Ovidiu Panait <ovpanait@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-04-24spl: Kconfig: de-dup SPL_DM_GPIO definitionJoel Johnson1-6/+0
Two nearly concurrent commits (d4d65e112 and bcee8d676) added a SPL_DM_GPIO symbol. Resolve the duplication in favor of the version in drivers/gpio/Kconfig. Signed-off-by: Joel Johnson <mrjoel@lixil.net> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2020-04-24dlmalloc: remove unit test support in SPLHeinrich Schuchardt1-1/+1
We cannot run unit tests in SPL. So remove the unit test support. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-04-24common: image_sign_info helper functions in SPLHeinrich Schuchardt2-1/+12
Do not build image_sign_info helper functions in SPL if not needed. Fixes: b983cc2da0ba ("lib: rsa: decouple rsa from FIT image verification") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-23riscv: Introduce SPL_SMP Kconfig option for U-Boot SPLBin Meng1-1/+1
With SBI v0.2 HSM extension, only a single hart need to boot and enter operating system. The booting hart can bring up secondary harts one by one afterwards. For U-Boot running in SPL, SMP can be turned on, while in U-Boot proper, SMP can be optionally turned off if using SBI v0.2 HSM. Introduce a new SPL_SMP Kconfig option to support this. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
2020-04-22Merge tag 'mmc-2020-4-22' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmcTom Rini2-10/+19
- iproc_sdhci memory leak fix and enable R1B resp quirk - more mmc cmds and several mmc updates from Heinirich - Use bounce buffer for tmio sdhci - Alignment check for tmio sdhci
2020-04-22spl: mmc: Rename spl_boot_partition() to spl_mmc_boot_partition()Harald Seiler1-3/+2
This function is only relevant to the MMC driver so calling it spl_boot_partition() might be confusing. Rename it to spl_mmc_boot_partition() to make its purpose more clear (and bring it in line with spl_mmc_boot_mode()). Signed-off-by: Harald Seiler <hws@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-04-22spl: mmc: Rename spl_boot_mode() to spl_mmc_boot_mode()Harald Seiler1-2/+2
The function's name is misleading as one might think it is used generally to select the boot-mode when in reality it is only used by the MMC driver to find out in what way it should try reading U-Boot Proper from a device (either using a filesystem, a raw sector/partition, or an eMMC boot partition). Rename it to spl_mmc_boot_mode() to make it more obvious what this function is about. Link: https://lists.denx.de/pipermail/u-boot/2020-April/405979.html Signed-off-by: Harald Seiler <hws@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-04-22common: bouncebuf: Permit passing custom alignment check functionMarek Vasut1-5/+15
Add extended version of the bounce_buffer_start(), which permits passing in a custom alignment checker function for the buffer. This is useful e.g. on systems with various DMA restrictions and where the checker function might be more complex than a simple CPU cache alignment check. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com>
2020-04-17image: Add a common compression type detection function.Atish Patra1-0/+23
Currently, there is no method that can detect compression types given a file. This is very useful where a compressed kernel image is loaded directly to the memory. Inspect initial few bytes to figure out compression type of the image. It will be used in booti method for now but can be reused any other function in future as well. Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-17board_f.c: Ensure 16 alignment of start_addr_sp and reserved memoryPatrick Delaunay1-14/+18
Add a function reserve_stack_aligned() to reserved memory with 16 bits alignment after the stack pointer (gd->start_addr_sp) and use this new function in board_f.c to reserve all the memory area (malloc, board, gd, fdt, bootstage, stacks). This 16 byte alignment is needed for cast on struct pointer for the reserved memory, for example: + x86_64 ABI: https://reviews.llvm.org/D30049: 16 bytes + ARMv8 Instruction Set Overview: quad word, 16 bytes An other alignment value could be needed for other architecture. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Acked-by: Stephen Warren <swarren@nvidia.com>
2020-04-17board_f.c: Ensure gd->new_bootstage alignmentPatrice Chotard1-0/+5
In reserve_bootstage(), in case size is odd, gd->new_bootstage is not aligned. In bootstage_relocate(), the platform hangs when getting access to data->record[i].name. To avoid this issue, make gd->new_bootstage 16 byte aligned. To ensure that new_bootstage is 16 byte aligned (at least needed for x86_64 and ARMv8) and new_bootstage starts down to get enough space, ALIGN_DOWN macro is used. Fixes: ac9cd4805c8b ("bootstage: Correct relocation algorithm") Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas MANOCHA <vikas.manocha@st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com> Tested-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-04-16log: syslog driverHeinrich Schuchardt3-0/+125
Provide a log driver that broadcasts RFC 3164 messages to syslog servers. rsyslog is one implementation of such a server. The messages are sent to the local broadcast address 255.255.255.255 on port 514. The environment variable log_hostname can be used to provide the HOSTNAME field for the messages. The optional TIMESTAMP field of RFC 3164 is not provided. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-04-16log: correct CONFIG_LOG_TEST prerequisitesHeinrich Schuchardt1-1/+1
An error undefined reference to `do_log_test' occurs for CONFIG_CMD_LOG=y, CONFIG_LOG_TEST=y, CONGIG_UNIT_TEST=n Make CONFIG_UNIT_TEST a prerequisite. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-04-13Merge branch 'next'Tom Rini7-440/+464
Pull in changes that have been pending in our 'next' branch. This includes: - A large number of CI improvements including moving to gcc-9.2 for all platforms. - amlogic, xilinx, stm32, TI SoC updates - USB and i2c subsystem updtaes - Re-sync Kbuild/etc logic with v4.19 of the Linux kernel. - RSA key handling improvements
2020-04-11main: Drop show_boot_progress() prototypeSimon Glass1-5/+0
This is defined in bootstage.h and is not called in this file anyway. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-09usb: Keep async schedule running only across mass storage xfersMarek Vasut2-0/+10
Rather than keeping the asynchronous schedule running always, keep it running only across USB mass storage transfers for now, as it seems that keeping it running all the time interferes with certain control transfers during device enumeration. Note that running the async schedule all the time should not be an issue, especially on EHCI HCD, as that one implements most of the transfers using async schedule. Note that we have usb_disable_asynch(), which however is utterly broken. The usb_disable_asynch() blocks the USB core from doing async transfers by setting a global flag. The async schedule should however be disabled per USB controller. Moreover, setting a global flag does not prevent the controller from using the async schedule, which e.g. the EHCI HCD does. This patch implements additional callback to the controller, which permits it to lock the async schedule and keep it running across multiple transfers. Once the schedule is unlocked, it must also be disabled. This thus prevents the async schedule from running outside of the USB mass storage transfers. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Lukasz Majewski <lukma@denx.de> Cc: Tom Rini <trini@konsulko.com> Tested-by: Tom Rini <trini@konsulko.com> [omap3_beagle, previously failing]
2020-04-08Merge tag 'xilinx-for-v2020.07' of ↵Tom Rini6-38/+53
https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze into next Xilinx changes for v2020.07 common: - Align ENV_FAT_INTERFACE - Fix MAC address source print log - Improve based autodetection code xilinx: - Enable netconsole Microblaze: - Setup default ENV_OFFSET/ENV_SECT_SIZE Zynq: - Multiple DT updates/fixes - Use DEVICE_TREE environment variable for DTB selection - Switch to single zynq configuration - Enable NOR flash via DM - Minor SPL print removal - Enable i2c mux driver ZynqMP: - Print multiboot register - Enable cache commands in mini mtest - Multiple DT updates/fixes - Fix firmware probing when driver is not enabled - Specify 3rd backup RAM boot mode in SPL - Add SPL support for zcu102 v1.1 and zcu111 revA - Redesign debug uart enabling and psu_init delay - Enable full u-boot run from EL3 - Enable u-boot.itb generation without ATF with U-Boot in EL3 Versal: - Enable distro default - Enable others SPI flashes - Enable systems without DDR Drivers: - Gem: - Flush memory after freeing - Handle mdio bus separately - Watchdog: - Get rid of unused global data pointer - Enable window watchdog timer - Serial: - Change reinitialization logic in zynq serial driver Signed-off-by: Tom Rini <trini@konsulko.com>
2020-04-03Revert "common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled"Ye Li1-4/+0
Commit cf8dcc5d02c3 ("common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled") is not correct, it will append fdt to each loadable image. Actually when using TINY FIT, the first loadable image is thought as u-boot and already have fdt appended. Signed-off-by: Ye Li <ye.li@nxp.com> Tested-by: Fabio Estevam <festevam@gmail.com>
2020-04-02rockchip: Enable pre console for rk3399Jagan Teki1-0/+1
Enable pre console buffer for rk3399 platform. This would help to capture the console messages prior to the console being initialised. Enabling this would help to capture all the console messages on video output source like HDMI. So we can find the full console messages of U-Boot proper on HDMI display when enabled it for RK3399 platform boards. Buffer address used for pre console is 0x0f200000 which is ram base plus 240MiB. right now the Allwinner SoC is using similar computation. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
2020-04-01image: Use constants for 'required' and 'key-name-hint'Simon Glass3-7/+9
These are used in multiple places so update them to use a shared #define. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
2020-04-01image: Load the correct configuration in fit_check_signSimon Glass1-2/+4
At present bootm_host_load_images() is passed the configuration that has been verified, but ignores it and just uses the default configuration. This may not be the same. Update this function to use the selected configuration. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-01image: Check hash-nodes when checking configurationsSimon Glass1-3/+33
It is currently possible to use a different configuration's signature and thus bypass the configuration check. Make sure that the configuration node that was hashed matches the one being checked, to catch this problem. Also add a proper function comment to fit_config_check_sig() and make it static. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-01image: Return an error message from fit_config_verify_sig()Simon Glass1-2/+3
This function only returns an error message sometimes. Update it to always return an error message if one is available. This makes it easier to see what went wrong. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-01image: Be a little more verbose when checking signaturesSimon Glass1-1/+1
It is useful to be a little more specific about what is being checked. Update a few messages to help with this. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-01image: Correct comment for fit_conf_get_node()Simon Glass1-18/+0
This should mention that conf_uname can be NULL and should be in the header file. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-01Merge branch 'next' of git://git.denx.de/u-boot-usb into nextTom Rini1-2/+4
2020-03-31image-fit: Allow loading FIT image for VxWorksLihua Zhao1-1/+2
This adds the check against IH_OS_VXWORKS during FIT image load, to allow loading FIT image for VxWorks. Signed-off-by: Lihua Zhao <lihua.zhao@windriver.com> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-03-16spl: Kconfig: Escape '$(ARCH)' in LDSCRIPT entriesTom Rini1-2/+2
The default SPL / TPL linker script is in the $(ARCH) directory. The way we use this today works but isn't ideal. With an update to Kconfig to re-sync with the Linux Kernel, we need to escape the '$' here so that it will end up being evaluated by make. Cc: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
2020-03-13fit: check return value of fit_image_get_data_size()Heinrich Schuchardt1-2/+4
GCC-10 reports: In file included from tools/common/image-fit.c:1: include/image.h: In function ‘fit_image_get_data_and_size’: ./tools/../common/image-fit.c:1015:9: warning: ‘len’ may be used uninitialized in this function [-Wmaybe-uninitialized] 1015 | *size = len; | ~~~~~~^~~~~ ./tools/../common/image-fit.c:996:6: note: ‘len’ was declared here 996 | int len; | ^~~ Add the missing check of the return value of fit_image_get_data_size(). Fixes: c3c863880479 ("add FIT data-position & data-offset property support") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2020-03-12lib: rsa: decouple rsa from FIT image verificationAKASHI Takahiro5-400/+429
Introduce new configuration, CONFIG_RSA_VERIFY which will decouple building RSA functions from FIT verification and allow for adding a RSA-based signature verification for other file formats, in particular PE file for UEFI secure boot. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>