summaryrefslogtreecommitdiffstats
path: root/common/Kconfig
Commit message (Collapse)AuthorAgeFilesLines
* common: move workqueue handling from poller_call() to sched()Ahmad Fatoum2021-06-251-0/+5
| | | | | | | | | | | | | | | Workqueues are run out of poller_call, not because of a dependency, but because when they were added, poller_call was directly called from is_timeout. With the addition of bthreads, there is now a general resched() function that runs pollers and switches between bthreads. It makes sense to move workqueue handling there as well to keep scheduling matter contained in a single function. Do so. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210622082617.18011-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/rockchip'Sascha Hauer2021-06-161-5/+13
|\
| * ARM: rockchip: Allow to build for multiple SoCsSascha Hauer2021-06-021-5/+13
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | kconfig: update to Linux 5.13-rc1Masahiro Yamada2021-05-311-6/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous sync was Linux 5.9-rc2. Resync scripts/kconfig/ with Linux 5.13-rc1. Highlights: - make header names in include/config/ and CONFIG symbols match (scripts/basic/fixdep.c was adjusted) - remove all 'option' syntax (common/Kconfig was adjusted) - introduce KCONFIG_DEFCONFIG_LIST instead of 'option defconfig_list' - bug fixes and cleanups of nconfig - drop Qt4 support from xconfig - bug fixes, improvements, cleanups of xconfig - print a short log for syncconfig Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Link: https://lore.barebox.org/20210530145842.2610109-2-masahiroy@kernel.org Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/usb-gadget'Sascha Hauer2021-05-171-4/+11
|\
| * common: add generic system partitions interfaceAhmad Fatoum2021-05-121-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both Fastboot and DFU have their own global variables that allow specifying the partitions that can be flashed via the environment. With the upcoming addition of the USB mass storage gadget, we will need some way to define the partitions there as well. Instead of adding yet another way download method-specific variable, add a generic global.system.partitions variable that can be specified on a per-board basis and can be used for all methods. Existing variables will still remain for backwards-compatibility, but when unset, it should fall back to this new parameter. This is done in the follow-up patches. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210503114901.13095-7-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * common: make FILE_LIST feature unconditionalAhmad Fatoum2021-05-121-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | CONFIG_FILE_LIST controls whether the file_list_* family of functions are compiled. common/file-list.o does not register any initcalls and there is no code that is dependent on it being available: it's selected as required. This means linker GC can completely get rid of it if required, so drop the symbol. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210503114901.13095-16-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/riscv'Sascha Hauer2021-05-171-0/+13
|\ \
| * | RISC-V: sifive: add HiFive board supportAhmad Fatoum2021-05-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the recently added SiFive support, we now have enough functionality to boot a HiFive board to shell: qemu-system-riscv64 -M sifive_u serial_stdio \ -kernel./images/barebox-hifive-unleashed.img Some more drivers need to be ported for this to be useful: - sifive,spi0 needed for talking to SD-Card - clocksource The riscv-timer seems to be 10x too fast Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210427202309.32077-12-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | RISC-V: erizo: drop mach-erizo directoryAhmad Fatoum2021-05-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | With the recent changes, we can now delete mach-erizo. Do so. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210427202309.32077-6-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | debug_ll: support <asm/debug_ll.h> to get rid of mach directoriesAhmad Fatoum2021-05-031-0/+4
| |/ | | | | | | | | | | | | | | | | | | Linux support has no arch/riscv/mach-* directories. If we can get rid of them, we could multi-image build all images at once. Only thing holding us back is <mach/debug_ll.h>. Add <asm/debug_ll.h> as alternative. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210427202309.32077-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / fs: add linux_rootarg 'root=mmcblkXpN' supportMarco Felsch2021-05-121-0/+21
|/ | | | | | | | | | | | | | | | | | | Since commit fa2d0aa96941 ("mmc: core: Allow setting slot index via device tree alias") the linux kernel supports stable mmc device names. Barebox has stable names since years so now we can connect both which allows us to pass 'root=mmcblkXpN' as argument for the cmdline. Note: it is crucial that the kernel device tree and the barebox device tree uses the same mmc aliases. This patch adds the support to store the above cmdline as linux_rootarg if enabled. The partuuid is now used as fallback since it is not as unique as the mmcblkXpN scheme. It is added as build option since the system integrator needs to check if the used kernel contains the above commit. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20210510102523.7147-3-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common: add option for shipping KCONFIG_CONFIG as /env/data/configAhmad Fatoum2021-04-131-0/+8
| | | | | | | | | | | | Add a new option that enables access to the barebox configuration file through /env/data/config. This can be useful in environments where a fatter barebox can be tolerated (like on an EFI system partition). It could also be used to conditionally skip tests on disabled functionality in the future. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Tested-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* RISC-V: erizo: migrate to PBLAhmad Fatoum2021-03-231-2/+2
| | | | | | | | | | We now have everything in place to migrate erizo to PBL. As currently, this is the only board, we can drop all non-PBL support in the same go. Cc: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: make ARM_USE_COMPRESSED_DTB available for other archesAhmad Fatoum2021-03-231-0/+6
| | | | | | | | | | Other PBL-enabled architecture can benefit from compressed dtbs as well. Move symbol and code to a comm place to be able to use it from RISC-V in a later commit. In order not to break out of tree boards at runtime, the old symbol name is maintained for ARM. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/bthreads'Sascha Hauer2021-03-231-0/+13
|\
| * common: introduce bthreads, co-operative barebox threadsAhmad Fatoum2021-03-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the new setjmp/longjmp/initjmp support, we have all the architecture support in place to have suspendable green threads in barebox. These are expected to replace pollers and workqueues. For now we still have a differentiation between the main and secondary threads. The main thread is allowed I/O access unconditionally. If it's in a delay loop, a secondary thread running needs to be wary of not entering the same driver and doing hardware manipulation. We already have slices as mechanism to guard against this, but they aren't used as widely as needed. Preferably, in the end, threads will automatically yield until they can claim a resource (i.e. lock a mutex). Until we are there, take the same care when using bthreads as with pollers. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * common: introduce HAS_ARCH_SJLJAhmad Fatoum2021-03-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setjmp stores the registers comprising the execution context into a jmp_buf and longjmp switches to that context and continues execution just after the setjmp that allocated that jmp_buf. setjmp/longjmp can have multiple uses: - Handle return from firmware that clobbers registers. This is why we already have a setjmp/longjmp ARM - Do exception handling[1] - Port over scripting language VMs that use sjlj for context switching - Implement stackless coroutines in C. These coroutines would be stackless, because jumping to a setjmp down the call stack means that the code there will clobber the stack below it. On resuming the coroutine, it will run with a stack changed in the interim leading to undefined behavior. There are ways around that without resorting to custom Assembly: - Allocate a buffer on the scheduler's stack, so coroutine can grow into them -> Problem: exploits Undefined behavior - Yield first time on scheduler stack, then patch jmp_buf to point at another stack -> Problem: Code switching stacks should not itself use the stack - Construct a new jmp_buf with user-supplied return address and stack top: int initjmp(jmp_buf jmp, void __noreturn (*func)(void), void *stack_top); The latter could also be reused as a portable way of setting up a stack in early init code. We are going to implement green threads in later commits, so add a symbol that can be selected to indicate architecture support for setjmp, longjmp and the new initjmp. [1]: https://www.spinics.net/lists/u-boot-v2/msg41322.html Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | common: shell: select dependency GLOB for SHELL_SIMPLEAhmad Fatoum2021-03-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | Both CONFIG_SHELL_HUSH and CONFIG_SHELL_SIMPLE will call run_init, which already uses glob to collect the init scripts to run. select GLOB to make sure that these scripts are executed. If there is a use case for a shell configuration without glob support to save on size, this should be realized by a new Kconfig symbol to disable the init scripts. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | common: boot: select dependency CONFIG_GLOBAhmad Fatoum2021-03-221-0/+1
|/ | | | | | | | bootscript_scan_path calls glob to collect the bootscripts. This won't work without CONFIG_GLOB, so select it to ensure it's available. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common: Kconfig: improve defaultenv help textsRoland Hieber2021-02-011-6/+22
| | | | | Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* 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
|\ \