summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Makefile: sunxi: Don't use binman to build ATF imageSimon Glass2020-08-081-0/+4
| | | | | | | | | | | | | | At present with sunxi 64-bit, the Makefile builds u-boot-sunxi-with-spl.bin and then binman overwrites it with its own version. But the binman definition lacks some parts, in particular BL31. For now, work around this with a hack. Tested-by: Andre Przywara <andre.przywara@arm.com> Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 42b18df80fd ("x86: Makefile: Drop explicit targets built by binman")
* test/py: serial# cannot be overwritten on some devicesHeinrich Schuchardt2020-08-081-2/+5
| | | | | | | | | | | On some devices the environment variable serial# cannot be overwritten. Set the variable only if it is not set. For our unit test it is sufficient to test if any value for serial-number is set. Fixes: 8a5cdf601f8d ("test: efi_selftest: Do not force serial# setting") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* Merge branch '2020-08-07-misc-improvements'Tom Rini2020-08-08122-352/+3535
|\ | | | | | | | | - SquashFS support - Assorted bugfixes
| * test: py: test_shell_run() with CONFIG_HUSH_PARSER=nWIP/2020-08-07-misc-improvementsHeinrich Schuchardt2020-08-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hush parser not enabled for some boards, e.g. sipeed_maix_bitm_defconfig. With CONFIG_HUSH_PARSER=n a double quotation mark is not interpreted as the beginning of a string. Use a single quotation mark instead. Furthermore without the hush parser variables have to be referenced as ${varname}. Add the missing braces. Reported-by: Sean Anderson <seanga2@gmail.com> Fixes: 8b86c609b860 ("test/py: add test of basic shell functionality") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * tests: support mkfs.ext4 without metadata_csumStephen Warren2020-08-072-3/+8
| | | | | | | | | | | | | | Modify various test/py filesystem creation routines to support systems that don't implement the metadata_csum ext4 feature. Signed-off-by: Stephen Warren <swarren@nvidia.com>
| * board: presidio: add LED supportJway Lin2020-08-071-0/+31
| | | | | | | | | | | | | | | | | | | | Add LED support for Cortina Access Presidio Engineering Board Signed-off-by: Jway Lin <jway.lin@cortina-access.com> Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com> Reviewed-by: Simon Glass <sjg@chromium.org> CC: Simon Glass <sjg@chromium.org>
| * led: led_cortina: Add CAxxx LED supportJway Lin2020-08-074-1/+310
| | | | | | | | | | | | | | | | | | | | | | Add Cortina Access LED controller support for CAxxxx SOCs Signed-off-by: Jway Lin <jway.lin@cortina-access.com> Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com> CC: Simon Glass <sjg@chromium.org> Add head file fixed link error and remove unused flashing function Reviewed-by: Simon Glass <sjg@chromium.org>
| * Travis: Add squashfs-toolsTom Rini2020-08-071-0/+1
| | | | | | | | | | | | | | So that the tests we now have for squashfs can run, add squashfs-tools for mksquashfs. Signed-off-by: Tom Rini <trini@konsulko.com>
| * test/py: Add tests for the SquashFS commandsJoao Marcos Costa2020-08-075-0/+103
| | | | | | | | | | | | | | | | Add Python scripts to test 'ls' and 'load' commands. The scripts generate a SquashFS image and clean the directory after the assertions, or if an exception is raised. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
| * fs/fs.c: add symbolic link case to fs_ls_generic()Joao Marcos Costa2020-08-071-0/+3
| | | | | | | | | | | | Adds an 'else if' statement inside the loop to check for symbolic links. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
| * fs/squashfs: add support for zlib decompressionJoao Marcos Costa2020-08-071-0/+30
| | | | | | | | | | | | | | Add call to zlib's 'uncompress' function. Add function to display the right error message depending on the decompression's return value. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
| * include/u-boot, lib/zlib: add sources for zlib decompressionJoao Marcos Costa2020-08-075-0/+140
| | | | | | | | | | | | | | | | | | Add zlib (v1.2.11) uncompr() function to U-Boot. SquashFS depends on this function to decompress data from a raw disk image. The actual support for zlib into SquashFS sources will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
| * fs/squashfs: add filesystem commandsJoao Marcos Costa2020-08-074-0/+50
| | | | | | | | | | | | Add 'ls' and 'load' commands. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
| * fs/squashfs: new filesystemJoao Marcos Costa2020-08-0716-0/+2297
| | | | | | | | | | | | | | Add support for SquashFS filesystem. Right now, it does not support compression but support for zlib will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
| * cmd: Update the memory-search commandSimon Glass2020-08-078-43/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add various fixes and improvements to this command that were missed in the original version. Unfortunately I forgot to send v2. - Fix Kconfig name - Use a separate variable for the remaining search length - Correct a minor bug - Move into a separate test suite - Add -q flag to the 'quiet' test to test operation when console is enabled - Enable the feature for sandbox Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Add a flag for tests that need console recordingSimon Glass2020-08-072-0/+11
| | | | | | | | | | | | | | Allow tests that need console recording to be marked, so they can be skipped if it is not available. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: Rename DM test flags to make them more genericSimon Glass2020-08-0777-300/+301
| | | | | | | | | | | | | | | | | | | | The test flags used by driver model are currently not available to other tests. Rather than creating two sets of flags, make these flags generic by changing the DM_ prefix to UT_ and moving them to the test.h header. This will allow adding other test flags without confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
| * console: Always define the console-recording functionsSimon Glass2020-08-072-2/+42
| | | | | | | | | | | | | | | | | | | | | | | | On boards without console recording these function are currently missing. It is more convenient for them to be present but to return dummy values. That way if we know that a test needs recording, we can check if it is available, and skip the test if not, while avoiding #ifdefs. Update the header file according and adjust console_record_reset_enable() to return an error if recording is not available. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Add a way to check part of a console line or skip itSimon Glass2020-08-072-0/+81
|/ | | | | | | | | | | | | Some lines of the output are not worth testing, or not worth testing in their entirety. For example, when checking a hex dump we know that the hex-dump routine can display ASCII so we only need to check the hex bytes, not the ASCII dump. Add a new test macros which can check only part of a console line. Sometimes it is useful to skip a line altogether, so add a macro for that also. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge branch '2020-08-07-mkimage-improvements'Tom Rini2020-08-072-46/+64
|\ | | | | | | - Assorted mkimage improvements related to FIT images and verified boot
| * mkimage: fit: fix import of external dataPatrick Oppenlander2020-08-071-2/+2
| | | | | | | | | | | | | | The external data is located after the mmapped FDT pointed to by 'old_fdt', not in the newly created FDT we are importing into at 'fdt'. Signed-off-by: Patrick Oppenlander <patrick.oppenlander@gmail.com>
| * mkimage: fit: include image cipher in configuration signaturePatrick Oppenlander2020-08-071-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | This patch addresses issue #2 for signed configurations. -----8<----- Including the image cipher properties in the configuration signature prevents an attacker from modifying cipher, key or iv properties. Signed-off-by: Patrick Oppenlander <patrick.oppenlander@gmail.com> Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
| * mkimage: fit: don't cipher ciphered dataPatrick Oppenlander2020-08-071-1/+14
| | | | | | | | | | | | | | | | Previously, mkimage -F could be run multiple times causing already ciphered image data to be ciphered again. Signed-off-by: Patrick Oppenlander <patrick.oppenlander@gmail.com> Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
| * mkimage: fit: handle FDT_ERR_NOSPACE when cipheringPatrick Oppenlander2020-08-071-9/+10
| | | | | | | | | | | | | | | | Also replace fdt_delprop/fdt_setprop with fdt_setprop as fdt_setprop can replace an existing property value. Signed-off-by: Patrick Oppenlander <patrick.oppenlander@gmail.com> Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
| * mkimage: fit: only process one cipher nodePatrick Oppenlander2020-08-071-35/+22
|/ | | | | | | | | | | | | Previously mkimage would process any node matching the regex cipher.* and apply the ciphers to the image data in the order they appeared in the FDT. This meant that data could be inadvertently ciphered multiple times. Switch to processing a single cipher node which exactly matches FIT_CIPHER_NODENAME. Signed-off-by: Patrick Oppenlander <patrick.oppenlander@gmail.com> Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
* Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usbWIP/06Aug2020Tom Rini2020-08-064-25/+24
|\ | | | | | | - XHCI updates to support MIPS better
| * usb: xhci: Add virt_to_phys() to support mapped platformsStefan Roese2020-08-053-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some platforms, like MIPS Octeon, use mapped addresses (virtual address != physical address). On these platforms we need to make sure, that the local virtual addresses are converted to physical (DMA) addresses for the xHCI controller. This patch adds the missing virt_to_phys() calls, so that the correct addresses are used. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Marek Vasut <marex@denx.de>
| * usb: usb-uclass.c: Drop le16_to_cpu() as values are already swappedStefan Roese2020-08-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | These values are already swapped to CPU endianess, so swapping them again is a bug. Let's remove the swap here instead. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Marek Vasut <marex@denx.de>
| * usb: xhci: xhci_mem_init: Use cpu_to_le64() and not xhci_writeq()Stefan Roese2020-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | xhci_writeq() makes the CPU->LE swapping only when addressing registers in the xHCI controller address range and not in the local memory (RAM). We need to use cpu_to_le64() here to ensure that the conversion is done correctly. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Marek Vasut <marex@denx.de>
| * usb: xhci: Add missing endian conversions (cpu_to_leXX / leXX_to_cpu)Stefan Roese2020-08-051-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | While trying to use the U-Boot xHCI driver on the MIPS Octeon platform, which is big endian, I noticed that the driver is missing a few endian conversion calls. This patch adds these missing endian conversion calls. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Marek Vasut <marex@denx.de>
* | Merge branch '2020-08-06-Kconfig-sram-options'Tom Rini2020-08-0621-112/+155
|\ \ | | | | | | | | | - Migrate a few SRAM related options to Kconfig, related cleanups.
| * | common/board_r: Move blkcache_init call earlier in the boot sequenceWIP/2020-08-06-Kconfig-sram-optionsOvidiu Panait2020-08-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | blkcache_init manually relocates blkcache list pointers when CONFIG_NEEDS_MANUAL_RELOC is enabled. However, it is called very late in the boot sequence, which could be a problem if previous boot calls execute blkcache operations with the non-relocated pointers. For example, mmc is initialized earlier and might call blkcache_invalidate (in mmc_select_hwpart()) when trying to load the environment from mmc via env_load(). To fix this issue, move blkcache_init boot call earlier, before mmc gets initialized. Acked-by: Angelo Dureghello <angelo.dureghello@timesys.com> Tested-by: Angelo Dureghello <angelo.dureghello@timesys.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
| * | blkcache: Extend blkcache_init to cover CONFIG_NEEDS_MANUAL_RELOCOvidiu Panait2020-08-062-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend manual relocation of block_cache list pointers to all platforms that enable CONFIG_NEEDS_MANUAL_RELOC. Remove m68k-specific checks and provide a single implementation that adds gd->reloc_off to the pre-relocation pointers. Acked-by: Angelo Dureghello <angelo.dureghello@timesys.com> Tested-by: Angelo Dureghello <angelo.dureghello@timesys.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Eric Nelson <eric@nelint.com> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> [trini: Add guard around DECLARE_GLOBAL_DATA_PTR to avoid size growth] Signed-off-by: Tom Rini <trini@konsulko.com>
| * | common/board_r: Remove initr_serial wrapperOvidiu Panait2020-08-061-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | Remove the initr_serial->serial_initialize indirection and call serial_initialize directly. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
| * | drivers: serial: Make serial_initialize return intOvidiu Panait2020-08-063-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | serial_initialize is called only during the common init sequence, after relocation (in common/board_r.c). Because it has a void return value, it has to wrapped in initr_serial. In order to be able to get rid of this indirection, make serial_initialize return int. Remove extern from prototype in order to silence the following checkpatch warning: check: extern prototypes should be avoided in .h files Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
| * | dm: blk: Use IS_ENABLED() instead of #ifdefs in blk_post_probeOvidiu Panait2020-08-061-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use IS_ENABLED() instead of #ifdef in blk_post_probe function. No functional change intended. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> [trini: Fix thinko and use CONFIG_HAVE_BLOCK_DEVICE in IS_ENABLED()] Signed-off-by: Tom Rini <trini@konsulko.com>
| * | board_f: Remove setup_board_part1Ovidiu Panait2020-08-061-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | Now that all arch specific code was converted to setup_bdinfo, we can remove setup_board_part1. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
| * | board_f: ppc: Factor out ppc-specific bdinfo setupOvidiu Panait2020-08-062-34/+27
| | | | | | | | | | | | | | | | | | | | | | | | Factor out ppc-specific bdinfo setup from generic init sequence to arch_setup_bdinfo in arch/powerpc/lib/bdinfo.c. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
| * | board_f: m68k: Factor out m68k-specific bdinfo setupOvidiu Panait2020-08-062-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Factor out m68k-specific bdinfo setup to arch_setup_bdinfo in arch/m68k/lib/bdinfo.c. Also, use if(IS_ENABLED()) instead of #ifdef where possible. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
| * | board_f: Move sram bdinfo assignments to generic codeOvidiu Panait2020-08-061-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move sram related bdinfo from arch-specific setup_board_part1 to generic code in setup_bdinfo. Also use "if (IS_ENABLED(CONFIG_SYS_HAS_SRAM))" instead of "#ifdef CONFIG_SYS_SRAM_BASE". Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
| * | board_f: Factor out bdinfo bi_mem{start, size} to setup_bdinfoOvidiu Panait2020-08-066-18/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move all assignments to gd->bd->bi_mem{start,size} to generic code in setup_bdinfo. Xtensa architecture is special in this regard as it defines its own handling of gd->bd->bi_mem{start,size} fields. In order to avoid defining a weak SDRAM function, let arch_setup_bdinfo overwrite the generic flags. For ARC architecture, remove ARCH_EARLY_INIT_R from Kconfig since it is not needed anymore. Also, use gd->ram_base to populate bi_memstart to avoid an ifdef. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Acked-by: Alexey Brodkin <abrokdin@synopsys.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | board_f: Introduce arch_setup_bdinfo initcallOvidiu Panait2020-08-062-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain architectures (ppc, mips, sh, m68k) use setup board_part1 and setup_board_part2 calls during pre-relocation init to populate gd->bd boardinfo fields. This makes the generic init sequence cluttered with arch-specific ifdefs. In order to clean these arch-specific sequences from generic init, introduce arch_setup_bdinfo weak initcall so that everyone can define their own bdinfo setup routines. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
| * | board_f: Introduce setup_bdinfo initcallOvidiu Panait2020-08-062-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | Introduce setup_bdinfo initcall as a generic routine to populate bdinfo fields. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
| * | cmd: bdinfo: Move sram info prints to generic codeOvidiu Panait2020-08-063-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | bi_sramstart and bi_sramsize are generic members of the bd_info structure, so move the m68k/powerpc-specific prints to generic code. Also, print them only if SRAM support is enabled via CONFIG_SYS_HAS_SRAM. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
| * | Kconfig: Remove CONFIG_SYS_SRAM_STARTOvidiu Panait2020-08-064-7/+2
| | | | | | | | | | | | | | | | | | | | | Remove ad-hoc CONFIG_SYS_SRAM_START and use CONFIG_SYS_SRAM_BASE instead. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
| * | Kconfig: Convert CONFIG_SYS_SRAM_SIZE to KconfigOvidiu Panait2020-08-065-5/+7
| | | | | | | | | | | | | | | | | | | | | This converts ad-hoc CONFIG_SYS_SRAM_SIZE to Kconfig. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
| * | Kconfig: Convert CONFIG_SYS_SRAM_BASE to KconfigOvidiu Panait2020-08-063-2/+5
| | | | | | | | | | | | | | | | | | | | | This converts ad-hoc CONFIG_SYS_SRAM_BASE to Kconfig. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
| * | Kconfig: Introduce CONFIG_SYS_HAS_SRAMOvidiu Panait2020-08-061-0/+11
|/ / | | | | | | | | | | | | | | | | In order to be able to replace "#ifdef CONFIG_SYS_SRAM_BASE" sequences with the IS_ENABLED() equivalent, introduce a new boolean Kconfig option that signals whether the platform has SRAM support. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
* | Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvellTom Rini2020-08-0619-28/+719
|\ \ | | | | | | | | | | | | - Cleanup in Marvell bubt cmd (Tom & Jagan) - Add a series of MikroTik CRS3xx, 98DX3236 based switches (Luka)
| * | mvebu: bubt: Drop dead codeTom Rini2020-08-061-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code around CONFIG_SYS_MMC_ENV_PART has been untested since merge. This can be seen by it referencing 'mmc->part_num' which was migrated elsewhere prior to this code being merged. Cc: Joel Johnson <mrjoel@lixil.net> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Stefan Roese <sr@denx.de> Reviewed-by: Stefan Roese <sr@denx.de>