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 1Sr4Xb-0001I1-F1 for barebox@lists.infradead.org; Tue, 17 Jul 2012 09:58:06 +0000 In-Reply-To: <2711184.rUQpv2fWDx@dev1> References: <20120716103054.GJ30009@pengutronix.de> <2711184.rUQpv2fWDx@dev1> MIME-Version: 1.0 Message-ID: From: christian.buettner@rafi.de Date: Tue, 17 Jul 2012 11:58:00 +0200 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============7305287643886488206==" Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Antwort: Re: Antwort: Re: Antwort: Re: Antwort: Re: barebox image size To: Marc Reilly Cc: barebox@lists.infradead.org Dies ist eine mehrteilige Nachricht im MIME-Format. --===============7305287643886488206== Content-Type: multipart/alternative; boundary="=_alternative 0036BF7DC1257A3E_=" Dies ist eine mehrteilige Nachricht im MIME-Format. --=_alternative 0036BF7DC1257A3E_= Content-Type: text/plain; charset="US-ASCII" ok i was able to preceed a little. The new error message after booting is: barebox 2012.03.0-dirty (Jul 17 2012 - 11:36:47) Board: RAFI i.MX53 eth@eth0: got MAC address from EEPROM: ******** NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit) Bad block table found at page 65472, version 0x01 Bad block table found at page 65408, version 0x01 nand_read_bbt: Bad block at 0x060a0000 Malloc space: 0x7df00000 -> 0x7fefffff (size 32 MB) Stack space : 0x7def8000 -> 0x7df00000 (size 32 kB) envfs: wrong magic on /dev/env0 running /env/bin/init... not found barebox:/ current settings are: flash_header.c struct imx_flash_header_v2 __flash_header_section flash_header = { .header.tag = IVT_HEADER_TAG, .header.length = cpu_to_be16(32), .header.version = IVT_VERSION, .entry = APP_DEST + 0x1000, .dcd_ptr = APP_DEST + 0x400 + offsetof(struct imx_flash_header_v2, dcd), .boot_data_ptr = APP_DEST + 0x400 + offsetof(struct imx_flash_header_v2, boot_data), .self = APP_DEST + 0x400, .boot_data.start = APP_DEST, .boot_data.size = 0x80000, .dcd.header.tag = DCD_HEADER_TAG, .dcd.header.length = cpu_to_be16(sizeof(struct imx_dcd) + sizeof (dcd_entry)), .dcd.header.version = DCD_VERSION, .dcd.command.tag = DCD_COMMAND_WRITE_TAG, .dcd.command.length = cpu_to_be16(sizeof(struct imx_dcd_command) + sizeof(dcd_entry)), .dcd.command.param = DCD_COMMAND_WRITE_PARAM, }; Environment config nand_parts="512k(barebox)ro,512k(bareboxenv),4M(kernel),120M(root)" board_init.c devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self0"); devfs_add_partition("nand0", 0x80000, 0x80000, PARTITION_FIXED, "env0"); seems like the enviroment.c->envfs_load() looks into a wrong memory area. Is there a Setting i forgot? - christian Von: Marc Reilly An: barebox@lists.infradead.org, Kopie: christian.buettner@rafi.de, Sascha Hauer Datum: 17.07.2012 00:34 Betreff: Re: Antwort: Re: Antwort: Re: Antwort: Re: barebox image size Gesendet von: Marc Reilly Hi, > I flashed from 0x0 to 0x7FFFF (image size: 479K). > I flashed the environment image (image size: 3K) from 0x80000 to 0xFFFFF Her you write 512k for env > and changed the config code from barebox/environs/common/config to: > > ... > nand_parts="512k(barebox)ro,768k(bareboxenv),4M(kernel),120M(root)" And here you say its 786k. Cheers, Marc --=_alternative 0036BF7DC1257A3E_= Content-Type: text/html; charset="US-ASCII" ok i was able to preceed a little. The new error message after booting is:

barebox 2012.03.0-dirty (Jul 17 2012 - 11:36:47)

Board: RAFI i.MX53
eth@eth0: got MAC address from EEPROM: ********
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
nand_read_bbt: Bad block at 0x060a0000
Malloc space: 0x7df00000 -> 0x7fefffff (size 32 MB)
Stack space : 0x7def8000 -> 0x7df00000 (size 32 kB)
envfs: wrong magic on /dev/env0
running /env/bin/init...
not found
barebox:/


current settings are:

flash_header.c
struct imx_flash_header_v2 __flash_header_section flash_header =
{
    .header.tag         = IVT_HEADER_TAG,
    .header.length      = cpu_to_be16(32),
    .header.version     = IVT_VERSION,

    .entry              = APP_DEST + 0x1000,
    .dcd_ptr            = APP_DEST + 0x400 + offsetof(struct imx_flash_header_v2, dcd),
    .boot_data_ptr      = APP_DEST + 0x400 + offsetof(struct imx_flash_header_v2, boot_data),
    .self               = APP_DEST + 0x400,

    .boot_data.start    = APP_DEST,
    .boot_data.size     = 0x80000,

    .dcd.header.tag     = DCD_HEADER_TAG,
    .dcd.header.length  = cpu_to_be16(sizeof(struct imx_dcd) + sizeof(dcd_entry)),
    .dcd.header.version = DCD_VERSION,

    .dcd.command.tag    = DCD_COMMAND_WRITE_TAG,
    .dcd.command.length = cpu_to_be16(sizeof(struct imx_dcd_command) + sizeof(dcd_entry)),
    .dcd.command.param  = DCD_COMMAND_WRITE_PARAM,
};


Environment config
nand_parts="512k(barebox)ro,512k(bareboxenv),4M(kernel),120M(root)"


board_init.c
devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self0");
devfs_add_partition("nand0", 0x80000, 0x80000, PARTITION_FIXED, "env0");


seems like the enviroment.c->envfs_load() looks into a wrong memory area.
Is there a Setting i forgot?

- christian




Von:        Marc Reilly <marc@cpdesign.com.au>
An:        barebox@lists.infradead.org,
Kopie:        christian.buettner@rafi.de, Sascha Hauer <s.hauer@pengutronix.de>
Datum:        17.07.2012 00:34
Betreff:        Re: Antwort: Re: Antwort: Re: Antwort: Re: barebox image size
Gesendet von:        Marc Reilly <marc.reilly@gmail.com>




Hi,

> I flashed from 0x0 to 0x7FFFF (image size: 479K).
> I flashed the environment image (image size: 3K) from 0x80000 to 0xFFFFF
Her you write 512k for env

> and changed the config code from barebox/environs/common/config to:
>
> ...
> nand_parts="512k(barebox)ro,768k(bareboxenv),4M(kernel),120M(root)"
And here you say its 786k.

Cheers,
Marc


--=_alternative 0036BF7DC1257A3E_=-- --===============7305287643886488206== 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 --===============7305287643886488206==--