From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chee, Tien Fong Date: Tue, 12 Jun 2018 04:25:45 +0000 Subject: [U-Boot] [PATCH v2 3/3] common: Generic loader for file system In-Reply-To: References: <1527138244-16058-1-git-send-email-tien.fong.chee@intel.com> <1527138244-16058-4-git-send-email-tien.fong.chee@intel.com> <1528344245.10642.1.camel@intel.com> <1528360598.10642.8.camel@intel.com> <1528364720.10642.15.camel@intel.com> <1528366318.10642.19.camel@intel.com> <0115d042-8f5d-45ff-5605-7343b051db12@denx.de> <1528693318.9950.5.camel@intel.com> <1528717995.9614.6.camel@intel.com> <81b8f03b-a5d3-4883-a3bc-f1f010f187d3@denx.de> <1528720926.9614.10.camel@intel.com> <0ac076b9-9ca7-1e5c-09eb-7f986d1ea8f2@denx.de> <1528725312.9614.17.camel@intel.com> <429aef2e-3c68-5c5f-33f3-48dc194f7603@denx.de> <1528726423.9614.18.camel@intel.com> <035cafe7-f217-91ce-5447-4a864de0fde8@denx.de> Message-ID: <1528777544.9908.2.camel@intel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, 2018-06-11 at 13:38 -0600, Simon Glass wrote: > Hi, > > On 11 June 2018 at 08:15, Marek Vasut wrote: > > > > On 06/11/2018 04:13 PM, Chee, Tien Fong wrote: > > > > > > On Mon, 2018-06-11 at 16:03 +0200, Marek Vasut wrote: > > > > > > > > On 06/11/2018 03:55 PM, Chee, Tien Fong wrote: > > > > [...] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Linux firmware loading method is different with this > > > > > > > > > Linux loading firmware with > > > > > > > > > 1. Firmware search paths - which is hardcoded in root > > > > > > > > > file > > > > > > > > > system > > > > > > > > > 2. Built-in firmware - part of kernel binaries > > > > > > > > > > > > > > > > > > This patch loading firmware with > > > > > > > > > 1. Storage type and partition specified in DTS, but > > > > > > > > > storage > > > > > > > > > type > > > > > > > > > can > > > > > > > > > be overridden dev instance and partition through U- > > > > > > > > > boot > > > > > > > > > variable > > > > > > > > > environment. > > > > > > > > > > > > > > > > > > Or: > > > > > > > > > > > > > > > > > > 2. Storage type can be set through dev instance, and > > > > > > > > > partition > > > > > > > > > through > > > > > > > > > U-boot variable environment. No DTS is required. > > > > > > > > And why can we not do as Linux does ? > > > > > > > > > > > > > > > Because we don't have root file system, but i have > > > > > > > mimicked the > > > > > > > search > > > > > > > path in our variable environment, but with both storage > > > > > > > type > > > > > > > and > > > > > > > partition. > > > > > > OK, so user can configure environment variable to inform U- > > > > > > Boot > > > > > > where > > > > > > to > > > > > > look for firmware, good (although, this probably fails in > > > > > > early > > > > > > env, > > > > > > dunno of that's a problem). > > > > > > > > > > > Without DTS, then you need to configure env variable, so that > > > > > SPL > > > > > and > > > > > U-boot only know what storage type and partiton to look for > > > > > firmware. > > > > I guess that's fine ? > > > > > > > Yes, it is already supported in this patches. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > But why do we need the DT part of things ? I don't think we > > > > > > do > > > > > > need > > > > > > it > > > > > > at all. > > > > > > > > > > > Leverage the flexibility and benefits of the DT such as > > > > > changing > > > > > both > > > > > storage type and partitions without changing the codes. > > > > DT is a hardware description. Does this describe hardware ? No > > > > > > > Okay, then i will remove DT part. > > Wait for feedback from sjg at least. > I think using device tree is fine for this, but I suggest that the > binding file (when you add it) should mention that the node for this > driver should go in /chosen. That's what we use for settings, etc. > Okay, sure. So, we agree supporting device tree is good to go. > Things to do: > - Add a sandbox driver for this uclass, and a test in test/dm/... > - Add some documentation about it somehwere > - Add a device-tree binding file - see doc/device-tree-bindings > Okay, let me try. > Regards, > Simon