summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/qemu-virt
Commit message (Collapse)AuthorAgeFilesLines
* fdt: Check blob size during unflatteningSascha Hauer2021-06-251-2/+2
| | | | | | | | | | | of_unflatten_dtb() doesn't check the size of the device tree blob passed to it. Add a size argument end add checks for the size. Some callers have no idea of the buffer size themselves, INT_MAX is passed in these cases. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20210624085223.14616-4-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: propagate errors inside barebox_register_{of, fdt} into initcallsAhmad Fatoum2021-06-021-2/+1
| | | | | | | | | | | | | | | Errors during device tree registration, while uncommon, are really annoying, because the system may limp along and it's not clear where the misbehavior originates from. Failing the initcall of the device tree would improve user experience in that error case. There is intentionally no early exit on error cases to give barebox a chance to probe the serial driver to actually report errors when DEBUG_LL is disabled. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210531071239.30653-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM64: qemu-virt64: migrate to generic DT imageAhmad Fatoum2021-03-171-2/+8
| | | | | | | | | | | | | | | | | | | | | | Current qemu-virt64 barebox support doesn't look much like what's offered on physical boards. It's not relocatable, lacks PBL and doesn't use device tree. As qemu-system-aarch64 -M virt -kernel already supplies an external device tree, we could just replace all existing support with BOARD_ARM_GENERIC_DT, which builds a barebox image that reuses an externally passed device tree. The 32-bit ARM VIRT support has some board code for host name setting and overlay applying to handle environment and state on flash. We could do without that, given the new virtio-blk support, but the code is already there, so reuse it and drop all current virt64-specific board code. As the barebox ELF image resulting from the build can no longer be directly booted as before and only with -kernel, not -bios, rename the Kconfig symbol, so existing users can notice this during build. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: qemu: support for state & env via DT overlayRouven Czerwinski2021-01-184-0/+133
| | | | | | | | | | | | | | | | Add support for state and barebox environment by applying an overlay on top of the qemu generated device tree. If qemu is used with a persistent flash partition, this allows usage of environments and state across qemu reboots. Simple testing can be performed by starting with qemu-system-arm -m 256M -M virt -kernel images/barebox-dt-2nd.img -nographic Storing data, changing into the qemu console via Ctrl-A Ctrl-C, issuing 'system_reset' and Ctrl-A Ctrl-C to get back into the barebox console. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: qemu: add support for qemu virt platformRouven Czerwinski2020-11-122-0/+37
Necessary support to boot barebox on ARM qemu virt platforms. No internal device tree, since it is passed by qemu. Therefore it employs the generic 2nd stage image as the low level code and only adds a virt specific board driver. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>