summaryrefslogtreecommitdiffstats
path: root/lib/Kconfig
Commit message (Collapse)AuthorAgeFilesLines
* lib: Allow MD5 to be enabled in SPLSimon Glass2020-05-151-1/+16
| | | | | | | | | | | At present the MD5 option cannot be enabled by board configs since it has no Kconfig name. It is generally enabled, so long as FIT support is present. But not all boards use FIT, particularly in SPL Fix this and add an option for SPL as well. This allows board code to call md5() even if FIT support is not enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
* lib: enable lzma decompression support for SPL buildWeijie Gao2020-04-271-0/+5
| | | | | | | | This patch enables LZMA decompression support for SPL build Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
* lib: kconfig: Add option to set BZIP2 compression methodAtish Patra2020-04-171-0/+5
| | | | | | | | | There is no way to select BZIP2 compression method. Add it under library/compression config where all other compression related configs are present. Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* lib: elf: Move the generic elf loading/validating functions to libKeerthy2020-03-031-0/+6
| | | | | | | | | | | | | Move the generic elf loading/validating functions to lib/ so that they can be re-used and accessed by code existing outside cmd. While at it remove the duplicate static version of load_elf_image_phdr under arch/arm/mach-imx/imx_bootaux.c. Signed-off-by: Keerthy <j-keerthy@ti.com> Suggested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* lib: Kconfig dependencies for pseudo-random libraryHeinrich Schuchardt2020-01-251-1/+2
| | | | | | | | | | | | drivers/rng/sandbox_rng.c requires rand() to be defined but configuration option CONFIG_CONFIG_LIB_RAND selected in drivers/rng/Kconfig does not exist. test/lib/test_aes.c requires rand() to be defined. Fix the selection criteria for choice "Pseudo-random library support type". Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* binman: Add a library to access binman entriesSimon Glass2019-12-151-0/+10
| | | | | | | | | | | SPL and TPL can access information about binman entries using link-time symbols but this is not available in U-Boot proper. Of course it could be made available, but the intention is to just read the device tree. Add support for this, so that U-Boot can locate entries. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* lib: crypto: add x509 parserAKASHI Takahiro2019-12-061-0/+1
| | | | | | | | | | | Imported from linux kernel v5.3: x509.asn1 without changes x509_akid.asn1 without changes x509_parser.h without changes x509_cert_parser.c with changes marked as __UBOOT__ x509_public_key.c with changes marked as __UBOOT__ Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
* lib: add oid registry utilityAKASHI Takahiro2019-12-061-0/+5
| | | | | | | | | Imported from linux kernel v5.3: build_OID_registry without changes oid_registry.h without changes oid_registry.c with changes marked as __UBOOT__ Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
* lib: add asn1 decoderAKASHI Takahiro2019-12-061-0/+5
| | | | | | | Imported from linux kernel v5.3: lib/asn1_decoder.c with changes marked as __UBOOT__ Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
* cmd: add asn1_compilerAKASHI Takahiro2019-12-061-0/+3
| | | | | | | | | | | | | | | Imported from linux kernel v5.3: asn1.h without changes asn1_ber_bytecode.h without changes asn1_decoder.h without changes asn1_compiler.c without changes This host command will be used to create a ASN1 parser, for example, for pkcs7 messages or x509 certificates. More specifically, it will generate *byte code* which will be interpreted by asn1 decoder library. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* rtc: move date.c from drivers/rtc/ to lib/AKASHI Takahiro2019-12-061-0/+3
| | | | | | | | In the next commit, rtc_mktime(), for compatibility with linux, will be implemented using rtc_mktime(), which is no longer drivers/rtc specific. So move this file under lib/. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
* Kconfig: disambiguate config names for tiny printfThomas Hebb2019-12-031-2/+2
| | | | | | | | 27084c03d36a ("spl: Allow tiny printf() to be controlled in SPL and TPL") split this option in two for TPL and SPL, but didn't change the Kconfig names, making them hard to set quickly. Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
* fdt: Add Kconfig options to control code sizeSimon Glass2019-11-041-0/+33
| | | | | | | | | | | For better or worse libfdt recent grew a lot of code that checks the validity of the device tree in great detail. When using unsigned or unverified data this makes things safer, but it does add to code size. Add some controls to select the trade-off between safety and code size. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* spl: Allow tiny printf() to be controlled in SPL and TPLSimon Glass2019-10-081-4/+16
| | | | | | | | | | | | At present there is only one control for this and it is used for both SPL and TPL. But SPL might have a lot more space than TPL so the extra cost of a full printf() might be acceptable. Split the option into two, providing separate SPL and TPL controls. The TPL setting defaults to the same as SPL. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* configs: Make USE_TINY_PRINTF depend on SPL||TPL and be defaultTom Rini2019-07-131-0/+2
| | | | | | | | | | | | | | The USE_TINY_PRINTF symbol only changes things within SPL and TPL builds, so make it depend on that support. Next, make it default as within these cases we should rarely have need of more advanced print formats outside of the debug context. To do this, in a few cases we need to correct our Kconfig dependencies as we had cases of non-SPL targets select'ing this symbol. Finally, in the case of a few boards we really do need the full printf functionality. Signed-off-by: Tom Rini <trini@konsulko.com>
* trace: make call depth limit customizableHeinrich Schuchardt2019-07-101-0/+15
| | | | | | | | | | | | Up to now we had hard coded values for the call depth up to which trace records are created: 200 for early tracing, 15 thereafter. UEFI applications reach a call depth of 80 or above. Provide customizing settings for the call trace depth limit and the early call trace depth limit. Use the old values as defaults. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* lib: add Zstandard decompression supportMarek Behún2019-05-051-0/+12
| | | | | | | | | Add the zstd library from Linux kernel (only decompression support). There are minimal changes to build with U-Boot, otherwise the files are identical to Linux commit dc35da16 from March 2018, the files had not been touched since in kernel. Also SPDX lincese tags were added. Signed-off-by: Marek Behún <marek.behun@nic.cz>
* lib: Add xxhash supportMarek Behún2019-05-051-0/+3
| | | | | | | | | | This adds the xxhash support from Linux. Files are almost identical to those added to Linux in commit 5d240522 ("lib: Add xxhash module") (they haven't been touched since in Linux). The only difference is to add some includes to be compatible with U-Boot. Also SPDX lincese tags were added. Signed-off-by: Marek Behún <marek.behun@nic.cz>
* lib: Kconfig: fix help text for GZIPHeiko Schocher2019-05-031-1/+1
| | | | | | | | | | commit 95f4bbd581cf ("lib: fdt: Allow LZO and GZIP DT compression in U-Boot") introduced Kconfig option for gzip in U-Boot, but help text says gzip for SPL, which is wrong. Fix this. Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Marek Vasut <marex@denx.de>
* Convert CONFIG_TRACE_BUFFER_SIZE et al to KconfigSimon Glass2019-04-231-0/+48
| | | | | | | | | | This converts the following to Kconfig: CONFIG_TRACE_BUFFER_SIZE CONFIG_TRACE_EARLY_SIZE CONFIG_TRACE_EARLY CONFIG_TRACE_EARLY_ADDR Signed-off-by: Simon Glass <sjg@chromium.org>
* Convert CONFIG_TRACE to KconfigSimon Glass2019-04-231-0/+9
| | | | | | | This converts the following to Kconfig: CONFIG_TRACE Signed-off-by: Simon Glass <sjg@chromium.org>
* fdtdec: Add Kconfig symbol for testsThierry Reding2019-04-111-0/+4
| | | | | | | | | Runtime tests are provided as a test_fdtdec command implementation. Add a Kconfig symbol that allows this command to be built so that the tests can be used. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* lib: fdt: Allow LZO and GZIP DT compression in U-BootMarek Vasut2019-04-091-0/+13
| | | | | | | | | | | | | Add required Kconfig symbols, Makefile bits and macro fixes in a few places to support LZO and DT compression in U-Boot. This can save a lot of space with multi-DTB fitImages. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
* lib: Kconfig: spelling fixesChris Packham2019-01-181-2/+2
| | | | | Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* spl: lz4: Allow use of lz4 compression in SPLSimon Glass2018-11-201-0/+8
| | | | | | | | In some cases U-Boot is compressed and it is useful to be able to decompress it in SPL. Add a Kconfig and Makefile change to allow this. Note that this does not actually implement decompression. Signed-off-by: Simon Glass <sjg@chromium.org>
* kconfig: Introduce HAVE_ARCH_IOMAPBin Meng2018-11-141-0/+6
| | | | | | | | Introduce a new Kconfig option for architecture codes to control whether it provides io{read,write}{8,16,32} I/O accessor functions. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* fdt: Allow libfdt in TPLSimon Glass2018-10-091-0/+10
| | | | | | | In some cases (e.g. sandbox with verified boot) it is useful to support libfdt in TPL. Update the Kconfig to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
* tpm: Add support for SPL and TPLSimon Glass2018-10-091-0/+22
| | | | | | | At present the tpm can only be used in U-Boot proper. Updated it to work in SPL and TPL also. Signed-off-by: Simon Glass <sjg@chromium.org>
* fdt_support: make FDT_FIXUP_PARTITIONS depend on CMD_MTDPARTSMasahiro Yamada2018-07-261-1/+1
| | | | | | | | | | | | | | fdt_fixup_mtdparts() calls mtdparts_init() and device_find(), which are defined in cmd/mtdparts.c The combination of FDT_FIXUP_PARTITIONS=y and CMD_MTDPARTS=n emits the following link error: common/fdt_support.c:903: undefined reference to `mtdparts_init' common/fdt_support.c:914: undefined reference to `device_find' Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* avb2.0: integrate avb 2.0 into the build systemIgor Opaniuk2018-06-181-0/+14
| | | | | | | Integrate libavb into the build system. Introduce CONFIG_LIBAVB build option. Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
* lib: Add hexdumpAlexey Brodkin2018-06-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Often during debugging session it's very interesting to see what data we were dealing with. For example what we write or read to/from memory or peripherals. This change introduces functions that allow to dump binary data with one simple function invocation like: ------------------->8---------------- print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf, len); ------------------->8---------------- which gives us the following: ------------------->8---------------- 00000000: f2 b7 c9 88 62 61 75 64 72 61 74 65 3d 31 31 35 ....baudrate=115 00000010: 32 30 30 00 62 6f 6f 74 61 72 67 73 3d 63 6f 6e 200.bootargs=con 00000020: 73 6f 6c 65 3d 74 74 79 53 33 2c 31 31 35 32 30 sole=ttyS3,11520 00000030: 30 6e 38 00 62 6f 6f 74 64 65 6c 61 79 3d 33 00 0n8.bootdelay=3. 00000040: 62 6f 6f 74 66 69 6c 65 3d 75 49 6d 61 67 65 00 bootfile=uImage. 00000050: 66 64 74 63 6f 6e 74 72 6f 6c 61 64 64 72 3d 39 fdtcontroladdr=9 00000060: 66 66 62 31 62 61 30 00 6c 6f 61 64 61 64 64 72 ffb1ba0.loadaddr 00000070: 3d 30 78 38 32 30 30 30 30 30 30 00 73 74 64 65 =0x82000000.stde 00000080: 72 72 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32 rr=serial0@e0022 00000090: 30 30 30 00 73 74 64 69 6e 3d 73 65 72 69 61 6c 000.stdin=serial 000000a0: 30 40 65 30 30 32 32 30 30 30 00 73 74 64 6f 75 0@e0022000.stdou 000000b0: 74 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32 30 t=serial0@e00220 000000c0: 30 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00.............. ... ------------------->8---------------- Source of hexdump.c was copied from Linux kernel v4.7-rc2. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Mario Six <mario.six@gdsys.cc> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Stefan Roese <sr@denx.de>
* mmc: Separate "mmc swrite" from fastbootAlex Kiernan2018-05-301-0/+11
| | | | | | | | | | | | | | Introduce CONFIG_IMAGE_SPARSE and CONFIG_CMD_MMC_SWRITE so the "mmc swrite" command is separated from the fastboot code. Move image-sparse from common to lib so it's clear it's library code. Rename CONFIG_FASTBOOT_FLASH_FILLBUF_SIZE to CONFIG_IMAGE_SPARSE_FILLBUF_SIZE and migrate it to Kconfig. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Acked-by: Jassi Brar <jaswinder.singh@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* lib/Kconfig: Mark OF_LIBFDT_OVERLAY as depending on OF_LIBFDTTom Rini2018-05-081-0/+1
| | | | | | | The overlay code is only useful when OF_LIBFDT is set, so mark it as depending on that first. Signed-off-by: Tom Rini <trini@konsulko.com>
* configs: TI: Enable FIT Library overlay supportPraneeth Bajjuri2018-05-081-0/+1
| | | | | | | | | | | | | | Enable the FDT library overlay support for all TI SOC family. Without this option, when Loading fdt from FIT image, the following warning is seen. "config with overlays but CONFIG_OF_LIBFDT_OVERLAY not set". Signed-off-by: Praneeth Bajjuri <praneeth@ti.com> Suggested-by: Andrew F.Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
* spl: Split sprintf, strto* from SPL serial in KconfigAlex Kiernan2018-04-281-0/+34
| | | | | | | | | | | | | | When SPL serial is disabled, callers who need sprintf or strtoul fail because their inclusion is guarded by CONFIG_SPL_SERIAL_SUPPORT/ CONFIG_TPL_SERIAL_SUPPORT. Split printf, sprintf and strto into their own entries and then select all of them if SERIAL_SUPPORT is enabled to match the current behaviour. Include panic.o unconditionally as it can be called from anywhere which uses BUG_ON(). Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
* Merge git://git.denx.de/u-boot-sunxiTom Rini2018-04-041-1/+0
|\ | | | | | | Signed-off-by: Tom Rini <trini@konsulko.com>
| * sunxi: revert disabling of featuresAndre Przywara2018-04-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | In January some commits were introduced to mitigate the U-Boot image size issues we encountered on sunxi builds. Now with the MMC environment removed we can bring them back, as we practically don't have a size limit anymore. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
* | optee: Add lib entries for sharing OPTEE code across portsBryan O'Donoghue2018-03-191-0/+1
|/ | | | | | | | | | | | | | | | | This patch adds code to lib to enable sharing of useful OPTEE code between board-ports and architectures. The code on lib/optee/optee.c comes from the TI omap2 port. Eventually the OMAP2 code will be patched to include the shared code. The intention here is to add more useful OPTEE specific code as more functionality gets added. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Cc: Harinarayan Bhatta <harinarayan@ti.com> Cc: Andrew F. Davis <afd@ti.com> Cc: Tom Rini <trini@konsulko.com> Cc: Kever Yang <kever.yang@rock-chips.com> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Peng Fan <peng.fan@nxp.com> Tested-by: Peng Fan <peng.fan@nxp.com>
* lib: Kconfig: Move DYNAMIC_CRC_TABLE to KconfigFaiz Abbas2018-02-141-0/+6
| | | | | | | Add CONFIG prefix to DYNAMIC_CRC_TABLE and implement it in Kconfig. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
* Convert LIB_UUID to KconfigAdam Ford2018-02-081-0/+3
| | | | | | | | | config_fallback.h has some logic that checks a variety of options and selects LIB_UUID if it hasn't already been selected. This will all LIB_UUID in Kconfig and select this option for the list of options to allow us to remove the logic from fallbacks Signed-off-by: Adam Ford <aford173@gmail.com>
* Convert CONFIG LIB_HW_RAND to KconfigAdam Ford2018-02-081-3/+15
| | | | | | | | | | | | config_fallbacks.h had some logic to automatically select LIB_RAND if RANDOM_UUID or CMD_UUID were set if LIB_HW_RAND wasn't already selected. By migrating LIB_HW_RAND to Kconfig, we can remove this check from config_fallbacks.h and put it into Kconfig Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> [trini: Turn into a choice, add NET_RANDOM_ETHADDR] Signed-off-by: Tom Rini <trini@konsulko.com>
* net: regex: Disable by default on sunXiMaxime Ripard2018-01-261-0/+1
| | | | | | | | | | | | | The sunXi arm64 build has overflown, leading to the main U-boot binary overwriting the environment when flashing the new image, or even worse, overwriting itself when we're calling saveenv. Disable this option that is not critical until we can adress the issue properly. Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
* Move CONFIG_PANIC_HANG to KconfigMasahiro Yamada2017-12-261-0/+10
| | | | | | | | Freescale (NXP) boards have lots of defconfig files per board. I used "imply PANIC_HANG" for them. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: York Sun <york.sun@nxp.com>
* rtc: add support for s35392aNandor Han2017-11-201-0/+3
| | | | | | | | | Add support for S35392A RTC. The driver supports both U-Boot driver models. Signed-off-by: Nandor Han <nandor.han@ge.com> Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk> Cc: Heiko Schocher <hs@denx.de>
* lib: allow building lzo for the SPLJean-Jacques Hiblot2017-10-051-0/+5
| | | | | | Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* lib: Add CRC32-CMarek Behún2017-10-021-0/+3
| | | | | | | | This is needed for BTRFS. Signed-off-by: Marek Behun <marek.behun@nic.cz> create mode 100644 lib/crc32c.c
* spl: fit: Eanble GZIP support for image decompressionYork Sun2017-09-111-0/+12
| | | | | | | | | Add Kconfig option SPL_GZIP and SPL_ZLIB to enable gunzip support for SPL boot, eg. falcon boot compressed kernel image. Signed-off-by: York Sun <york.sun@nxp.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Convert CONFIG_BCH to KconfigAdam Ford2017-09-011-0/+7
| | | | | | | | This converts the following to Kconfig: CONFIG_BCH Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* Fix 'notes' typosAnatolij Gustschin2017-08-201-2/+2
| | | | | | s/notes/nodes Signed-off-by: Anatolij Gustschin <agust@denx.de>
* rockchip: rk3188: rock: adjust for SPL/TPL splitPhilipp Tomsich2017-08-131-0/+9
| | | | | | | | | | | | | With the changes to split SPL/TPL for the RK3368, I apparently missed some needed adjustments to the RK3188 Kconfig and rock_defconfig. This fixes build-issues for the rock board after applying the RK3368 enablement (and SPL/TPL) set that resulted from TPL_SERIAL_SUPPORT, TPL_ROCKCHIP_BACK_TO_BROM and TPL_TINY_MEMSET being separate symbols now. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>