From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Belloni Date: Tue, 28 Feb 2012 23:57:53 +0100 Subject: [U-Boot] [PATCH v3] AT91SAM9*: Change kernel address in dataflash to match u-boot's size In-Reply-To: <4F4BA04E.7050200@emagii.com> References: <4F424402.104@aribaud.net> <1329756057-2868-1-git-send-email-alexandre.belloni@piout.net> <4F4BA04E.7050200@emagii.com> Message-ID: <20120228225753.GA16686@piout.net> 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, Feb 27, 2012 at 04:25:02PM +0100, Ulf Samuelsson wrote : > On 2012-02-20 17:40, Alexandre Belloni wrote: > >On at91sam platforms, u-boot grew larger than the allocated size in > >dataflash, the layout was: > >bootstrap 0x00000000 > >ubootenv 0x00004200 > >uboot 0x00008400 > >kernel 0x00042000 > > > >u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 = > >0x39C00 bytes anymore. > > > >Now, the layout is: > >bootstrap 0x00000000 > >uboot 0x00004000 > >ubootenv 0x00084000 > >ubootenv2 0x00088000 > >kernel 0x0008C000 > > > > > NAK! > > 1. You need to be aware of the page size of dataflashes. > Each page is 1056 bytes, not 1024 bytes. > Your patch will make the U-Boot image start in the middle of a page. Ok, I couldn't find a clear spec on that dataflash... > 2. Std AT91bootstrap loads U-Boot from 0x8400 > so your patch breaks 99% of all SAM9 boards. > Those boards are broken anyway ! As u-boot is bigger than the load size of at91bootstrap (0x33900 by default). So, not changing means that you are screwed after flashing a new u-boot. > If you want to grow U-Boot, then > > bootstrap 0x00000000 ; 16 kB > ubootenv 0x00004200 ; 16 kB - Should be plenty > uboot 0x00008400 ; > kernel 0x00063000 ; Why waste space... > What about the redundant env ? Why shouldn't we reorder u-boot and its env ? Regards, -- Alexandre Belloni