From e390c8799d914bc4ef84c934b7875078489c26ab Mon Sep 17 00:00:00 2001 From: Tomaz Solc Date: Wed, 27 Feb 2019 14:22:14 +0100 Subject: ARM: rpi: save fdt that was passed from VideoCore On Raspberry Pi, VideoCore firmware creates a device tree that contains information about peripherals that were initialized by VideoCore based on settings in config.txt. Normally this device tree is passed to the Linux kernel via a pointer in the r2 register. A bootloader needs to pass this device tree to the kernel, or some peripherals will not work correctly. Since the VideoCore device tree is not compatible with barebox, we can't just pass it to barebox_arm_entry() as the internal barebox device tree. This commit makes the prebootloader code copy the device tree from VideoCore into a scrap RAM area just above the area reserved for the bootloader. Board initialization code in the bootloader proper then copies it into a file /vc.dtb. The bootloader environment is then free to pass this file to the kernel at boot (e.g. via bootm -o). Signed-off-by: Sascha Hauer --- Documentation/boards/bcm2835.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Documentation') diff --git a/Documentation/boards/bcm2835.rst b/Documentation/boards/bcm2835.rst index ea80d58348..95e910896b 100644 --- a/Documentation/boards/bcm2835.rst +++ b/Documentation/boards/bcm2835.rst @@ -30,5 +30,9 @@ Raspberry Pi 6. Turn board's power on. +VideoCore firmware creates a device tree based on the entries in ``config.txt``. This file is available to the Barebox environment in the file ``/vc.dtb``. For example, to boot a kernel shipped with Raspbian:: + + bootm -o /vc.dtb /boot/kernel7.img + .. _Raspberry Pi firmware: https://codeload.github.com/raspberrypi/firmware/zip/80e1fbeb78f9df06701d28c0ed3a3060a3f557ef .. _documentation for config.txt: https://www.raspberrypi.org/documentation/configuration/config-txt/ -- cgit v1.2.3