From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Thu, 17 May 2007 22:27:27 -0400 Subject: [U-Boot-Users] idea: fdt_checkboard In-Reply-To: <464CA8ED.9080708@freescale.com> References: <464CA8ED.9080708@freescale.com> Message-ID: <464D0F0F.8070901@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Timur Tabi wrote: > Jerry, > > What do you think about implementing a board-specific function called > "fdt_checkboard()"? On platforms that have this function, it would be > called by fdt_open_into(). fdt_checkboard() would scan the device tree > and make sure that it's the right tree for this board (e.g. by checking > the 'model' or 'compatible' fields), and return an error if it's not. > > This would be helpful in eliminating the possibility of accidentally > using the wrong device tree. It could happen, for instance, if there > are multiple device trees for a given board. Hi Timur, I would rather give hush the ability to read fdt properties so that the logic could be scripted rather than being "hardcoded" in a C function. This would give some interesting capabilities, like selecting the proper fdt out of several in memory. Unfortunately I'm spouting off out of ignorance, I don't know at this point how much effort it would take to give hush the ability to test fdt properties. Best regards, gvb