Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755580AbdLUUnY (ORCPT ); Thu, 21 Dec 2017 15:43:24 -0500 Received: from mail-ot0-f193.google.com ([74.125.82.193]:34115 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753010AbdLUUnV (ORCPT ); Thu, 21 Dec 2017 15:43:21 -0500 X-Google-Smtp-Source: ACJfBosTAQjXDwsXtNP0qJ+twDw73B+YPr9oJUjGrgA2PYs2ArSAo9dUIHehEpxH07hIUYPF0J+g/xv127ZbpEw8jUU= MIME-Version: 1.0 In-Reply-To: References: <1513761271-2386-1-git-send-email-zongbox@gmail.com> From: Arnd Bergmann Date: Thu, 21 Dec 2017 21:43:20 +0100 X-Google-Sender-Auth: 35vOPHok-reyhWkHoLGR8oIY_lA Message-ID: Subject: Re: [patches] [PATCH] RISC-V: Support built-in dtb To: Palmer Dabbelt Cc: zongbox@gmail.com, Olof Johansson , albert@sifive.com, Rob Herring , Mark Rutland , Wesley Terpstra , patches@groups.riscv.org, Linux Kernel Mailing List , DTML , Zong Li Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1152 Lines: 24 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. Arnd