summaryrefslogtreecommitdiffstats
path: root/common/Kconfig
Commit message (Collapse)AuthorAgeFilesLines
* boot: introduce option to pass barebox-enabled watchdog to systemdAhmad Fatoum2020-11-301-0/+10
| | | | | | | | | | | | | | | | | 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>
* bootm: adapt help text and naming for bootm.provide_machine_idAhmad Fatoum2020-11-231-9/+10
| | | | | | | | | | | | | The Kconfig help text as well the function name machine_id_set_bootarg() suggest that enabling the Kconfig option is sufficient to have barebox pass the machine id to the kernel. This is not the case, so change the naming/documentation to make this clearer. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Reviewed-by: Bastian Krause <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/reboot-mode' into masterSascha Hauer2020-10-141-0/+5
|\
| * defaultenv: provide defaults for generic reboot modesAhmad Fatoum2020-09-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While reboot mode magic identifiers can be very board specific, we can settle on common names to allow some generic reboot mode handling: - loader -> drop to bootloader shell on next boot - bootloader -> enable fastboot on next boot - recovery -> display barebox boot menu Boot modes loader and bootloader are admittedly a bit ambiguous, but this nomenclature was chosen, because it's already in use on Android and Rockchip systems. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc' into masterSascha Hauer2020-10-141-1/+0
|\ \ | |/ |/|
| * common: debug_ll: remove reference to undefined Kconfig optionAhmad Fatoum2020-10-011-1/+0
| | | | | | | | | | | | | | | | The code was copied from the kernel, but we don't support the imx6sl. Drop the left-over. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib: kasan: migrate Kconfig option to Debugging menuAhmad Fatoum2020-09-291-0/+1
|/ | | | | | | | UBSAN and ASAN as well as other debugging aids are all in the Debugging menu. Relocate KASAN to be there as well. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc' into masterSascha Hauer2020-09-251-1/+1
|\
| * commands: setenv: allow use with hush shellAhmad Fatoum2020-09-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setenv was so far restricted to the simple shell, because with hush, users could just do dev.var=VAL for setting variables in the environment. The hush syntax doesn't allow for setting all kinds of environment variables though, e.g. 5c00a000.tamp@5c00a000:reboot-mode.of.param can't be set with hush, because of the special characters. It could still be read by using the ${variable} syntax though. Allow setting these variables by making the setenv command generally available. The default is chosen to be 'y', because the command is deemed small and useful enough to have it there by default. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * common: remove negative dependency on SANDBOX for IMD_TARGETRoland Hieber2020-08-281-1/+0
| | | | | | | | | | | | | | | | | | This dependency was added in commit b3d5c43cb8a2d492355a (2016-04-07, Antony Pavlov: "common: add dependency !SANDBOX on imd target tool"), but it seems to compile fine four years down the line. Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | sandbox: rename KASan to ASanSascha Hauer2020-09-211-5/+5
|/ | | | | | | | | sandbox really has ASan support, that is address sanitizer with the help of the userspace library libasan. In contrast KASan is used on real hardware where we have to implement our own support code. Rename sandbox KASan to ASan to not clash with upcoming KASan support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: imx8m: make debug UART selection available on i.MX8MM/MPLucas Stach2020-08-171-13/+5
| | | | | | | | | i.MX8MM/MN/MP has UARTs in the same place in the MMIO address space as the i.MX8MQ, so make the lowlevel debug a bit more generic across the i.MX8M family. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/module'Sascha Hauer2020-07-271-0/+7
|\
| * module: Implement HAVE_MOD_ARCH_SPECIFICDavid Dgien2020-07-011-0/+7
| | | | | | | | | | | | | | | | | | | | Implement HAVE_MOD_ARCH_SPECIFIC Kconfig and module_frob_arch_sections() function prototype from Linux module subsystem. module_frob_arch_sections() should be implemented by any architecture that selects HAVE_MOD_ARCH_SPECIFIC, and is called from load_module() Signed-off-by: David Dgien <dgienda125@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2020-07-271-0/+7
|\ \
| * | sandbox: add libc memory allocatorAhmad Fatoum2020-07-141-0/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we typically want to reuse as much barebox functionality as possible in sandbox, using system malloc(3) instead can be very useful when using external memory integrity tools. This is even useful for AddressSanitizer, because the reports resulting from the memory poisoning API are less detailed than the built-in support for the libc malloc(3). Note that a barebox "heap" is still allocated upfront. It's only used for request_sdram_region now though. Whatever is allocated by means of malloc and memalign will be ina disjunct heap. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/kvx'Sascha Hauer2020-07-271-1/+0
|\ \
| * | common: Kconfig: remove MIPS dependency for ELFClement Leger2020-07-011-1/+0
| |/ | | | | | | | | | | | | | | | | There is no reason anymore to limit the use of elf on mips since there is no elf specific support needed in architectures. Drop the MIPS dependency. Signed-off-by: Clement Leger <cleger@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2020-07-271-0/+8
|\ \
| * | arm: imx: add initial imx8mp supportOleksij Rempel2020-07-141-0/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | This adds base support for the i.MX8MP SoC. Not much to do here as this SoC is quite similar to the i.MX8M. This adds: - Kconfig symbols - bootsource detection - register base address defines - iomux defines Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
* | Merge branch 'for-next/fastboot'Sascha Hauer2020-07-271-12/+0
|\ \
| * | fastboot: Drop support for downloading to bufferSascha Hauer2020-06-181-12/+0
| |/ | | | | | | | | | | | | | | | | | | The option to download to a buffer instead of a file was introduced because in some workloads it is required to have a contiguous image in memory. With recent changes now ramfs can provide such a buffer via memmap API even when it downloaded the data to a file. This makes the explicit download to buffer option unnecessary, so remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / common: bootm: add support for elf file loadingClement Leger2020-06-151-0/+8
|/ | | | | | | | | | This will allows elf loader to directly have an elf file available. Thus filetype_elf bootm handlers will be able to use standard bootm functions and data. Signed-off-by: Clement Leger <cleger@kalray.eu> Tested-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/kbuild'Sascha Hauer2020-06-111-0/+1
|\
| * kconfig: add 'option modules' to allow tristate options to become mMasahiro Yamada2020-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 18895514dc5e ("kconfig: update to v3.18-rc6"), tristate symbols cannot become 'm'. In old days of Linux, CONFIG_MODULES was the special option hard-coded in Kconfig. The current Kconfig does not know which option is it. You need to specify 'option modules' to teach Kconfig that it is the module support switch. Add 'option modules' to revive the module builds. Fixes: 18895514dc5e ("kconfig: update to v3.18-rc6") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fastboot: split generic code from USB gadgetEdmund Henniges2020-05-201-0/+40
|/ | | | | | | | | | | | | The fastboot specification describes other protocols beyond USB. Allow these to reuse the generic parts of the existing fastboot code when they are implemented. Most of the changes in common/fastboot.c are due to the renaming of struct f_fastboot *f_fb to struct fastboot *fb. Signed-off-by: Edmund Henniges <eh@emlix.com> Signed-off-by: Daniel Glöckner <dg@emlix.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/kconfig'Sascha Hauer2020-05-141-3/+0
|\
| * treewide: Kconfig: remove some unused symbolsAhmad Fatoum2020-04-291-3/+0
| | | | | | | | | | | | | | | | All these symbols are defined, but unused anywhere in the barebox tree. Remove them. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/kbuild'Sascha Hauer2020-05-141-2/+1
|\ \
| * | kbuild: make DEFCONFIG_LIST workMasahiro Yamada2020-04-271-2/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the Kconfig commands (except defconfig and all*config) read the .config file as a base set of CONFIG options. When it does not exist, the files in DEFCONFIG_LIST are searched in this order and loaded if found. This is not working for barebox because ARCH_DEFCONFIG is not set by anyone, nor arch/$(ARCH)/defconfig exists. Fix this. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | drivers: add COMPILE_TEST prompts for some off-by-default optionsAhmad Fatoum2020-05-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | Some Kconfig options we have are promptless and off-by-default and instead can only be enabled by being selected from platform options. For some of those that aren't compile testable, add a new COMPILE_TEST-only prompt. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | common: introduce COMPILE_TEST option for build-testingAhmad Fatoum2020-05-081-0/+13
|/ | | | | | | | | | | | | | Compile-time analysis may help us catch latent bugs in barebox. For this to be most effective, we need an easy way to compile as much of barebox as possible. Giving all driver options prompts would do this, but at the cost of making user experience worse, by asking them about drivers for HW that's clearly not relevant to the platform they selected. Do as Linux does and provide a default-off COMPILE_TEST option, which we can use to make extra drivers selectable. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common: fix typos found with codespellYegor Yefremov2020-03-231-2/+2
| | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/optee'Sascha Hauer2020-02-181-21/+33
|\
| * ARM: add optee early loading functionRouven Czerwinski2020-01-301-21/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a OP-TEE early loading function which expects a pointer to a valid tee binary and the device tree. OP-TEE will then be started and barebox will continue to run in normal mode. The function start_optee_early should be used in a boards lowlevel.c file. Ensure that barebox has been relocated and a proper c environment has been setup beforehand. Depending on the OP-TEE configuration, the fdt will be modified. If the internal barebox device tree is passed, OP-TEE will overwrite barebox PBL memory during this modification. Copy the fdt to a save memory location beforehand to avoid a corruption of barebox PBL memory. This also moves the OP-TEE Kconfig symbols into a separate menu. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2020-02-181-3/+3
|\ \
| * | common: make CONFIG_BAREBOX_UPDATE visibleChristian Eggers2020-01-271-3/+3
| |/ | | | | | | | | | | | | | | | | The barebox update infrastructure is also useful without CONFIG_CMD_BAREBOX_UPDATE (e.g. from a own barebox_main() with CONFIG_SHELL_NONE). Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / imd: add support for checksum generation/verificationSteffen Trumtrar2020-02-101-0/+1
|/ | | | | | | | | | Add a new imd type "checksum". This type consists of the CRC32 checksum of the whole barebox image minus the checksum itself. The checksum can be written to the imd field with the bareboximd host-tool. It can be verified with said tool or with "imd" on the target. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Allow usage of default environment without environment file storageAlbert Schwarzkopf2019-12-111-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the default environment is only used when the barebox environment on the persistent store is not valid or when ENVFS_FLAGS_FORCE_BUILT_IN is set in the super block. However, ENVFS_FLAGS_FORCE_BUILT_IN can be cleared and the environmnet variables in the persistent store will be used again. This may not be desirable. This patch allows building CONFIG_DEFAULT_ENVIRONMENT independent of CONFIG_ENV_HANDLING. This can be useful if you never want to load or write values from the persistent store and you only need to read environment variables from your default environment. If CONFIG_ENV_HANDLING is not set, a message will be printed to the user indicating that changes to non-volatile variables won't be persisted. Move envfs functions that are needed when CONFIG_DEFAULT_ENVIRONMENT and/or CONFIG_ENV_HANDLING is set to a new file common/envfs-core.c. Signed-off-by: Albert Schwarzkopf <a.schwarzkopf@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: PBL break is not available on ARMv4Lucas Stach2019-12-021-1/+1
| | | | | | | | | | ARMv4 does not support the bkpt mnemonic. Rather than trying to work around this, just disable this feature for ARMv4. On Tegra the PBL runs on the ARM720T co-processor, so we also need to disable the option for this SoC architecture. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common: state: improve kconfig help textRoland Hieber2019-10-231-3/+3
| | | | | | Cc: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/machine-id'Sascha Hauer2019-10-171-0/+18
|\
| * common: machine_id: introduce machine id generationBastian Krause2019-09-301-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds functionality to pass device-specific information that will be hashed to generate a persistent unique machine id. It is then available as global.machine_id. It can be overwritten with nv.machine_id if necessary. Passing the machine id to the kernel is done in a separate patch. Note: if multiple sources provide hashable device-specific information (via machine_id_set_hashable()) the information provided by the last call prior to the late initcall set_machine_id() is used to generate the machine id from. Thus when updating barebox the machine id might change. Signed-off-by: Bastian Krause <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: at91: add basic sama5d2 supportAhmad Fatoum2019-10-141-0/+1
| | | | | | | | | | | | | | | | Add hardware description, chip identification and clock changes to support the sama5d2 SoC. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: at91: build for all SoCs when AT91_MULTI_BOARDS is selectedAhmad Fatoum2019-10-141-2/+2
|/ | | | | | | | | | | | | | | | | | | | With the addition of 15afd9d25 ("ARM: at91: Add initial support for the EVB-KSZ9477 eval board"), we now have two multi-image capable boards supported, but users still have to choose a specific SoC, so they can't be selected at the same time. Fix this, by restricting the menu to the non-multi-image configurations, i.e. CONFIG_ARCH_* symbols become specific to non-multi-image. The multi-image configurations on the other hand directly select the CONFIG_SOC_* symbol they require. Existing CONFIG_ARCH_* usage is adjusted to align with the new usage. Eventually, we would want to have a at91_multi_defconfig along with this, but for now leave existing configs as is. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common: add generic CONFIG_KASAN optionAhmad Fatoum2019-09-091-0/+10
| | | | | | | | | | | | | | -fsanitize=[kernel-]address-sanitizer allows compile-time instrumentation of memory accesses to detect some classes of runtime undefined behavior. In preparation for allowing arches to provide infrastructure in support of this feature, add the generic KASAN options. These are only shown in the debug menu when the arch selects the appropriate symbol. The option is named equally to their Linux counterparts. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common: add generic CONFIG_UBSAN plumbingAhmad Fatoum2019-09-091-0/+2
| | | | | | | | | | | | | | -fsanitize=undefined allows compile-time instrumentation of code to detect some classes of runtime undefined behavior. In preparation for allowing arches to provide infrastructure in support of this feature, add some generic UBSAN options and associated plumbing. These are only shown in the debug menu when the arch selects the appropriate symbol. The option is named equally to their Linux counterparts. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add CONFIG_PBL_BREAK optionOleksij Rempel2019-06-271-0/+8
| | | | | | | | With this option barebox will be build with breakpoint instruction in early pbl stage. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2019-06-111-6/+0
|\
| * remove CONFIG_DEBUG_INFOOleksij Rempel2019-06-071-6/+0
| | | | | | | | | | | | | | | | The ELF file should have debug symbols, the binary should have no symbols any way. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>