summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* test: pinmux: add pincontrol-gpio for pin configurationPatrick Delaunay2020-04-161-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a simple pincontrol associated to the sandbox gpio driver, that allows to check pin configuration with the command pinmux. The pinmux test is also updated to test behavior with 2 pincontrols. Example to check LED pin configuration: => pinmux list | Device | Driver | Parent | pinctrl-gpio | sandbox_pinctrl_gpio | root_driver | pinctrl | sandbox_pinctrl | root_driver => pinmux dev pinctrl-gpio => pinmux status a0 : gpio input . a1 : gpio input . a2 : gpio input . a3 : gpio input . a4 : gpio input . a5 : gpio output . a6 : gpio output . ... Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* test: dm: update test for pins configuration in gpioPatrick Delaunay2020-04-162-7/+61
| | | | | | | | | | | Add tests for new API set_dir_flags and set_dir_flags and associated code in gpio uclass. Test support for new flags GPIO_OPEN_DRAIN, GPIO_OPEN_SOURCE GPIO_PULL_UP and GPIO_PULL_DOWN. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* test: dm: update test for pins configuration in pinctrl nodePatrick Delaunay2020-04-161-10/+18
| | | | | | | | | | | | Add test for "pins" configuration in gpio uclass with set_state() ops and test for generic parsing of pinconf_param array). set_state() is called by: - pinctrl_generic_set_state |- pinctrl_generic_set_state_subnode Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* gpio: remove the open_drain API and opsPatrick Delaunay2020-04-161-7/+0
| | | | | | | | | | | | | | This patch removes the ops get_open_drain/set_open_drain and the API dm_gpio_get_open_drain/dm_gpio_set_open_drain. The ops only provided in one driver (mpc8xxx gpio) and the associated API is never called in boards. This patch prepare a more generic set/get_dir_flags ops, including the open drain property. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* dm: core: add ofnode and dev function to iterate on node propertyPatrick Delaunay2020-04-162-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add functions to iterate on all property with livetree - dev_read_first_prop - dev_read_next_prop - dev_read_prop_by_prop and - ofnode_get_first_property - ofnode_get_next_property - ofnode_get_property_by_prop And helper: dev_for_each_property For example: struct ofprop property; dev_for_each_property(property, config) { value = dev_read_prop_by_prop(&property, &propname, &len); or: for (res = ofnode_get_first_property(node, &property); !res; res = ofnode_get_next_property(&property)) { value = ofnode_get_property_by_prop(&property, &propname, &len); .... } Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Merge tag 'efi-2020-07-rc1' of ↵WIP/16Apr2020Tom Rini2020-04-166-0/+700
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-07-rc1 This pull request * provides an implementation of UEFI secure booting * fixes a problem with the rsa_mod_exp driver which stops some boards from booting when CONFIG_RSA is enabled which is needed for UEFI secure booting * enables the EFI_RNG_PROTOCOL if DM_RNG is enabled * fixes some function comments
| * efi_loader, pytest: add UEFI secure boot tests (image)AKASHI Takahiro2020-04-162-0/+238
| | | | | | | | | | | | | | | | | | | | Provide test cases for * image authentication for signed images (test_efi_secboot/test_signed.py) * image authentication for unsigned images (test_efi_secboot/test_unsigned.py) Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
| * efi_loader, pytest: add UEFI secure boot tests (authenticated variables)AKASHI Takahiro2020-04-161-0/+282
| | | | | | | | | | | | Provide a couple of test cases for variable authentication. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
| * efi_loader, pytest: set up secure boot environmentAKASHI Takahiro2020-04-163-0/+180
| | | | | | | | | | | | | | | | | | | | | | A fixture for UEFI secure boot tests (image authentication and variable authentication) is defined. A small file system with test data in a single partition formatted in fat is created. This test requires efitools v1.5.2 or later. If the system's efitools is older, you have to build it on your own and define EFITOOLS_PATH. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
* | Merge tag 'dm-pull-10apr20-take2' of git://git.denx.de/u-boot-dmTom Rini2020-04-1610-2/+590
|\ \ | | | | | | | | | | | | | | | | | | | | | Functions for reading indexed values from device tree Enhancements to 'dm' command Log test enhancements and syslog driver DM change to read parent ofdata before children Minor fixes
| * | dm: core: Read parent ofdata before childrenSimon Glass2020-04-161-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present a device can read its ofdata before its parent has done the same. This can cause problems in the case where the parent has a 'ranges' property, thus affecting the operation of dev_read_addr(), for example. We already probe parent devices before children so it does not seem to be a large step to do the same with ofdata. Make the change and update the documentation in this area. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Ley Foon Tan <ley.foon.tan@intel.com>
| * | test: fdtdec: test fdtdec_set_carveout()Laurentiu Tudor2020-04-162-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new test for fdtdec_set_carveout(). Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org> Drop blank line at EFO: Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: core: support reading a single indexed u32 valueDario Binacchi2020-04-161-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | The patch adds helper functions to allow reading a single indexed u32 value from a device-tree property containing multiple u32 values, that is an array of integers. Signed-off-by: Dario Binacchi <dariobin@libero.it> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | dm: test: add test case for dev_read_u64 functionDario Binacchi2020-04-161-0/+10
| | | | | | | | | | | | | | | | | | | | | Add test case to cover dev_read_u64 and dev_read_u64_default functions. Signed-off-by: Dario Binacchi <dariobin@libero.it> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | test: log: test syslog logging driverHeinrich Schuchardt2020-04-162-0/+284
| | | | | | | | | | | | | | | | | | | | | Provide unit tests for the syslog logging driver. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | test: log functions with CONFIG_LOG=nHeinrich Schuchardt2020-04-166-1/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If CONFIG_LOG=n, we still expect output for log_err(), log_warning(), log_notice(), log_info() and in case of DEBUG=1 also for log_debug(). Provide unit tests verifying this. The tests depend on: CONFIG_CONSOLE_RECORD=y CONFIG_LOG=n CONFIG_UT_LOG=y It may be necessary to increase the value of CONFIG_SYS_MALLOC_F_LEN to accommodate CONFIG_CONSOLE_RECORD=y. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Move "/chosen" and "/firmware" node scanPatrick Delaunay2020-04-161-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new function dm_scan_fdt_ofnode_path() to scan all the nodes which aren't devices themselves but may contain some: - "/chosen" - "/clocks" - "/firmware" The patch removes the strcmp call in recursive function dm_scan_fdt_live() and also corrects a conflict with the 2 applied patches in the commit 1712ca21924b ("dm: core: Scan /firmware node by default") and in the commit 747558d01457 ("dm: fdt: scan for devices under /firmware too"): the subnodes of "/firmware" (optee for example) are bound 2 times. For example the dm tree command result on STM32MP1 is: STM32MP> dm tree Class Index Probed Driver Name ----------------------------------------------------------- root 0 [ + ] root_driver root_driver firmware 0 [ ] psci |-- psci sysreset 0 [ ] psci-sysreset | `-- psci-sysreset simple_bus 0 [ + ] generic_simple_bus |-- soc ... tee 0 [ + ] optee |-- optee ... tee 1 [ ] optee `-- optee Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Tested-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | acpi: Add support for DMARSimon Glass2020-04-161-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | The DMA Remapping Reporting (DMAR) table contains information about DMA remapping. Add a version simple version of this table with only the minimum fields filled out. i.e. no entries. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
* | acpi: Add a central location for table version numbersSimon Glass2020-04-161-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Each ACPI table has its own version number. Add the version numbers in a single function so we can keep them consistent and easily see what versions are supported. Start a new acpi_table file in a generic directory to house this function. We can move things over to this file from x86 as needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | acpi: Add a simple sandbox testSimon Glass2020-04-162-0/+56
| | | | | | | | | | | | | | | | Add a sandbox test for the basic ACPI functionality we have so far. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
* | cpu: Support querying the address widthSimon Glass2020-04-161-0/+1
| | | | | | | | | | | | | | | | Different CPUs may support different address widths, meaning the amount of memory they can address. Add a property for this to the cpu_info struct. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | dm: serial: Add clock member to struct serial_device_infoAndy Shevchenko2020-04-161-0/+1
|/ | | | | | | | | | | Some callers of serial_getinfo() would like to know the UART base clock speed in order to make decision what to pass to OS in some cases. In particular, ACPI SPCR table expects only certain base clock speed and thus we have to act accordingly. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* Merge branch 'next'Tom Rini2020-04-136-13/+254
|\ | | | | | | | | | | | | | | | | | | | | 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
| * test/py: Allow using buildman to build U-BootSimon Glass2020-04-102-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is a pain to have to set the CROSS_COMPILE environment variable when using test.py's --build option. It is possible to get this using the -A option from buildman. But it seems better to just use buildman to do the build when it is available. However using buildman adds a new dependency to the test system which we want to avoid. So leave the default as is and add a flag to make it use buildman. Note that most of these changes relate to test.py and the parts of the travis/gitlab/azure scripts which relate to running test and building a suitable U-Boot to run the tests on. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
| * test/py: Update u_boot_utils.find_ram_base to bypass the low 2MiB memoryBin Meng2020-04-101-3/+4
| | | | | | | | | | | | | | On some RISC-V targets the low memory is protected that prevents S-mode U-Boot from access. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
| * Merge tag 'xilinx-for-v2020.07' of ↵WIP/07Apr2020-nextTom Rini2020-04-073-73/+511
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * \ Merge branch 'next' of git://git.denx.de/u-boot-usb into nextWIP/31Mar2020-nextTom Rini2020-03-313-3/+40
| |\ \
| * | | test: add rsa_verify() unit testAKASHI Takahiro2020-03-123-0/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this patch, a very simple test is added to verify that rsa_verify() using rsa_verify_with_pkey() work correctly. To keep the code simple, all the test data, either public key and verified binary data, are embedded in the source. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
* | | | cmd: Add test and fix bugs for dm driversSean Anderson2020-04-091-0/+17
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | Add a test for the dm drivers command. Also fix a null pointer dereference revealed by said test. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | test: vboot: Reduce fake kernel size to 500 bytesSimon Glass2020-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | We don't need 5KB to test things out. A smaller size makes it easier to look at the FIT with fdtdump. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | test: vboot: Move key creation into a functionSimon Glass2020-04-011-21/+18
| | | | | | | | | | | | | | | | | | This code is repeated so move it into a function with a parameter. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | test: vboot: Fix pylint errorsSimon Glass2020-04-011-34/+19
| | | | | | | | | | | | | | | | | | Fix various minor things noticed by pylint. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | test: vboot: Tidy up the code a littleSimon Glass2020-04-011-13/+21
| | | | | | | | | | | | | | | | | | | | | Fix some long lines and comments. Use a distinct name for the 'required key' test. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | test: vboot: Parameterise the testSimon Glass2020-04-011-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test is actually made up of five separate tests. Split them out so that they appear as separate tests. Unfortunately this restarts U-Boot multiple times which adds about a second to the already-long vboot test, about 8 seconds total on my machine. We could add a special 'teardown' test afterwards but if the tests are executed out of order that would not work. Changing test_vboot into a class causes it not to be discovered and makes it different from all other tests. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | test: vboot: Add a test for a forged configurationSimon Glass2020-04-012-1/+440
| | | | | | | | | | | | | | | | | | | | | Add a check to make sure that it is not possible to add a new configuration and use the hashed nodes and hash of another configuration. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | test: vboot: Drop unnecessary parameter for fit_check_signSimon Glass2020-04-011-2/+1
| | | | | | | | | | | | | | | | | | | | | This tool only uses the last -k parameter provided. Drop the earlier one since it has no effect. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | test/py: test_efi_grub_net() requires OF_CONTROLHeinrich Schuchardt2020-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | With CONFIG_OF_CONTROL environment variable $fdtcontroladdr is not defined and test_efi_grub_net() fails. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | | test/py: UEFI helloworld requires OF_CONTROLHeinrich Schuchardt2020-03-281-2/+3
| |/ |/| | | | | | | | | | | With CONFIG_OF_CONTROL environment variable $fdtcontroladdr is not defined and test_efi_helloworld_net() fails. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | test: typo decompressionHeinrich Schuchardt2020-03-271-1/+1
| | | | | | | | | | | | | | %s/decopmression/decompression/ Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* | test/py: mmc: Fix 'mmc info' testcaseHarald Seiler2020-03-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 41e30dcf8796 ("cmd: mmc: Make Mode: printout consistent") fixed the layout of `mmc info` output. Reflect this change in the respective testcase. Also fix a typo in the documentation. Fixes: 41e30dcf8796 ("cmd: mmc: Make Mode: printout consistent") Signed-off-by: Harald Seiler <hws@denx.de> Acked-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | cmd: gpio: Make `gpio input` return pin value againAlex Kiernan2020-03-131-0/+37
|/ | | | | | | | | | | | | | 4dbc107f4683 ("cmd: gpio: Correct do_gpio() return value") correctly changed the behaviour of the gpio command to return CMD_RET_SUCCESS or CMD_RET_FAILURE, but any existing script which expects the return value to be the pin value is broken by this change. Reinstate the legacy behaviour for `gpio input` only. Fixes: 4dbc107f4683 ("cmd: gpio: Correct do_gpio() return value") Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Alex Kiernan <alex.kiernan@hivehome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* test: aes: fix memleakPhilippe Reynes2020-02-131-6/+7
| | | | | | | | | | | | | | | | | In the first version, the result of malloc is checked with ut_assertnonnull. But on a fail, this macro exit the function, so previously malloc are not freed. So to avoid a memleak, we don't use ut_assertnonnull, but simply check the return of malloc. If one has failed, we freed all the allocated memory and quit the function. Reported-by: Coverity (CID: 284403) Reported-by: Coverity (CID: 284404) Reported-by: Coverity (CID: 284405) Reported-by: Coverity (CID: 284406) Reported-by: Coverity (CID: 284407) Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* Merge tag 'dm-pull-6feb20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dmTom Rini2020-02-1120-4/+216
|\ | | | | | | | | | | | | sandbox conversion to SDL2 TPM TEE driver Various minor sandbox video enhancements New driver model core utility functions
| * dm: core: Create a new header file for 'compat' featuresSimon Glass2020-02-0511-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | At present dm/device.h includes the linux-compatible features. This requires including linux/compat.h which in turn includes a lot of headers. One of these is malloc.h which we thus end up including in every file in U-Boot. Apart from the inefficiency of this, it is problematic for sandbox which needs to use the system malloc() in some files. Move the compatibility features into a separate header file. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Require users of devres to include the headerSimon Glass2020-02-054-0/+4
| | | | | | | | | | | | | | | | | | | | At present devres.h is included in all files that include dm.h but few make use of it. Also this pulls in linux/compat which adds several more headers. Drop the automatic inclusion and require files to include devres themselves. This provides a good indication of which files use devres. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de>
| * sound: Add a new stop_play() methodSimon Glass2020-02-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | At present there is no positive indication that U-Boot has finished sending sound data. This means that it is not possible to power down an audio codec, for example. Add a new method that is called once all sound data has been sent. Add a new method for this, called when the sound_play() call is done. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Add a way to check each line of console outputSimon Glass2020-02-051-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | When writing tests to check the output from commands it is useful to be able to check the output line by line using an assertion. Add helper macros to support this and to check that there is no unexpected trailing data. Also some commands produce a dump using print_buffer(). Add a way to check that the correct number of bytes are dumped (ignoring the actual contents). Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Enable console recording in testsSimon Glass2020-02-051-2/+2
| | | | | | | | | | | | | | | | | | | | At present we reset the console buffer before each test but do not actually set the recording flag. Without this, the output is not recorded. Update the code to set the flag before the test and clear it afterwards. Signed-off-by: Simon Glass <sjg@chromium.org>
| * bloblist: Zero records when addingSimon Glass2020-02-051-2/+25
| | | | | | | | | | | | | | | | | | It is convenient for bloblist to zero out the contents of a records when it is added. This saves the callers having to do it. Update the API accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>
| * bloblist: Add a new function to add or check sizeSimon Glass2020-02-051-0/+34
| | | | | | | | | | | | | | A common check is to see if a blob is present, create it if not and make sure that the size is large enough. Add a function to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>