summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/testing'Sascha Hauer2021-06-161-0/+4
|\
| * test: add basic barebox self-test infrastructureAhmad Fatoum2021-06-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Self tests is code written to run within barebox to exercise functionality. They offer flexibility to test specific units of barebox instead of the program as a whole. Add a very simple infrastructure for registering and executing self-tests. This is based on the Linux kselftest modules. We don't utilize modules for this, however, because we only have module support on ARM, but we need a generic solution. Selftests can be enabled individually and even tested without shell support to allow tests to happen for size-restricted barebox images as well. Acked-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210604084704.17410-8-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>
* | Merge branch 'for-next/overlapping-memory-banks'Sascha Hauer2021-06-162-7/+79
|\ \
| * | memory: fuse overlapping memory banksAhmad Fatoum2021-06-022-4/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some ARM subarchitectures read back RAM size from the SDRAM controller and use the info to register memory banks. If an overlapping memory region is already registered, e.g. via device tree /memory, this second registration will fail. This is especially annoying as it can regress after a device tree sync: - Kind soul updates upstream device tree to describe minimal available RAM across hardware variants - barebox PBL has enough info about the board to set up larger RAM size and relocates barebox to the end of the RAM - barebox proper starts with new device tree and is upset to find itself outside of registered memory Account for this by growing the existing bank if a bank to be added happens to overlap it. As a special case, if the existing bank completely contains the new memory bank, the function is a no-op. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210531071239.30653-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | common: memory: allocate all memory devices at onceAhmad Fatoum2021-06-021-4/+13
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up commit will fuse overlapping RAM banks. As all memory is supposed to be registered during mem_initcall or before, we can postpone device creation to mmu_initcall, so we can directly allocate devices spanning the correct region. The mem driver and the devinfo command are the only consumers of these devices, so it's ok to register the devices at mmu_initcall. While at it, drop the struct memory_bank::dev member. It's unused anywhere. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210531071239.30653-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2021-06-165-60/+182
|\ \
| * | partitions: efi: Fix MAX_PARTITION checkSascha Hauer2021-06-091-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GPT partiton parser has a check which should check if the GPT has more partitions than we support. This doesn't work because the loop iterating over the partitions exits with a maximum i of MAX_PARTITION, i > MAX_PARTITION will never be true. Fix the check. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210602071533.10093-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | partitions: Increase MAX_PARTITION to 128Sascha Hauer2021-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having MAX_PARTITION defined to 8 is enough for a DOS partition table, but not for GPT. Increase it to the maximum GPT supports. It might be even better to allocate the partitions dynamically, but for nor take the easy way out. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviwed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210602071533.10093-1-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | bootm: add support for booting compressed imagesLucas Stach2021-05-271-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ARM64 does not have a self extracting image format, but relies on the image being externally compressed with one of the standard compression algorithms. Add support for decompressing the bootm OS image. It is added in common code as it may also be useful for other images/architectures. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Link: https://lore.barebox.org/20210526090216.4003977-2-l.stach@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: introduce global.linux.bootargs_appendAhmad Fatoum2021-05-261-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, barebox overwrites the bootargs in the oftree if it itself has any. Make this behavior configurable by adding a new global variable. The new global variable allows either appending barebox' bootargs to the original oftree bootargs (global.linux.bootargs_append=1) or overwriting the original oftree bootargs (global.linux.bootargs_append=0) as before. The default is to overwrite the original bootargs. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> [bst: dropped a new line removal, extend commit message] Signed-off-by: Bastian Krause <bst@pengutronix.de> Link: https://lore.barebox.org/20210414130044.6910-2-bst@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: fix up /chosen node even when there are no bootargsAhmad Fatoum2021-05-261-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the /chosen fixups of "reset-source", "reset-source-instance", "reset-source-device" and "bootsource" do not happen if no bootargs are available. Fix that by moving the actual bootargs fixup to a dedicated function of_write_bootargs() and only return there early on empty bootargs, but still perform the /chosen fixups mentioned above. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> [bst: dropped new line deletions and modified string comparison, moved of_write_bootargs() call to original position, add commit message] Signed-off-by: Bastian Krause <bst@pengutronix.de> Link: https://lore.barebox.org/20210414130044.6910-1-bst@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | common: oftree: replace printf by pr_infoMarco Felsch2021-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to control the output behaviour e.g. booting silently to improve boot time. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20210521163435.17365-5-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | common: bootm: replace printf by pr_err/infoMarco Felsch2021-05-251-44/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to control the output behaviour e.g. booting silently to improve boot time. Furthermore it adds a 'ERROR:' prefixed output in case of pr_err which is colored as well (depending on your terminal). This helps us to identify unwanted behaviour. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20210521163435.17365-4-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | common: boot: replace printf by pr_info/warn variantsMarco Felsch2021-05-251-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | This allows us to control the output behaviour e.g. booting silently to improve boot time. Furthermore it adds a 'WARNING:' prefixed output in case of pr_warn which is colored as well (depending on your terminal). This helps us to identify unwanted behaviour. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20210521163435.17365-3-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/kconfig'Sascha Hauer2021-06-161-6/+1
|\ \
| * | 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>
* / i.MX FCB: Fix error checkingSascha Hauer2021-05-181-8/+9
|/ | | | | | | | | | The return value of imx_bbu_firmware_fcb_start_page() is assigned to an unsigned type which is then tested for an error (<0). Test against a signed variable instead to let the error checking actually work. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20210517185424.32145-4-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/usb-gadget'Sascha Hauer2021-05-178-69/+244
|\
| * file_list: add file_list_detect_all()Ahmad Fatoum2021-05-121-0/+17
| | | | | | | | | | | | | | | | | | | | This is a common theme along the code that uses file_lists. Add a function that abstracts it. This could later be used to simplify this operation in the fastboot code. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210503114901.13095-15-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * bbu: add function to directly add handlers into file_listAhmad Fatoum2021-05-122-28/+17
| | | | | | | | | | | | | | | | | | | | | | bbu_handlers_iterate() is only used for merging handlers into a file_list. This can be useful for other update mechanisms as well. Export a bbu_append_handlers_to_file_list that does this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210503114901.13095-14-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fastboot/dfu: use system partitions as fall backAhmad Fatoum2021-05-122-31/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | Use the new system partitions infrastructure to have fastboot and DFU fall back to using the same partitions if the global.usbgadget.dfu_function and global.fastboot_partitions are not set, respectively. No functional change intended for configurations that have SYSTEM_PARTITIONS disabled. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210503114901.13095-13-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * file_list: make freeing a NULL pointer a no-opAhmad Fatoum2021-05-121-0/+3
| | | | | | | | | | | | | | | | This makes code added into usbgadget in a later commit less verbose. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210503114901.13095-12-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usbgadget: allow DFU and Fastboot functions to coexistAhmad Fatoum2021-05-121-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the commit, one upon a time the fastboot client tool did not support a device that exports DFU as well. It does nowadays, and while dfu-util 0.9 doesn't, it might some day. Because these host tools are outside of barebox' control, allow both to coexist and just throw a warning that dfu-util might not work. With the new system partitions support, enabled fastboot and DFU mean that autostart would start both as part of the same multi-gadget. This would've failed, but would now just emit a warning. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210503114901.13095-11-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usbgadget: autostart: fix indeterminism around usbgadget.autostartAhmad Fatoum2021-05-121-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The setter for usbgadget.autostart evaluates other device paramaters, so it must happen postenvironment, otherwise it could run too early and not see the device parameters it depends on. This was observed with usbgadget.dfu_function, which wasn't loaded from the environment early enough, but it now does. While at it, remove some more wonkyness: - usbgadget_autostart_set is only ever called when the IS_ENABLED(CONFIG_USB_GADGET_AUTOSTART), so drop the check - There is no need to make usbgadget.acm specific to autostart. It's behavior now is counter intuitive (enable Kconfig symbol, but don't set global variable and it will have an effect. Disable CONFIG_USB_GADGET_AUTOSTART, which looks completely unrelated and it no longer works. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210503114901.13095-10-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fastboot: handle ill-named partitions gracefullyAhmad Fatoum2021-05-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Users can configure a partition name of bbu-something that would conflict at fastboot init time with a barebox update "something" handler. Current behavior is to silently ignore all remaining barebox update handlers. It would be better to complain loudly and to skip only the entries actually conflicting. Do so. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210503114901.13095-8-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * common: add generic system partitions interfaceAhmad Fatoum2021-05-124-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * param: introduce file-list parameter typeAhmad Fatoum2021-05-121-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | DFU, fastboot and incoming mass storage support all use file lists as input, but individually check syntax correctness only on use. A dedicated file list parameter would improve the user experience and makes the code using it easier to handle: the struct file_list can be passed around directly instead of having to parse it first on use. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210503114901.13095-6-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * common: make FILE_LIST feature unconditionalAhmad Fatoum2021-05-122-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * common: console: add log_writefile to write log into new fileAhmad Fatoum2021-05-031-0/+20
| | | | | | | | | | | | | | | | | | | | It can be useful to dump the log into the file, e.g. when doing an update from a USB flash drive with no serial peer attached. Add a function to facilitate this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210503114901.13095-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/riscv'Sascha Hauer2021-05-173-1/+80
|\ \
| * | bootm: move ARM64 Linux image parsing to common directoryAhmad Fatoum2021-05-172-1/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux on RISC-V adopts the same structure as on ARM64 for both 32- and 64-bit kernel images and it's likely future architectures will as well. In preparation for adding RISC-V Linux boot support, move the bulk of the code to a common location for reusability. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210504104513.2640-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | 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>
* | Merge branch 'for-next/misc'Sascha Hauer2021-05-172-7/+21
|\ \
| * | startup: introduce global.endianness variableAntony Pavlov2021-05-121-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The global.endianness variable makes it possible to determine current endian mode from command line or from script on bi-endian capable system. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Link: https://lore.barebox.org/20210511083648.134890-1-antonynpavlov@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | common: console_common: Replace vsprintf with vsnprintfJules Maselbas2021-05-121-7/+8
| |/ | | | | | | | | | | | | | | | | | | Replace the *sprintf to their *snprintf version when printing to the fixed size printbuffer. Reported-by: Neeraj Pal <neerajpal09@gmail.com> Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Link: https://lore.barebox.org/20210417211144.26466-1-jmaselbas@kalray.eu 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>
* Merge branch 'for-next/misc'Sascha Hauer2021-04-157-34/+190
|\
| * bareboximd: Use mmap when possiblySascha Hauer2021-04-141-1/+5
| | | | | | | | | | | | | | | | | | It's hard to believe but there are systems out there that are so sparse with memory that they can't afford 1MiB of RAM to read a file into. Use mmap when possible and fall back to reading into an allocated buffer otherwise. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * resource: enable use of iomem command on EFI systemsAhmad Fatoum2021-04-133-1/+177
| | | | | | | | | | | | | | | | | | | | | | | | iomem was so far unimplemented for EFI, because barebox didn't know what to put there as the UEFI implementation does the heavy lifting. Add an initcall that uses the EFI get_memory_map entry point to remedy this. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Link: https://lore.pengutronix.de/20210410110355.2105448-1-ahmad@a3f.at 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>
| * x86: drop legacy (PC BIOS) boot in favor of EFIAhmad Fatoum2021-03-252-31/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The 16-bit port has experienced bitrot and failed to compile with more recent linkers for at least a year. Fixing the linker error is insufficient to restore a barebox that can boot to shell. This continued breakage likely means that there are no users interested in updating. As new x86 projects should be using MACH_EFI_GENERIC anyway, retire support for 16-bit legacy boot (MACH_X86_GENERIC). Acked-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * common: drop done TODO about 4G partitionsAhmad Fatoum2021-03-251-1/+0
| | | | | | | | | | | | | | | | With recent changes, barebox can handle partitions bigger than 4G. Remove the todo. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/clk'Sascha Hauer2021-04-152-17/+14
|\ \
| * | common: common_console: Rework log_printJules Maselbas2021-03-261-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since time_beginning has been removed there is no reason to use a variables called `diff` or `diff_ul`, there are respectively renamed to `time_ns` and `time`. Also remove the test for null timestamp. Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clock: Remove time_beginningJules Maselbas2021-03-262-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The output of the `demsg -t` command will have broken timestamps for every log entries written (in the log) before switching clock. The function get_time_ns() is monotonic, thus setting time_beginning with get_time_ns() when switching clocksource will always result in time_beginning being greater than every timestamp set before. Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clock: Update cs->cycle_last when switching clockJules Maselbas2021-03-261-0/+6
| |/ | | | | | | | | | | | | | | | | | | | | If clocksource is free-running it might have been running for a while before barebox started, we only care about the time spent in barebox. We can discard the cycles accumulated before switching clocks by updating cs->cycle_last with the cycles read for the new clock right before switching. Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>