From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Fri, 18 May 2007 10:35:52 -0500 Subject: [U-Boot-Users] Ideas on U-Boot configuration with FDT In-Reply-To: <464DC663.90707@smiths-aerospace.com> References: <464D6D4A.4000200@grandegger.com> <464DB7C1.4050509@freescale.com> <464DC663.90707@smiths-aerospace.com> Message-ID: <464DC7D8.2050703@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Jerry Van Baren wrote: > NO. fdt_open_into() is part of libfdt, which is a _generic_ fdt > library. fdt_check_board() would be board specific and any call-out to > it from the generic libfdt would be a mistake because it would make > libfdt u-boot specific. I can understand that, but then we have a problem. We don't want to be able to use a device tree without checking it. We have to implement some kind of mechanism to ensure that fdt_checkboard() is called before the kernel is booted. > If we implement a fdt_checkboard(), I agree with Wolfgang that it would > be called early in the board-specific start up code. But *after* fdt_open_into() is called. Perhaps we need a higher-level version of fdt_open_into()? And perhaps "fdt addr" should call this function instead? > If we implement a fdt_checkboard(), I would create a new subcommand for > it. While it could be added to the "fdt addr" command to verify the > user pointed to a valid fdt, I would strongly resist that. Ok. > "UNIX was > not designed to stop its users from doing stupid things, as that would > also stop them from doing clever things." ? Doug Gwyn U-Boot isn't Unix. > "fdt addr" (no underscore) is the subcommand that allows the user to > change the fdt address *change* the fdt address? I'm not sure that's the best way of handling it. The fdt library should simply be told where the FDT is located. Moving the FDT around in memory is probably beyond its scope. -- Timur Tabi Linux Kernel Developer @ Freescale