u-boot/tools
Ivan Mikhaylov db82015929 fw_setenv: lock the flash only if it was locked before
With current implementation of fw_setenv, it is always locks u-boot-env
region if lock interface is implemented for such mtd device. You can
not control lock of this region with fw_setenv, there is no option for
it in config or in application itself. Because of this situation may
happen problems like in this thread on xilinx forum:
https://forums.xilinx.com/t5/Embedded-Linux/Flash-be-locked-after-use-fw-setenv-from-user-space
/td-p/1027851

A short summary of that link is: some person has issue with some spi
chip which has lock interface but doesn't locks properly which leads to
lock of whole flash memory on lock of u-boot-env region. As resulted
solution hack was added into spi-nor.c driver for this chip with lock
disablement.

Instead fix this problem by adding logic to fw_setenv only lock the
flash if it was already locked when we attempted to use it.

Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
2020-07-31 10:13:00 -04:00
..
binman Makefile: Rename ALL-y to INPUTS-y 2020-07-28 19:30:39 -06:00
buildman buildman: Show the build rate at the end 2020-07-28 19:30:39 -06:00
concurrencytest tools: correct Markdown in concurrencytest/README.md 2020-01-30 13:30:35 -05:00
dtoc dtoc: remove compatible string aliases support 2020-07-28 19:30:39 -06:00
env fw_setenv: lock the flash only if it was locked before 2020-07-31 10:13:00 -04:00
gdb
kermit
libfdt libfdt: migrate fdt_ro.c to a wrapper of scripts/dtc/libfdt/fdt_ro.c 2020-04-26 14:23:39 -06:00
logos logos: Add the TechNexion's logo 2019-10-08 16:35:59 +02:00
omap
patman binman: Re-enable concurrent tests 2020-07-26 19:59:57 -06:00
scripts
.gitignore tools: .gitignore: add asn1_compiler 2020-01-02 10:27:23 -05:00
aisimage.c tool: aisimage: use ALIGN instead of self defiend macro 2020-04-24 10:10:00 -04:00
aisimage.h
asn1_compiler.c cmd: add asn1_compiler 2019-12-06 16:44:20 -05:00
atmel_pmecc_params.c
atmelimage.c
bmp_logo.c bmp_logo: support CONFIG_DM_VIDEO 2019-07-29 00:20:31 +02:00
default_image.c crc32: Use the crc.h header for crc functions 2019-12-02 18:23:08 -05:00
dumpimage.c tools: dumpimage: Fall-though to print usage for help command 2020-01-07 11:12:47 -05:00
dumpimage.h
endian-swap.py tools: add script for byte endianness swapping 2020-06-29 22:36:35 +02:00
envcrc.c crc32: Use the crc.h header for crc functions 2019-12-02 18:23:08 -05:00
fdt_host.h fit_check_sign: Allow selecting the configuration to verify 2020-04-01 07:45:09 -06:00
fdtgrep.c tools: ftdgrep: use /* fallthrough */ as needed 2020-05-15 14:47:35 -04:00
file2include.c tools/file2include: don't use malloc.h for malloc 2018-11-26 22:52:12 -05:00
fit_check_sign.c fit_check_sign: Allow selecting the configuration to verify 2020-04-01 07:45:09 -06:00
fit_common.c tools: use read-only mmap in fit_check_sign 2019-05-18 12:32:02 -04:00
fit_common.h tools: use read-only mmap in fit_check_sign 2019-05-18 12:32:02 -04:00
fit_image.c mkimage: Allow updating the FIT timestamp 2020-07-25 14:46:57 -06:00
fit_info.c tools: use read-only mmap in fit_check_sign 2019-05-18 12:32:02 -04:00
gen_eth_addr.c
gen_ethaddr_crc.c
genboardscfg.py patman: Tidy up sys.path changes 2020-04-26 14:25:21 -06:00
getline.c
getline.h
gpheader.h
gpimage-common.c
gpimage.c
ifdtool.c
ifdtool.h
ifwitool.c tool: Move ALIGN_MASK to header as common MACRO 2020-04-24 10:10:00 -04:00
image-host.c libfdt: split fdt_region declarations out to <fdt_region.h> 2020-04-26 14:24:08 -06:00
imagetool.c fdt: Fix FIT header verification in mkimage and conduct same checks as bootm 2019-03-08 11:31:44 -05:00
imagetool.h mkimage: Allow updating the FIT timestamp 2020-07-25 14:46:57 -06:00
img2srec.c
imx8image.c common: Drop image.h from common header 2020-05-18 17:33:33 -04:00
imx8m_image.sh tools: imx8m_image: fix warning message 2020-02-09 14:57:38 +01:00
imx8mimage.c tools: imx8mimage: remove redundant code 2020-04-24 10:10:00 -04:00
imx_cntr_image.sh tools: improve portability of imx_cntr_image.sh 2019-01-01 14:12:18 +01:00
imximage.c tools/imximage: share DCD information via Kconfig 2019-12-27 12:55:59 +01:00
jtagconsole
k3_fit_atf.sh arm: mach-k3: Add secure device build support 2019-04-26 17:51:51 -04:00
k3_gen_x509_cert.sh tools: k3_gen_x509_cert: Set default early HS JTAG access to disabled 2020-06-13 23:12:17 +05:30
kwbimage.c tools: kwbimage: use common ALIGN to do the size align 2020-04-24 10:10:00 -04:00
kwbimage.h tools: kwbimage: use common ALIGN to do the size align 2020-04-24 10:10:00 -04:00
kwboot.c
lpc32xximage.c
Makefile Add support for SHA384 and SHA512 2020-06-12 13:14:07 -04:00
microcode-tool
microcode-tool.py microcode_tool: Convert to Python 3 2019-11-04 18:15:32 -07:00
mips-relocs.c MIPS: make size of relocation table fixed but configurable 2018-11-02 22:39:07 +01:00
mkenvimage.c crc32: Use the crc.h header for crc functions 2019-12-02 18:23:08 -05:00
mkexynosspl.c
mkimage.c mkimage: Allow updating the FIT timestamp 2020-07-25 14:46:57 -06:00
mkimage.h tools/mkimage: fix handling long filenames 2020-05-01 11:34:01 -04:00
mksunxiboot.c tool: Move ALIGN_MASK to header as common MACRO 2020-04-24 10:10:00 -04:00
moveconfig.py patman: Tidy up sys.path changes 2020-04-26 14:25:21 -06:00
mrvl_uart.sh
mtk_image.c tools: mtk_image: replace strncpy(d, s, sizeof(d)) with snprintf() 2018-12-15 11:49:56 -05:00
mtk_image.h tools: mtk_image.h: Use portable uintXX_t instead of linux-specific __leXX 2019-10-28 13:32:51 -04:00
mxsboot.c
mxsimage.c crc32: Use the crc.h header for crc functions 2019-12-02 18:23:08 -05:00
mxsimage.h
ncb.c
netconsole
omapimage.c
omapimage.h
os_support.c tools: Remove the out-of-date MinGW support codes 2020-04-24 10:51:56 -04:00
os_support.h tools: Remove the out-of-date MinGW support codes 2020-04-24 10:51:56 -04:00
pbl_crc32.c crc32: Use the crc.h header for crc functions 2019-12-02 18:23:08 -05:00
pbl_crc32.h
pblimage.c crc32: Use the crc.h header for crc functions 2019-12-02 18:23:08 -05:00
pblimage.h
prelink-riscv.c riscv: tools: Add big endian target support to prelink-riscv 2019-08-15 13:42:28 +08:00
prelink-riscv.inc riscv: tools: Handle addend to absolute reloc in prelink-riscv 2019-09-03 09:30:32 +08:00
proftool.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
relocate-rela.c
rkcommon.c tools: value checks in rkcommon_check_params() 2020-05-22 20:53:20 +08:00
rkcommon.h rockchip: mkimage: support packing optional second level boot-loader 2019-12-27 15:17:07 +08:00
rkimage.c rockchip: mkimage: fix wrong range of rc4 encoding for boot image 2019-12-27 15:17:07 +08:00
rkmux.py rkmux: Convert to Python 3 2019-11-04 18:15:32 -07:00
rksd.c rockchip: mkimage: support packing optional second level boot-loader 2019-12-27 15:17:07 +08:00
rkspi.c rockchip: mkimage: support packing optional second level boot-loader 2019-12-27 15:17:07 +08:00
rmboard.py patman: Tidy up sys.path changes 2020-04-26 14:25:21 -06:00
socfpgaimage.c tool: use ALIGN() to align the size 2020-04-24 10:10:00 -04:00
spl_size_limit.c imx: replace CONFIG_SECURE_BOOT with CONFIG_IMX_HAB 2019-10-08 16:36:37 +02:00
stm32image.c tools: mkimage: fix STM32 image format for big endian hosts 2020-02-13 17:32:09 +01:00
sunxi-spl-image-builder.c
ublimage.c
ublimage.h
ubsha1.c
vybridimage.c
xway-swap-bytes.c
zynqimage.c
zynqmp_pm_cfg_obj_convert.py arm64: zynqmp: add tool to convert PMU config object .c to binary 2019-07-30 10:20:06 +02:00
zynqmp_psu_init_minimize.sh arm64: zynqmp: Do not remove dpll_prog from psu_init 2019-10-24 13:37:02 +02:00
zynqmpbif.c tools: zynqmpbif: Use compiler builtin instead of linux-specific __swab32 2019-10-28 13:32:51 -04:00
zynqmpimage.c
zynqmpimage.h