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 1SqmJI-0004Cs-Fa for barebox@lists.infradead.org; Mon, 16 Jul 2012 14:30:31 +0000 In-Reply-To: <50042475.3000604@cmotion.eu> References: <20120716085418.GG30009@pengutronix.de> <20120716092101.GI30009@pengutronix.de> <20120716103054.GJ30009@pengutronix.de> <50041B84.9080707@cmotion.eu> <50042475.3000604@cmotion.eu> MIME-Version: 1.0 Message-ID: From: christian.buettner@rafi.de Date: Mon, 16 Jul 2012 16:30:01 +0200 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============3217078007420192340==" 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: Antwort: Re: barebox image size To: Christian Kapeller Cc: barebox@lists.infradead.org Dies ist eine mehrteilige Nachricht im MIME-Format. --===============3217078007420192340== Content-Type: multipart/alternative; boundary="=_alternative 004FA722C1257A3D_=" Dies ist eine mehrteilige Nachricht im MIME-Format. --=_alternative 004FA722C1257A3D_= Content-Type: text/plain; charset="US-ASCII" ahh thank you.. i try that. Von: Christian Kapeller An: christian.buettner@rafi.de, Kopie: barebox@lists.infradead.org, Sascha Hauer Datum: 16.07.2012 16:26 Betreff: Re: Antwort: Re: Antwort: Re: Antwort: Re: Antwort: Re: barebox image size On 07/16/2012 03:52 PM, christian.buettner@rafi.de wrote: > Thx for the hint. > What i don't understand is that barebox boots from nand but the > environement can't.. Good point. In any case the driver isn't able to recognize your nand device. I see from you supplied code snipplets, that your barebox is at least two weeks old. Maybe you use the upstream tree, as maybe there are already fixes for imx53 nand flash. Also you may want to activate mtd debugging: #define CONFIG_MTD_DEBUG #define CONFIG_MTD_DEBUG_VERBOSE 3 for example to your include/linux/mtd/mtd.h file. (Those are config settings, but they don't appear in any Kconfig file, hence supply them manually) good luck. > > >> I flashed from 0x0 to 0x7FFFF (image size: 479K). >> I flashed the environment image (image size: 3K) from 0x80000 to 0xFFFFF >> and changed the config code from barebox/environs/common/config to: >> >> ... >> nand_parts="512k(barebox)ro,768k(bareboxenv),4M(kernel),120M(root)" >> ... >> >> Barebox can boot now but the startup log says: >> barebox 2012.03.0-dirty (Jul 16 2012 - 09:01:01) >> >> Board: i.MX53 >> eth@eth0: got MAC address from EEPROM: ********************* >> nand_get_flash_type: second ID read did not match ef,ef against c0,c0 >> No NAND device found (-19)! >> Malloc space: 0x7df00000 -> 0x7fefffff (size 32 MB) >> Stack space : 0x7def8000 -> 0x7df00000 (size 32 kB) >> Open /dev/env0 No such file or directory >> running /env/bin/init... >> not found >> barebox:/ >> >> How can i get the environment loaded? > > Normally you would issue 'saveenv' which writes the environment to the > environment partition. On subsequent boots the environment will be loaded. > > But the flash device on your board isn't detected by barebox, so you > will have to fix the detection first. > >> nand_get_flash_type: second ID read did not match ef,ef against c0,c0 > > This line suggests, that the nand flash isn't working property. The line > is generated in drivers/mtd/nand/nand_base.c, after reading manufacturer > id and chip id two times, and checking them for equality. > > Not only does your board different values for manufacturer and flash id > on first and second read, but they are also the same. manuf id=ef and > chip id=ef isn't plausible. Maybe you should check your hardware. > > Regards > Christian > -- Christian Kapeller cmotion GmbH Kriehubergasse 16 1050 Wien / Austria http://www.cmotion.eu christian.kapeller@cmotion.eu Phone: +43 1 789 1096 38 --=_alternative 004FA722C1257A3D_= Content-Type: text/html; charset="US-ASCII" ahh thank you.. i try that.



Von:        Christian Kapeller <christian.kapeller@cmotion.eu>
An:        christian.buettner@rafi.de,
Kopie:        barebox@lists.infradead.org, Sascha Hauer <s.hauer@pengutronix.de>
Datum:        16.07.2012 16:26
Betreff:        Re: Antwort: Re: Antwort: Re: Antwort: Re: Antwort: Re: barebox image size




On 07/16/2012 03:52 PM, christian.buettner@rafi.de wrote:
> Thx for the hint.
> What i don't understand is that barebox boots from nand but the
> environement can't..

Good point. In any case the driver isn't able to recognize your nand
device. I see from you supplied code snipplets, that your barebox is
at least two weeks old. Maybe you use the upstream tree, as maybe there
are already fixes for imx53 nand flash.

Also you may want to activate mtd debugging:

#define CONFIG_MTD_DEBUG
#define CONFIG_MTD_DEBUG_VERBOSE 3

for example to  your include/linux/mtd/mtd.h file. (Those are config
settings, but they don't appear in any Kconfig file, hence supply them
manually)

good luck.

>
>
>> I flashed from 0x0 to 0x7FFFF (image size: 479K).
>> I flashed the environment image (image size: 3K) from 0x80000 to 0xFFFFF
>> and changed the config code from barebox/environs/common/config to:
>>
>> ...
>> nand_parts="512k(barebox)ro,768k(bareboxenv),4M(kernel),120M(root)"
>> ...
>>
>> Barebox can boot now but the startup log says:
>> barebox 2012.03.0-dirty (Jul 16 2012 - 09:01:01)
>>
>> Board: i.MX53
>> eth@eth0: got MAC address from EEPROM: *********************
>> nand_get_flash_type: second ID read did not match ef,ef against c0,c0
>> No NAND device found (-19)!
>> Malloc space: 0x7df00000 -> 0x7fefffff (size 32 MB)
>> Stack space : 0x7def8000 -> 0x7df00000 (size 32 kB)
>> Open /dev/env0 No such file or directory
>> running /env/bin/init...
>> not found
>> barebox:/
>>
>> How can i get the environment loaded?
>
> Normally you would issue 'saveenv' which writes the environment to the
> environment partition. On subsequent boots the environment will be loaded.
>
> But the flash device on your board isn't detected by barebox, so you
> will have to fix the detection first.
>
>> nand_get_flash_type: second ID read did not match ef,ef against c0,c0
>
> This line suggests, that the nand flash isn't working property. The line
> is generated in drivers/mtd/nand/nand_base.c, after reading manufacturer
> id and chip id two times, and checking them for equality.
>
> Not only does your board different values for manufacturer and flash id
> on first and second read, but they are also the same. manuf id=ef and
> chip id=ef isn't plausible. Maybe you should check your hardware.
>
> Regards
> Christian
>


--
Christian Kapeller
cmotion GmbH
Kriehubergasse 16
1050 Wien / Austria
http://www.cmotion.eu

christian.kapeller@cmotion.eu
Phone: +43 1 789 1096 38



--=_alternative 004FA722C1257A3D_=-- --===============3217078007420192340== 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 --===============3217078007420192340==--