summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
* cmd: dfu: Add error handling for failed registrationSanchayan Maity2016-09-27-1/+6
| | | | | | | | | Without this, if g_dnl_register() fails, DFU code continues on blindly and crashes. This fix makes it simply print an error message instead. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> [l.majewski@samsung.com - some manual tweaks needed]
* dra7x: boot: add dfu bootmode supportB, Ravi2016-09-27-1/+9
| | | | | | | | This patch enables the DFU boot mode support for dra7x platform. Signed-off-by: Ravi Babu <ravibabu@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* spl: dfu: adding dfu support functions for SPL-DFUB, Ravi2016-09-27-0/+58
| | | | | | | Adding support functions to run dfu spl commands. Signed-off-by: Ravi Babu <ravibabu@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: dfu: saperate the dfu common functionalityB, Ravi2016-09-27-0/+89
| | | | | | | | | The cmd_dfu functionality is been used by both SPL and u-boot, saperating the core dfu functionality moving it to common/dfu.c. Signed-off-by: Ravi Babu <ravibabu@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* spl: dfu: add dfu support in SPLB, Ravi2016-09-27-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Traditionally the DFU support is available only as part 2nd stage boot loader(u-boot) and DFU is not supported in SPL. The SPL-DFU feature is useful for boards which does not have MMC/SD, ethernet boot mechanism to boot the board and only has USB inteface. This patch add DFU support in SPL with RAM memory device support to load and execute u-boot. And then leverage full functionality DFU in u-boot to flash boot inital binary images to factory or bare-metal boards to memory devices like SPI, eMMC, MMC/SD card using USB interface. This SPL-DFU support can be enabled through Menuconfig->Boot Images->Enable SPL-DFU support Signed-off-by: Ravi Babu <ravibabu@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* treewide: replace #include <asm/errno.h> with <linux/errno.h>Masahiro Yamada2016-09-23-3/+3
| | | | | | | | | | | Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have the same content. (both just wrap <asm-generic/errno.h>) Replace all include directives for <asm/errno.h> with <linux/errno.h>. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> [trini: Fixup include/clk.] Signed-off-by: Tom Rini <trini@konsulko.com>
* usb: squash lines for immediate returnMasahiro Yamada2016-09-23-23/+11
| | | | | | This makes functions much simpler. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* image-fit: Fix fit_get_node_from_config semanticsPaul Burton2016-09-22-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit bac17b78dace ("image-fit: switch ENOLINK to ENOENT") changed fit_get_node_from_config to return -ENOENT when a property doesn't exist, but didn't change any of its callers which check return values. Notably it didn't change boot_get_ramdisk, which leads to U-Boot failing to boot FIT images which don't include ramdisks with the following message: Ramdisk image is corrupt or invalid It also didn't take into account that by returning -ENOENT to denote the lack of a property we lost the ability to determine from the return value of fit_get_node_from_config whether it was the property or the configuration node that was missing, which may potentially lead callers to accept invalid FIT images. Fix this by having fit_get_node_from_config return -EINVAL when the configuration node isn't found and -ENOENT when the property isn't found, which seems to make semantic sense. Callers that previously checked for -ENOLINK are adjusted to check for -ENOENT, which fixes the breakage introduced by commit bac17b78dace ("image-fit: switch ENOLINK to ENOENT"). The only other user of the return fit_get_node_from_config return value, indirectly, is bootm_find_os which already checked for -ENOENT. From a read-through of the code I suspect it ought to have been checking for -ENOLINK prior to bac17b78dace ("image-fit: switch ENOLINK to ENOENT") anyway, which would make it right after this patch, but this would be good to get verified by someone who knows this x86 code or is able to test it. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Jonathan Gray <jsg@jsg.id.au> Cc: Marek Vasut <marex@denx.de> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Stefan Roese <sr@denx.de> Acked-by: George McCollister <george.mccollister@gmail.com> Tested-by: George McCollister <george.mccollister@gmail.com>
* Merge branch 'master' of git://git.denx.de/u-boot-mipsTom Rini2016-09-21-0/+6
|\
| * board_f: Add a mach_cpu_init callbackPaul Burton2016-09-21-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we have a mismash of architectures which use arch_cpu_init from architecture-wide code (arc, avr32, blackfin, mips, nios2, xtensa) and architectures which use arch_cpu_init from machine/SoC level code (arm, x86). In order to clean this mess up & allow for both use cases, introduce a new mach_cpu_init callback which is run immediately after arch_cpu_init. This will allow for architectures to have arch-wide code without needing individual machines to all implement their own arch_cpu_init with a call to some common function. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Kconfig: Move config IDENT_STRING to KconfigSiva Durga Prasad Paladugu2016-09-20-0/+5
|/ | | | | | | | | Move the config IDENT_STRING to Kconfig and migrate all boards [sivadur: Migrate zynq boards] Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> [trini: Update configs, add some default to sunxi Kconfig] Signed-off-by: Tom Rini <trini@konsulko.com>
* Kconfig: tpl: Add some TPL support options to KconfigSimon Glass2016-09-16-0/+67
| | | | | | | Some of the SPL options have TPL equivalents. Add these to Kconfig so that we can convert these options over to work from Kconfig. Signed-off-by: Simon Glass <sjg@chromium.org>
* Kconfig: spl: Add SPL support options to KconfigSimon Glass2016-09-16-0/+411
| | | | | | | | There are a lot of SPL options in U-Boot to enable various features and drivers. Currently these do not use Kconfig. Add them to Kconfig along with suitable help, and drop them from the README. Signed-off-by: Simon Glass <sjg@chromium.org>
* Use separate options for TPL supportSimon Glass2016-09-16-1/+11
| | | | | | | | | | | | | | | At present TPL uses the same options as SPL support. In a few cases the board config enables or disables the SPL options depending on whether CONFIG_TPL_BUILD is defined. With the move to Kconfig, options are determined for the whole build and (without a hack like an #undef in a header file) cannot be controlled in this way. Create new TPL options for these and update users. This will allow Kconfig conversion to proceed for these boards. Signed-off-by: Simon Glass <sjg@chromium.org>
* Kconfig: Move SPL settings into their own fileSimon Glass2016-09-16-0/+69
| | | | | | Move the SPL settings into common/spl where most of the SPL code is kept. Signed-off-by: Simon Glass <sjg@chromium.org>
* common, kconfig: move VERSION_VARIABLE to KconfigHeiko Schocher2016-09-09-0/+10
| | | | | | | move VERSION_VARIABLE from board config file into a Kconfig option. Signed-off-by: Heiko Schocher <hs@denx.de>
* image-fit: switch ENOLINK to ENOENTJonathan Gray2016-09-07-1/+1
| | | | | | | ENOLINK is not required by POSIX and does not exist on OpenBSD and likely other systems. Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
* common/Kconfig: Fix various innocuous typos.Robert P. J. Day2016-09-07-11/+11
| | | | | | Correct a small number of spelling mistakes. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
* spl: Rework image header parse to allow abort on raw image and os bootPaul Kocialkowski2016-09-06-4/+7
| | | | | | | | | This reworks spl_set_header_raw_uboot to allow having both os boot (which comes with a valid header) and aborting when no valid header is found (thus excluding raw u-boot.bin images). Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Tom Rini <trini@konsulko.com>
* image-fit: fix fit_image_load() OS checkAndreas Bießmann2016-09-06-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Commit 62afc601883e788f3f22291202d5b2a23c1a8b06 introduced fpga image load via bootm but broke the OS check in fit_image_load(). This commit removes following compiler warning: ---8<--- In file included from tools/common/image-fit.c:1: /Volumes/devel/u-boot/tools/../common/image-fit.c:1715:39: warning: use of logical '||' with constant operand [-Wconstant-logical-operand] os_ok = image_type == IH_TYPE_FLATDT || IH_TYPE_FPGA || ^ ~~~~~~~~~~~~ /Volumes/devel/u-boot/tools/../common/image-fit.c:1715:39: note: use '|' for a bitwise operation os_ok = image_type == IH_TYPE_FLATDT || IH_TYPE_FPGA || ^~ | 1 warning generated. --->8--- Signed-off-by: Andreas Bießmann <andreas@biessmann.org> Cc: Michal Simek <michal.simek@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com>
* net: mii: check phy advertising register when geting link statusDongpo Li2016-08-22-4/+14
| | | | | | | | | | | | When phy autoneg on, the link speed and duplex should be determined by phy advertising register and phy link partner ability register. Check phy advertising register when geting phy link speed and duplex if autoneg on. Signed-off-by: Dongpo Li <lidongpo@hisilicon.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* common: cli_readline: Improve command line editingJames Byrne2016-08-20-31/+67
| | | | | | | | | | | | | | | | | | | | | | This improves the cread_line() function so that it will correctly process the 'Home', 'End', 'Delete' and arrow key escape sequences produced by various terminal emulators. This makes command line editing a more pleasant experience. The previous code only supported the cursor keys and the 'Home' key, and only for certain terminal emulator configurations. This adds support for the 'End and 'Delete' keys, and recognises a wider range of escape sequences. For example, the left arrow key can be 'ESC O D' instead of 'ESC [ D', and the 'Home' key can be 'ESC [ H', 'ESC O H', 'ESC 1 ~' or 'ESC 7 ~', depending on what terminal emulator you use and how it is configured. Signed-off-by: James Byrne <james.byrne@origamienergy.com> Changes for v2 - Explicitly initialize variable to avoid spurious compiler warning. Changes for v3 - Remove unnecessary setting of 'act' to ESC_REJECT (now its default value).
* cmd: Split 'bootz' and 'booti' out from 'bootm'Tom Rini2016-08-20-0/+4
| | | | | | | | | | | | The bootz and booti commands rely on common functionality that is found in common/bootm.c and common/bootm_os.c. They do not however rely on the rest of cmd/bootm.c to be implemented so split them into their own files. Have various Makefiles include the required infrastructure for CONFIG_CMD_BOOT[IZ] as well as CONFIG_CMD_BOOTM. Move the declaration of 'images' over to common/bootm.c. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* common: env_nand: Ensure that we have nand_info[0] prior to useTom Rini2016-08-15-4/+7
| | | | | | | | | | | | | Now that nand_info[] is an array of pointers we need to ensure that it's been populated prior to use. We may for example have ENV in NAND set in configurations that run on boards with and without NAND (where default env is fine enough, such as omap3_beagle and beagleboard (NAND) vs beagle xM (no NAND)). Fixes: b616d9b0a708 ("nand: Embed mtd_info in struct nand_chip") Cc: Scott Wood <oss@buserror.net> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Scott Wood <oss@buserror.net>
* xtensa: add support for the xtensa processor architecture [1/2]Chris Zankel2016-08-15-3/+10
| | | | | | | | | | | | | | The Xtensa processor architecture is a configurable, extensible, and synthesizable 32-bit RISC processor core provided by Cadence. This is the first part of the basic architecture port with changes to common files. The 'arch/xtensa' directory, and boards and additional drivers will be in separate commits. Signed-off-by: Chris Zankel <chris@zankel.net> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* net: mii: Clean up legacy glue that is not usedJoe Hershberger2016-08-15-73/+0
| | | | | | | | The cleanup of the legacy mii registration API that's no longer used now that the drivers have been converted to use the (more) modern API. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* Merge git://git.denx.de/u-boot-dmTom Rini2016-08-12-10/+11
|\
| * fdt_support: fdt_translate_address() blob const correctnessStephen Warren2016-08-12-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | The next patch will call fdt_translate_address() from somewhere with a "const void *blob" rather than a "void *blob", so fdt_translate_address() must accept a const pointer too. Constify the minimum number of function parameters to achieve this. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> Squashed in build fix from Stephen: Signed-off-by: Simon Glass <sjg@chromium.org>
* | common: image: Add support for post-processing of imagesAndreas Dannenberg2016-08-12-1/+25
|/ | | | | | | | | | | | | | | | This commit allows injecting a board/platform/device-specific post- processing function into the FIT image data loading process, which can include modifying the size and altering the starting source address of an image data artifact. This might be desired to do things like strip headers or footers attached to the images before they were packaged into the FIT, or to perform operations such as decryption or authentication. Introduce new configuration option CONFIG_FIT_IMAGE_POST_PROCESS to allow controlling this feature. If enabled, a platform-specific post- process function must be provided. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* spl_nor.c: Support devicetree sizes different from 16kMike Looijmans2016-08-08-2/+2
| | | | | | | | | The devicetrees for various platforms already exceed 16k. Add a define CONFIG_SYS_FDT_SIZE to specify the FDT size, and set to 16k for the two boards that define this CONFIG_SYS_FDT_BASE parameter. This allows platforms with larger devicetree blobs to boot from NOR. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
* libfdt: Introduce new ARCH_FIXUP_FDT optionMichal Simek2016-07-31-5/+2
| | | | | | | | | | Add new Kconfig option to disable arch_fixup_fdt() calls for cases where U-Boot shouldn't update memory setup in DTB file. One example of usage of this option is to boot OS with different memory setup than U-Boot use. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Simon Glass <sjg@chromium.org>
* Merge git://git.denx.de/u-boot-dmTom Rini2016-07-27-9/+2
|\
| * dm: spl: mmc: Support raw partitions with CONFIG_BLKSimon Glass2016-07-27-1/+1
| | | | | | | | | | | | | | | | Fix up the call in mmc_load_image_raw_partition() to use the correct function to obtain the MMC device, so that this code can support driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: Use dm_scan_fdt_dev() directly where possibleSimon Glass2016-07-27-7/+1
| | | | | | | | | | | | | | Quite a few places have a bind() method which just calls dm_scan_fdt_dev(). We may as well call dm_scan_fdt_dev() directly. Update the code to do this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: Convert users from dm_scan_fdt_node() to dm_scan_fdt_dev()Simon Glass2016-07-27-2/+1
| | | | | | | | | | | | | | This new function is more convenient for callers, and handles pre-relocation situations automatically. Signed-off-by: Simon Glass <sjg@chromium.org>
* | Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini2016-07-27-2/+34
|\ \ | |/ |/|
| * splash: Introduce default_splash_locationsAlexey Brodkin2016-07-26-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces default_splash_locations which simplifies splash recovery from the first partition of USB/MMC/SATA drive. Given usual mapping of the first partition of external media for basic boot stuff like uImage/zImage, .dtb etc it looks quite obvious option to put there splash.bmp as well. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Nikita Kiryanov <nikita@compulab.co.il> Cc: Simon Glass <sjg@chromium.org> Cc: Jeroen Hofstee <jeroen@myspectrum.nl> Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * splash: Accommodate DM_USB in splash_init_usb()Alexey Brodkin2016-07-25-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation of splash_init_usb() requires usb_stor_scan() which doesn't exist in case of DM_USB simply because real probing happens right in usb_init(). So disable usage of usb_stor_scan() in case of DM_USB. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Nikita Kiryanov <nikita@compulab.co.il> Cc: Simon Glass <sjg@chromium.org> Cc: Jeroen Hofstee <jeroen@myspectrum.nl> Cc: Anatolij Gustschin <agust@denx.de> Cc: Robert Winkler <robert.winkler@boundarydevices.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | common: fit: Allow U-Boot images to be bootedmario.six@gdsys.cc2016-07-25-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In certain circumstances it comes in handy to be able to boot into a second U-Boot. But as of now it is not possible to boot a U-Boot binary that is inside a FIT image, which is problematic for projects that e.g. need to guarantee a unbroken chain of trust from SOC all the way into the OS, since the FIT signing mechanism cannot be used. This patch adds the capability to load such FIT images. An example .its snippet (utilizing signature verification) might look like the following: images { firmware@1 { description = "2nd stage U-Boot image"; data = /incbin/("u-boot-dtb.img.gz"); type = "firmware"; arch = "arm"; os = "u-boot"; compression = "gzip"; load = <0x8FFFC0>; entry = <0x900000>; signature@1 { algo = "sha256,rsa4096"; key-name-hint = "key"; }; }; }; Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Tom Rini <trini@konsulko.com>
* | spl: fit: Fix the number of bytes read in raw modeLokesh Vutla2016-07-22-1/+3
| | | | | | | | | | | | | | | | | | | | | | In raw mode a full sector is to be read even if image covers part of a sector. Number of sectors are calculated as ROUND_UP(size)/sec_size by FIT framework. This calculation assumes that image is at the 0th offset of a sector, which is not true always in FIT case. So, include the image offset while calculating number of sectors. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | spl: zImage support in Falcon modeLadislav Michl2016-07-22-0/+23
| | | | | | | | | | | | | | | | Other payload than uImage is currently considered to be raw U-Boot image. Check also for zImage in Falcon mode. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Reviewed-by: Heiko Schocher <hs@denx.de>
* | spl: support loading from UBI volumesLadislav Michl2016-07-22-0/+87
| | | | | | | | | | | | | | | | Add support for loading from UBI volumes on the top of NAND and OneNAND. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Reviewed-by: Heiko Schocher <hs@denx.de>
* | Kconfig: Move option CONFIG_SYS_NO_FLASH to KconfigSiva Durga Prasad Paladugu2016-07-22-0/+6
| | | | | | | | | | | | | | | | | | Move config option CONFIG_SYS_NO_FLASH as Kconfig option. All the boards which needs to enable this option can be done through defconfigs Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | spl: Fix compilation warnings for arm64Michal Simek2016-07-22-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make code 64bit aware. Warnings: +../arch/arm/lib/spl.c: In function ‘jump_to_image_linux’: +../arch/arm/lib/spl.c:63:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] +../common/spl/spl_fat.c: In function ‘spl_load_image_fat’: +../common/spl/spl_fat.c:91:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini2016-07-19-1/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: arch/arm/cpu/armv8/Makefile arch/arm/lib/bootm-fdt.c
| * | armv8: Add tlb_allocated to arch global dataYork Sun2016-07-15-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | When secure ram is used, MMU tables have to be put into secure ram. To use common MMU code, gd->arch.tlb_addr will be used to host TLB entry pointer. To save allocated memory for later use, tlb_allocated variable is added to global data structure. Signed-off-by: York Sun <york.sun@nxp.com>
| * | armv8: Move secure_ram variable out of generic global dataYork Sun2016-07-15-1/+1
| | | | | | | | | | | | | | | | | | | | | Secure_ram variable was put in generic global data. But only ARMv8 uses this variable. Move it to ARM specific data structure. Signed-off-by: York Sun <york.sun@nxp.com>
* | | Various, unrelated tree-wide typo fixes.Robert P. J. Day2016-07-16-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a number of typos, including: * "compatble" -> "compatible" * "eanbeld" -> "enabled" * "envrionment" -> "environment" * "FTD" -> "FDT" (for "flattened device tree") * "ommitted" -> "omitted" * "overriden" -> "overridden" * "partiton" -> "partition" * "propogate" -> "propagate" * "resourse" -> "resource" * "rest in piece" -> "rest in peace" * "suport" -> "support" * "varible" -> "variable" Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
* | | Merge branch 'master' of http://git.denx.de/u-boot-sunxiTom Rini2016-07-15-2/+2
|\ \ \
| * | | sunxi: Support booting from SPI flashSiarhei Siamashka2016-07-15-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allwinner devices support SPI flash as one of the possible bootable media type. The SPI flash chip needs to be connected to SPI0 pins (port C) to make this work. More information is available at: https://linux-sunxi.org/Bootable_SPI_flash This patch adds the initial support for booting from SPI flash. The existing SPI frameworks are not used in order to reduce the SPL code size. Right now the SPL size grows by ~370 bytes when CONFIG_SPL_SPI_SUNXI option is enabled. While there are no popular Allwinner devices with SPI flash at the moment, testing can be done using a SPI flash module (it can be bought for ~2$ on ebay) and jumper wires with the boards, which expose relevant pins on the expansion header. The SPI flash chips themselves are very cheap (some prices are even listed as low as 4 cents) and should not cost much if somebody decides to design a development board with an SPI flash chip soldered on the PCB. Another nice feature of the SPI flash is that it can be safely accessed in a device-independent way (since we know that the boot ROM is already probing these pins during the boot time). And if, for example, Olimex boards opted to use SPI flash instead of EEPROM, then they would have been able to have U-Boot installed in the SPI flash now and boot the rest of the system from the SATA hard drive. Hopefully we may see new interesting Allwinner based development boards in the future, now that the software support for the SPI flash is in a better shape :-) Testing can be done by enabling the CONFIG_SPL_SPI_SUNXI option in a board defconfig, then building U-Boot and finally flashing the resulting u-boot-sunxi-with-spl.bin binary over USB OTG with a help of the sunxi-fel tool: sunxi-fel spiflash-write 0 u-boot-sunxi-with-spl.bin The device needs to be switched into FEL (USB recovery) mode first. The most suitable boards for testing are Orange Pi PC and Pine64. Because these boards are cheap, have no built-in NAND/eMMC and expose SPI0 pins on the Raspberry Pi compatible expansion header. The A13-OLinuXino-Micro board also can be used. Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com>