summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release v2021.01.0v2021.01.0Sascha Hauer2021-01-181-2/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* startup: export PATH variableSascha Hauer2021-01-141-0/+1
| | | | | | | | | | The PATH environment variable is set at the shell prompt, but it is not exported, so currently scripts can't execute other scripts in PATH anymore. PATH used to be exported in the init script, but this part was lost when converting the init script to C. Add it back. Fixes: 90df2a955e ("defaultenv: Convert init script to C") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand: fix NAND_ECC_HW modeSascha Hauer2021-01-141-17/+18
| | | | | | | | | | | 6748f466a3 made NAND_ECC_HW_SYNDROME mode optional by bailing out with -ENOSYS when the mode is not enabled in Kconfig. Unfortunately with NAND_ECC_HW mode the code falls through to this test, so with NAND_ECC_HW_SYNDROME support disabled NAND_ECC_HW stopped working as well. Fix this. fixes: 6748f466a3 ("mtd: nand: Make support for syndrome hardware ecc optional") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imd: change disabled checksum tag info to debugSteffen Trumtrar2021-01-131-1/+1
| | | | | | | | | | | When the checksum tag is disabled the CRC is most likely invalid. And if the checksum tag is disabled and the CRC is actually invalid the user doesn't care for it anyway. This information only confuses the user so make it a debug message. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: boards: sandbox: describe --image flagsAhmad Fatoum2021-01-131-0/+14
| | | | | | | | | | barebox partition table parsing can be tested in sandbox using the recently added ,blkdev flag. Extend the documentation to cover this. Cc: Juergen Borleis <jbe@pengutronix.de> Reported-by: Lucas Stach <lst@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* image-sparse: change chunk_data_sz to u64Steffen Trumtrar2021-01-131-2/+3
| | | | | | | | | | | chunk_data_sz is set to the result of a __le32 * __le32 multiplication: chunk_data_sz = si->sparse.blk_sz * si->chunk.chunk_sz; This will overflow. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* image-sparse: change retlen to size_tSteffen Trumtrar2021-01-133-3/+3
| | | | | | | | retlen can potentially overflow. Also, write_full() in fastboot_handle_sparse() expects size_t anyway. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: ls1b200: move ls1b-clk.h to include/dt-bindingsSascha Hauer2021-01-071-0/+0
| | | | | | | | files in dts/ are overwritten with the next dts update. Move file that was accidently committed there to a place where it doesn't get overwritten. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd:nand_mxs: Add missing includeSascha Hauer2021-01-071-0/+2
| | | | | | | Add include missing in last commit. Fixes: 616d942c3e mtd:nand_mxs:update get/set features legacy function call Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd:nand_mxs:update get/set features legacy function calljameszxj2021-01-071-4/+2
| | | | | | | update get/set features legacy function call to avoid NULL pointer crash. Signed-off-by: zhengxiaojun <jameszxj at gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* overlay: return error if target for firmware is missingMichael Tretter2021-01-062-5/+11
| | | | | | | | | | | | | | | | | | | | | | | If the overlay references a firmware, the overlay must not be applied if the firmware cannot be loaded. However, if the target node of the firmware (i.e., the firmware manager) was not found, the fragment was ignored and the firmware not loaded, but the overlay applied anyway. If the overlay does not reference a firmware, of_process_overlay must succeed even if the target node cannot be found, because the overlay might still apply to the Linux device tree. Always call the process function on a fragment, even if the target node was not found. This allows the caller to decide, if a missing target is fatal or if the overlay can be applied anyway. Fix load_firmware to fail if a overlay references a firmware and the target is NULL. Also, rephrase and clarify the comment that documents this behavior. Reported-by: Matthias Fend <matthias.fend@wolfvision.net> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: at91sam9x5: fix co-existance of erratum-aware and generic resetAhmad Fatoum2021-01-051-2/+9
| | | | | | | | | | | | | | | | | | | | We have a generic at91sam9 reset driver, but it's unaware of the erratum on the at91sam9x5, which can prevent reboot from NAND due to interference from SDRAM. The workaround is packing the powering down of the DDR and the system reset into a single cache line and executing that. This would be a bit tedious to add into the device tree probed driver, thus: - Don't activate the work around if we are device-tree enabled, but have a newer SoC - Give the workaround a slightly higher priority, so it's taken instead of the generic DT driver This fixes an issue of failing reset with the at91_multi_defconfig, because both reset drivers have the same priority of 100. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/spdx'Sascha Hauer2020-12-1188-975/+222
|\
| * mci: Replace license and copyright boilerplate by SPDX identifiersUwe Kleine-König2020-12-0719-285/+95
| | | | | | | | | | | | | | | | | | Converts the files that licensecheck can determine to be licensed under GPL-2.0-only or GPL-2.0-or-later and also convert the copyright statements to SPDX. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * arm/lib: Replace license and copyright boilerplate by SPDX identifiersUwe Kleine-König2020-12-0717-169/+63
| | | | | | | | | | | | | | | | | | Converts the files that licensecheck can determine to be licensed under GPL-2.0-only or GPL-2.0-or-later and also convert the copyright statements to SPDX. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * common: replace license statements with SPDX-License-IdentifiersAhmad Fatoum2020-11-2748-480/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | For all files in common/ that already have a license text: - Replace with appropriate SPDX-License-Identifier - Remove empty comment lines around replacement - remove comment completely if only thing remaining is name of file without description Reviewed-by: Roland Hieber <rhi@pengutronix.de> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * LICENSES: exceptions: factor out eCos-exception-2.0 for GPLAhmad Fatoum2020-11-272-20/+14
| | | | | | | | | | | | | | | | | | We have code imported from eCos that's licensed with this exception. Replace instances of the exceptions with a SPDX-License-Identifier referencing the exception in our LICENSES directory. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * common: dummy_malloc: remove unintended GPL2 eCos-exception-2.0Ahmad Fatoum2020-11-271-20/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, the file should be GPL-2.0-only without exceptions: On 24.11.20 09:44, Sascha Hauer wrote[1]: > This looks like I accidently copied the wrong header. I don't think I > did this on purpose. It doesn't make much sense to me when compiling > against dummy malloc is different than compiling against tlsf malloc > or dlmalloc. As dropping exceptions is no relicense, it's ok to do here without acknowledgement from all authors. Do so. [1]: <20201124084434.GC14718@pengutronix.de> Suggested-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: at91: sama5d2: giantboard: fix typo in SPDX-License-IdentifierAhmad Fatoum2020-11-271-1/+1
| | | | | | | | | | | | | | s/Identifer/Identifier/ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/rpi'Sascha Hauer2020-12-1113-64/+107
|\ \
| * | doc: bcm283x: document use of mini-uart on Raspberry Pi Zero W / CM3Ahmad Fatoum2020-12-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described in the UART configuration[1] article in the Raspberry Pi Foundation documentation, Raspberry Pi 3 & 4 as well as Zero W use the mini-uart as primary (easily user-accessible) UART. At least on the Raspberry Zero W and CM3, we need to pass uart_2ndstage=1, so the BootROM leaves the 8250 IP in a suitable state for use by barebox. Document this. [1]: https://www.raspberrypi.org/documentation/configuration/uart.md Cc: Roland Hieber <rhi@pengutronix.de> Cc: Rouven Czerwinski <rcz@pengutronix.de> Cc: Robert Carnecky <robert@neopsis.com> Cc: Andrew John <andrew@mobius-embedded-systems.co.uk> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: rpi: add new rpi boot targetAhmad Fatoum2020-12-103-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For drop-in placement of barebox into the boot chain, it's useful to have a target to boot the kernel like the VideoCore would have booted the kernel if barebox hadn't been started instead. This commit is based on the information here: https://www.tablix.org/~avian/blog/archives/2019/03/booting_raspbian_from_barebox/ Cc: Tomaz Solc <tomaz.solc@tablix.org> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: rpi: fix model description stringAhmad Fatoum2020-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | s/Model/Nodel/ as well as drop the space the other ones (e.g. Model 2B) lack. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: rpi: drop no longer needed environmentAhmad Fatoum2020-12-102-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The barebox PL011 driver automatically arranges for the kernel to be called with the appropriate console argument (placed in ${global.linux.bootargs.console}. There is thus no need to hard code a TTY. Indeed we shouldn't because some Raspberry Pis don't use the PL011, but the mini-uart, which is a ttyS. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: rpi: Add Raspberry Pi Zero W mini-uart supportAhmad Fatoum2020-12-103-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike the Raspberry Pi 1 and Raspberry Pi Zero, the Raspberry Pi Zero W has its console pins on the header connected to the mini-uart, not the PL011. The secondary PL011 UART is connected to the bluetooth module. Set the mini-uart as default console and disable the PL011. That way we can use the Raspberry Pi 1 image for the Zero W as well. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: rpi: add new init function for Raspberry Pi ZeroAhmad Fatoum2020-12-072-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Raspberry Pi Zero and Zero W have no power LED and lack the USB hub and ethernet port. The rpi_b_plus_init is thus the wrong init function to use. Add a new init function that just configures the activity LED and configure the new exposed USB port for OTG. While we have a dwc2 gadget driver, it doesn't yet work for the Rpi: barebox@RaspberryPi Zero W:/ usbgadget -a udc0: registering UDC driver [g_multi] multi_bind: creating ACM function g_multi usbgadget: Multifunction Composite Gadget g_multi usbgadget: g_multi ready dwc2 20980000.usb@7e980000.of: bound driver g_multi WARNING: at drivers/usb/dwc2/gadget.c:1896/dwc2_gadget_pullup()! But let's add dr_mode = otg anyway, so it can be debugged out of the box with only config changes. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: rpi: support raspberry pi 1 and zero mini-uartAhmad Fatoum2020-12-072-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't have a clock driver for the raspberry pi, so board code needs to list which used devices have clocks that are already known to be active on boot. The Mini UART is one such device. We already wave away the clock on the BCM2836, do the same for the BCM2835 as well. Cc: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: rpi: move rpi_model_init() to postcoreAhmad Fatoum2020-12-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rpi_model_init() was so far run at late initcall level, at which time most drivers have already been probed and it's too late to modify the built-in device tree and see the changes take effect. To use the same barebox image for multiple boards, it would be nice to be able to fix up the device tree a bit. Facilitate this by moving rpi_model_init() to postcore. This is ok to do because eth_register_ethaddr() can be called prior to Ethernet driver probe as well. This was tested on a Raspberry Pi 3B. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: rpi: make functions in rpi-common.c staticAhmad Fatoum2020-12-072-30/+16
| | | | | | | | | | | | | | | | | | | | | | | | They aren't (and arguably shouldn't) be used outside, so give them all internal linkage and drop the header. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: dts: rpi: drop unnecessary /chosen/stdout-path overridesAhmad Fatoum2020-12-073-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The upstream device trees reference the stdout-path via alias. barebox overrides them with a path to the node, but the effect is the same as both barebox and the kernel accept both for the property's value. No functional change: serial0 serial1 upstream stdout-path Rpi1 &uart0 &uart1 serial0 Rpi2 &uart0 &uart1 serial0 Rpi3 &uart0 &uart1 serial1 Tested on a Raspberry Pi 3B. Cc: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Revert "ARM: dts: bcm2835-rpi: re-enable booting from SD card"Ahmad Fatoum2020-12-071-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since d6d3d0aecece ("mci: add driver for BCM283x sdhost core"), we now have driver support for the sdhost controller in barebox as well. We can thus drop the device tree override and use the same MCI the kernel uses. This was tested on a Raspberry Pi zero W, which has the same bcm2835 SoC as the Raspberry Pi 1. This reverts commit abc0447440d68af720127fcca3c17f04ee144fcc. Cc: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mtd'Sascha Hauer2020-12-119-21/+158
|\ \ \
| * | | mtd: nand: Make software ECC support optionalSascha Hauer2020-12-112-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Most NAND controllers use hardware ECC, so make software ECC support optional to save some binary space. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand: Make support for syndrome hardware ecc optionalSascha Hauer2020-12-112-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NAND_ECC_HW_SYNDROME is currently not needed by the drivers in barebox, so make support for it optional again. This has been optional before the last NAND layer update, just re-add the option. This time drop the "default y", as this option shouldn't be needed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: spi-nor: Make write support optionalSascha Hauer2020-12-111-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Write support is optional with the CONFIG_MTD_WRITE option. Bail out early in the write functions to save some binary space. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand: omap: Bail out when omap_gpmc_eccmode() failsSascha Hauer2020-12-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver can't work when omap_gpmc_eccmode() fails, so do not ignore the error. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand: omap: print error when ELM config failedSascha Hauer2020-12-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ELM config can fail when ELM support is disabled. Let the user know about it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand: denali: cope with kernel device trees without chip subnodesSascha Hauer2020-11-251-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Denali binding for the Kernel has evolved over time. Recent Kernels need NAND chip subnodes in the controller node which then hold the partition nodes. Older Kernels need the partition nodes directly under the controller node. Cope with both kernel types. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: Add hook to fix up kernel partitionsSascha Hauer2020-11-252-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some drivers have special requirements for fixing up the partition nodes for the kernel. This adds a hook to struct mtd_info that can be used by drivers to replace the generic fixup with a special one. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of: partitions: export of_fixup_partitionsSascha Hauer2020-11-252-16/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of_partitions_register_fixup() tries to automatically determine the node to fixup. Sometimes this doesn't work, so add of_fixup_partitions() that can called at fixup time with a device node determined by subsystem or driver code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of: Add no-op wrappers for of reproducible name functionsSascha Hauer2020-11-251-0/+11
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: Remove set but not used of_pathSascha Hauer2020-11-252-2/+0
| | |/ | |/| | | | | | | | | | | | | struct mtd_info member of_path is set but not used, remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2020-12-1133-115/+272
|\ \ \
| * | | spi: store names in struct spi_device_id as pointersSascha Hauer2020-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of putting an array for the names into struct spi_device_id use pointers. This saves around 3000 bytes of binary space in a ARM32 barebox build. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | commands: memtester: fix mismatched format stringAhmad Fatoum2020-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expression is of type size_t. Use the appropriate format string specifier for printing it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | usb: host: ehci: fix mismatch in format stringAhmad Fatoum2020-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sz is of type size_t. Use the appropriate format string specifier for printing it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | boot: introduce option to pass barebox-enabled watchdog to systemdAhmad Fatoum2020-11-304-3/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like Linux, barebox supports co-existence of multiple watchdog devices. On boot, barebox enables only the default watchdog, which is defined as the watchdog with highest non-zero priority. The kernel handles all watchdogs the same and defers to userspace, which watchdogs to service. It can be useful to have barebox tell the system, which watchdog it activated, so it can service the same. Having this feature behind a global variable adds 354 bytes to a LZO compressed THUMB2 barebox. Users can opt out by toggling the Kconfig option, which defaults to off. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | watchdog: implement watchdog_get_alias_id_fromAhmad Fatoum2020-11-304-15/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On device-tree enabled platforms, the Linux kernel will first attempt to use watchdog%d as watchdog name, where %d is the alias id. Add a function that given a barebox struct watchdog and the device tree root node of the kernel device tree, computes the corresponding kernel alias id. This may then later be used to pass an appropriate argument on the kernel command line. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | commands: implement and use parse_assignment helperAhmad Fatoum2020-11-2710-29/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have the split by '=' snippet at multiple locations that parse key=value pairs. Consolidate them to a single location. This makes code a bit easier to read at the cost of an extra 8 bytes (LZO-compressed THUMB2 barebox, static inline version is bigger). No functional change. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | commands: nv: pass empty string for nvAhmad Fatoum2020-11-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting a variable via the nv command results in the call chain nvar_add() -> nv_save() -> __nv_save(). __nv_save isn't supposed to be called with val=NULL argument however: dprintf(fd, "%s", val); Avoid this from happening by translating NULL into the empty string. This aligns nv with the behavior of hush and setenv (but not global, this will need to be looked at separately). Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>