From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Kiryanov Date: Wed, 23 Jan 2013 13:07:22 +0200 Subject: [U-Boot] [PATCH 5/5] cm-t35: add support for loading splash image from NAND In-Reply-To: <50FFBFD5.90800@compulab.co.il> References: <1356246228-26732-1-git-send-email-nikita@compulab.co.il> <1356246228-26732-6-git-send-email-nikita@compulab.co.il> <50D81891.1030503@myspectrum.nl> <50D96A59.2030305@compulab.co.il> <50DB0969.1020104@myspectrum.nl> <50E0520A.5090103@compulab.co.il> <20130122083703.45ceac28@lilith> <50FFBFD5.90800@compulab.co.il> Message-ID: <50FFC46A.9070908@compulab.co.il> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 01/23/2013 12:47 PM, Nikita Kiryanov wrote: > Hi Albert, > > On 01/22/2013 09:37 AM, Albert ARIBAUD wrote: >> Hi Nikita, >> > > [...] > >> Note that if the user address is constrained to be 4-byte-aligned, >> then only the "2 x 'B' 'M'" case would apply. > > I think a simpler way to implement something like this is to just > use modulo 4 to check alignment and fix the address dynamically; > perhaps even fixing it in the environment. > > This is a localized approach though. We will have to do this from > all the code paths that lead to a bmp header being probed in memory. > I would prefer a more localized solution. Correction: "I would prefer a more global solution." > >> >> 3) define an internal 'BMP holder' structure which contains a >> two-byte prefix before the 'BMP file' header and data. This way, if >> the overall structure is aligned, then the fields in the BMP header are >> aligned too. >> >> >> Amicalement, >> > > -- Regards, Nikita.