From: Grant Likely Date: Sun, 17 Dec 2006 08:10:42 -0700 Subject: [U-Boot-Users] builtin OF tree dtb gone In-Reply-To: <008901c721e6$ece8c160$1e67a8c0@Jocke> References: <20061217003759.AB701353BFD@atlas.denx.de> <008901c721e6$ece8c160$1e67a8c0@Jocke> Message-ID: <528646bc0612170710x66ba7e0sd981260aeefbc67a@mail.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 On 12/17/06, Joakim Tjernlund wrote: > > "in some setups", that's the point. Our setup works fine with > an embedded OF tree in u-boot. If I am to adapt to this new > method of supplying the OF tree, not only will I have to repartion > the flash to fit the tree in there, I also need to make sure > that some 15-20 people learns this new concept for no real gain. > > It is nothing wrong with having the ability provide a OF tree > at boot time, but forcing everyone to do so is. The > most flexible way is to have both. This shouldn't be too big a deal. Add the code back for linking the .dtb into the image. Look in common/boot.c and add a check for if the third bootm parameter is '-'. If it is, then use the builtin section for the .dtb address. Then you can either use the builtin version, or pass a new one. We're not talking a lot of code here. Alternately; your u-boot image does not totally fill the sectors you have allocated for it. Since your plan is to update u-boot and the .dtb at the same time; modify your u-boot build procedure (I think by using objcopy) to link your .dtb to a known address within the unused part of the u-boot sectors (so that u-boot+dtb are in a single file) and make sure the update procedure also changes the default bootm command to include the known dtb address. There are lots of options here; and the default code in u-boot is not forcing you to do it in a particular way. g. -- Grant Likely, B.Sc. P.Eng. Secret Lab Technologies Ltd. grant.likely at secretlab.ca (403) 399-0195