From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx2.rafi.de ([178.15.151.13]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SqhOo-0004Z1-HB for barebox@lists.infradead.org; Mon, 16 Jul 2012 09:15:35 +0000 In-Reply-To: <20120716085418.GG30009@pengutronix.de> References: <20120716085418.GG30009@pengutronix.de> MIME-Version: 1.0 Message-ID: From: christian.buettner@rafi.de Date: Mon, 16 Jul 2012 11:15:24 +0200 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============6580074526712840026==" Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Antwort: Re: barebox image size To: Sascha Hauer Cc: barebox@lists.infradead.org Dies ist eine mehrteilige Nachricht im MIME-Format. --===============6580074526712840026== Content-Type: multipart/alternative; boundary="=_alternative 0032D943C1257A3D_=" Dies ist eine mehrteilige Nachricht im MIME-Format. --=_alternative 0032D943C1257A3D_= Content-Type: text/plain; charset="US-ASCII" i am using: static inline struct device_d *imx53_add_nand(struct imx_nand_platform_data *pdata) { struct resource res[] = { { .start = MX53_NFC_BASE_ADDR, .size = SZ_4K, .flags = IORESOURCE_MEM, }, { .start = MX53_NFC_AXI_BASE_ADDR, .size = SZ_4K, .flags = IORESOURCE_MEM, }, }; struct device_d *dev = xzalloc(sizeof(*dev)); dev->resource = xzalloc(sizeof(struct resource) * ARRAY_SIZE(res)); memcpy(dev->resource, res, sizeof(struct resource) * ARRAY_SIZE(res)); dev->num_resources = ARRAY_SIZE(res); strcpy(dev->name, "imx_nand"); dev->id = -1; dev->platform_data = pdata; register_device(dev); return dev; } with imx_nand_platform_data parameter: static struct imx_nand_platform_data tx53_nand_pdata = { .width = 1, .hw_ecc = 1, .flash_bbt = 1, }; imx_nand_load_image() is never used in my imx53 board init code.. is this the fault? - christian Von: Sascha Hauer An: christian.buettner@rafi.de, Kopie: barebox@lists.infradead.org Datum: 16.07.2012 10:54 Betreff: Re: barebox image size On Mon, Jul 16, 2012 at 10:37:41AM +0200, christian.buettner@rafi.de wrote: > hi, > > we need to implement a lot of features into the barebox. Finally the size > of the image will be bigger than the standard max of 256K. > When i flash an image, bigger than 256K to nand, barebox does not boot > anymore - if i reduce it to 256K or smaller, everthing works fine. > > What do i have to do to use a bigger barebox image size? Just a guess: You are using imx_nand_load_image() with a fixed size of 256k. grep for this function in the current tree and see how the correct image size is calculated. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --=_alternative 0032D943C1257A3D_= Content-Type: text/html; charset="US-ASCII" i am using:

static inline struct device_d *imx53_add_nand(struct imx_nand_platform_data *pdata)
{
        struct resource res[] = {
                {
                        .start = MX53_NFC_BASE_ADDR,
                        .size = SZ_4K,
                        .flags = IORESOURCE_MEM,
                }, {
                        .start = MX53_NFC_AXI_BASE_ADDR,
                        .size = SZ_4K,
                        .flags = IORESOURCE_MEM,
                },
        };
        struct device_d *dev = xzalloc(sizeof(*dev));

        dev->resource = xzalloc(sizeof(struct resource) * ARRAY_SIZE(res));
        memcpy(dev->resource, res, sizeof(struct resource) * ARRAY_SIZE(res));
        dev->num_resources = ARRAY_SIZE(res);
        strcpy(dev->name, "imx_nand");
        dev->id = -1;
        dev->platform_data = pdata;

        register_device(dev);

        return dev;
}

with imx_nand_platform_data parameter:
static struct imx_nand_platform_data tx53_nand_pdata =
{
    .width      = 1,
    .hw_ecc     = 1,
    .flash_bbt  = 1,
};

imx_nand_load_image() is never used in my imx53 board init code.. is this the fault?

- christian



Von:        Sascha Hauer <s.hauer@pengutronix.de>
An:        christian.buettner@rafi.de,
Kopie:        barebox@lists.infradead.org
Datum:        16.07.2012 10:54
Betreff:        Re: barebox image size




On Mon, Jul 16, 2012 at 10:37:41AM +0200, christian.buettner@rafi.de wrote:
> hi,
>
> we need to implement a lot of features into the barebox. Finally the size
> of the image will be bigger than the standard max of 256K.
> When i flash an image, bigger than 256K to nand, barebox does not boot
> anymore - if i reduce it to 256K or smaller, everthing works fine.
>
> What do i have to do to use a bigger barebox image size?

Just a guess:

You are using imx_nand_load_image() with a fixed size of 256k. grep for
this function in the current tree and see how the correct image size is
calculated.

Sascha


--
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 |
http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

--=_alternative 0032D943C1257A3D_=-- --===============6580074526712840026== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox --===============6580074526712840026==--