From nobody Mon Feb 9 10:28:38 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+58462+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+58462+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1588274360; cv=none; d=zohomail.com; s=zohoarc; b=ddvTNly1aq/6v75B3zP5eYebE9W+ryvudfQwBSuLQ7pMI/evUHPtjt97GJfk+BfVOU2SulCIgU/qIJYlYtMnDPxbYyXRjqOyJYa8vhOMJlnC7LduXzcWmb7KKQ7sq4zwyu9lmkoWWgAxoap/HlequzD2gqekplDhEVrazsBD9uw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588274360; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=QHKeGkiumIO6M0ay+j4j3dhKY5Xpm+3HGod3MwNqmko=; b=VBhlJM7f0lBFXN7P+AQz7H+dTowH/ZAeJyCJxV7NlEt19+ki3QWiq8axDe5ik4S8WK7Ewri3wIRvKRc7sEIz+/QWpN6xZydD2GQ391SPIN8G+KUZ3IOZR2U4Ztk1hUpk7carcZf++MvbOgzTKDeaKbsf5c7DjusRiitDqu8/BM4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+58462+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1588274360571209.8301905802549; Thu, 30 Apr 2020 12:19:20 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id hQFlYY1788612xNTgBBpFoM0; Thu, 30 Apr 2020 12:19:20 -0700 X-Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by mx.groups.io with SMTP id smtpd.web10.1559.1588274359718683728 for ; Thu, 30 Apr 2020 12:19:19 -0700 X-Received: by mail-qk1-f193.google.com with SMTP id i136so2857231qke.10 for ; Thu, 30 Apr 2020 12:19:19 -0700 (PDT) X-Gm-Message-State: 9RWPfwgzpMoUbSwmvqPWD7GVx1787277AA= X-Google-Smtp-Source: APiQypKKsolF4LcZXbfPXThxcRuGz534oUWSDgnXC2DXjTVhjewiw3ulhnAfas5vK8Out2xc0GJdDw== X-Received: by 2002:a05:620a:88f:: with SMTP id b15mr21739qka.118.1588274358406; Thu, 30 Apr 2020 12:19:18 -0700 (PDT) X-Received: from localhost.localdomain (c-98-214-99-181.hsd1.il.comcast.net. [98.214.99.181]) by smtp.gmail.com with ESMTPSA id d188sm778733qkg.59.2020.04.30.12.19.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2020 12:19:18 -0700 (PDT) From: "Andrei Warkentin" To: devel@edk2.groups.io Cc: ard.biesheuvel@arm.com, leif@nuviainc.com, pete@akeo.ie, philmd@redhat.com Subject: [edk2-devel] [edk2-platforms][PATCH 2/2] RPi: update Pi3 and Pi4 readmes with correct info on FDT handling Date: Thu, 30 Apr 2020 12:19:01 -0700 Message-Id: <20200430191901.89372-3-andrey.warkentin@gmail.com> In-Reply-To: <20200430191901.89372-1-andrey.warkentin@gmail.com> References: <20200430191901.89372-1-andrey.warkentin@gmail.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: <27952.devel.edk2.groups.io> Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,andrey.warkentin@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1588274360; bh=/hcMmRkyuwJJyexYDSyZgCyWXPvzoWvvGQKDv4gnLQw=; h=Cc:Date:From:Reply-To:Subject:To; b=V/G6GB0dA8RMI64FPV15mC2rbSEcuJ2pyIVPa3OUe86hf35g9CX4gckFAatH1rUFPSV u6R6iSq+dL1daQeg5+WnpKBm5uhLvbcK8rwPTuAlLO52Km/ZQRuBUO1SrbNuY27gihb5N PrFN2wo4eL1b9eLvDrW1xl93K6rmmFO9ynU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Now that Pi 3 FDT handling is fixed, let's update the docs. Furthermore, let's simplify - be proscriptive about the minimal supported config.txt configuration. Also, fix some factual mistakes: - device_tree=3D override is not mandatory when device_tree_address=3D is u= sed. Not using it means start.elf can chose the right one for the variant. - device_tree=3D override is not mandatory for dtoverlay use. Signed-off-by: Andrei Warkentin Reviewed-by: Pete Batard --- Platform/RaspberryPi/RPi3/Readme.md | 38 +++++++++++++------- Platform/RaspberryPi/RPi4/Readme.md | 24 +++++++------ 2 files changed, 39 insertions(+), 23 deletions(-) diff --git a/Platform/RaspberryPi/RPi3/Readme.md b/Platform/RaspberryPi/RPi= 3/Readme.md index f5d25b50..f19d59d8 100644 --- a/Platform/RaspberryPi/RPi3/Readme.md +++ b/Platform/RaspberryPi/RPi3/Readme.md @@ -56,23 +56,30 @@ Build instructions from the top level edk2-platforms Re= adme.md apply. 1. Format a uSD card as FAT32 2. Copy the generated `RPI_EFI.fd` firmware onto the partition 3. Download and copy the following files from https://github.com/raspberry= pi/firmware/tree/master/boot + - `bcm2710-rpi-3-b.dtb` (for Pi 3B) + - `bcm2710-rpi-3-b-plus.dtb (for Pi 3B+) + - `bcm2710-rpi-2-b.dtb` (for Pi 2B v1.2) + - `bcm2710-rpi-cm3.dtb` (for Pi CM3) - `bootcode.bin` - `fixup.dat` - `start.elf` + - `overlays/miniuart-bt.dtbo` or `overlays/disable-bt.dtbo` (Optional) 4. Create a `config.txt` with the following content: ``` arm_control=3D0x200 enable_uart=3D1 armstub=3DRPI_EFI.fd - disable_commandline_tags=3D1 + disable_commandline_tags=3D2 + device_tree_address=3D0x1f0000 + device_tree_end=3D0x200000 ``` - Additionally, if you want to use PL011 instead of the miniUART, you can = add the lines: + If you want to use PL011 instead of the miniUART on your Pi 3B/3B+, you = can add the lines: ``` - device_tree_address=3D0x10000 - device_tree_end=3D0x20000 - device_tree=3Dbcm2710-rpi-3-b[-plus].dtb dtoverlay=3Dminiuart-bt ``` + Note: doing so requires `miniuart-bt.dbto` to have been copied into an `= overlays/` + directory on the uSD card. Alternatively, you may use `disable-bt` inste= ad of + `miniuart-bt` if you don't require Bluetooth. 5. Insert the uSD card and power up the Pi. =20 Note that if you have a model 3+ or a model 3 where you enabled USB boot t= hrough OTP @@ -92,21 +99,26 @@ in the `TrustedFirmware/` directory from `edk2-non-osi`. =20 ## Custom Device Tree =20 -The default Device Tree included in the firmware is the one for a Raspberr= y Pi 3 Model B (not B+). -If you want to use a different Device Tree, to boot a Pi 3 Model B+ for in= stance (for which a -DTB is also provided under `DeviceTree/`), you should copy the relevant `.= dtb` into the root of +By default, UEFI will use the device tree loaded by the VideoCore firmware= . This +depends on the model/variant, and relies on the presence on specific files= on your boot media. +E.g.: + - `bcm2710-rpi-3-b.dtb` (for Pi 3B) + - `bcm2710-rpi-3-b-plus.dtb (for Pi 3B+) + - `bcm2710-rpi-2-b.dtb` (for Pi 2B v1.2) + - `bcm2710-rpi-cm3.dtb` (for Pi CM3) + +You can override the DTB and provide a custom one. Copy the relevant `.dtb= ` into the root of the SD or USB, and then edit your `config.txt` so that it looks like: =20 ``` (...) disable_commandline_tags=3D2 -device_tree_address=3D0x10000 -device_tree_end=3D0x20000 -device_tree=3Dbcm2710-rpi-3-b-plus.dtb +device_tree_address=3D0x1f0000 +device_tree_end=3D0x200000 +device_tree=3Dyour_fdt_file.dtb ``` =20 -Note: the address range **must** be `[0x10000:0x20000]`. -`dtoverlay` and `dtparam` parameters are also supported **when** providing= a Device Tree`. +Note: the address range **must** be `[0x1f0000:0x200000]`. `dtoverlay` and= `dtparam` parameters are also supported. =20 ## Custom `bootargs` =20 diff --git a/Platform/RaspberryPi/RPi4/Readme.md b/Platform/RaspberryPi/RPi= 4/Readme.md index 17d02e9e..62a63c4c 100644 --- a/Platform/RaspberryPi/RPi4/Readme.md +++ b/Platform/RaspberryPi/RPi4/Readme.md @@ -54,18 +54,17 @@ Build instructions from the top level edk2-platforms Re= adme.md apply. enable_uart=3D1 enable_gic=3D1 armstub=3DRPI_EFI.fd - disable_commandline_tags=3D1 + disable_commandline_tags=3D2 + device_tree_address=3D0x1f0000 + device_tree_end=3D0x200000 ``` Additionally, if you want to use PL011 instead of the miniUART, you ca= n add the lines: ``` - device_tree_address=3D0x1f0000 - device_tree_end=3D0x200000 - device_tree=3Dbcm2711-rpi-4-b.dtb dtoverlay=3Dminiuart-bt ``` - Note that doing so requires `miniuart-bt.dbto` to have been copied int= o an `overlays/` + Note: doing so requires `miniuart-bt.dbto` to have been copied into an= `overlays/` directory on the uSD card. Alternatively, you may use `disable-bt` ins= tead of - `miniuart-bt` if you don't require BlueTooth. + `miniuart-bt` if you don't require Bluetooth. 5. Insert the uSD card and power up the Pi. =20 # Notes @@ -81,18 +80,23 @@ in the `TrustedFirmware/` directory from `edk2-non-osi`. =20 ## Device Tree =20 -You can pass a custom Device Tree and overlays using the following: +By default, UEFI will use the device tree loaded by the VideoCore firmware= . This +depends on the model/variant, and relies on the presence on specific files= on your boot media. +E.g.: + - `bcm2711-rpi-4-b.dtb` (for Pi 4B) + +You can override the DTB and provide a custom one. Copy the relevant `.dtb= ` into the root of +the SD or USB, and then edit your `config.txt` so that it looks like: =20 ``` (...) disable_commandline_tags=3D2 device_tree_address=3D0x1f0000 device_tree_end=3D0x200000 -device_tree=3Dbcm2711-rpi-4-b.dtb +device_tree=3Dyour_fdt_file.dtb ``` =20 -Note: the address range **must** be `[0x1f0000:0x200000]`. -`dtoverlay` and `dtparam` parameters are also supported **when** providing= a Device Tree`. +Note: the address range **must** be `[0x1f0000:0x200000]`. `dtoverlay` and= `dtparam` parameters are also supported. =20 ## Custom `bootargs` =20 --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#58462): https://edk2.groups.io/g/devel/message/58462 Mute This Topic: https://groups.io/mt/73382825/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-