Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755599AbdLUUsJ (ORCPT ); Thu, 21 Dec 2017 15:48:09 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:40456 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754712AbdLUUsG (ORCPT ); Thu, 21 Dec 2017 15:48:06 -0500 X-Google-Smtp-Source: ACJfBovkhvMAS6xpwL2Aejcn4nGZ4NIiuyZe24k1RGiFF9G3pftcBMGosXBCjlhjFemEIMiOr1UHvQ== Date: Thu, 21 Dec 2017 12:48:05 -0800 (PST) X-Google-Original-Date: Thu, 21 Dec 2017 12:47:41 PST (-0800) Subject: Re: [patches] [PATCH] RISC-V: Support built-in dtb In-Reply-To: CC: zongbox@gmail.com, Olof Johansson , albert@sifive.com, robh+dt@kernel.org, mark.rutland@arm.com, Wesley Terpstra , patches@groups.riscv.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, zong@andestech.com From: Palmer Dabbelt To: Arnd Bergmann Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1248 Lines: 25 On Thu, 21 Dec 2017 12:43:20 PST (-0800), Arnd Bergmann wrote: > On Thu, Dec 21, 2017 at 9:32 PM, Palmer Dabbelt wrote: >> On Wed, 20 Dec 2017 01:14:31 PST (-0800), zongbox@gmail.com wrote: > >> I've added Arnd and Olof, in case they have a bit more perspective here. If >> I'm reading this correctly, there isn't an arm or arm64 option to do this. >> There is an option to built in many DTBs, which makes a lot more sense to me >> as it doesn't tie the kernel to any one particular implementation. We'd >> need a mechanism for picking the DTB that Linux should use. We've kicked >> around the idea of: >> >> * Having the bootloader always provide a DTB. >> * Taking a hash of that DTB when booting Linux. >> * Using that hash to look up DTBs that are built in to Linux. >> >> This would allow us to support replacing broken DTBs if they escape into the >> wild, but would still allow us to have a portable kernel. > > Having an embedded DTB is only necessary for platforms with a legacy bootloader > that doesn't understand DT at all, you should never need that here. > > I would suggest to require each bootloader to provide a way to replace the DTB > with one that gets installed alongside the kernel. Sounds good to me.