mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Install barebox on target
@ 2011-02-24 13:08 Thomas Mayer
  2011-02-24 16:04 ` Sascha Hauer
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Mayer @ 2011-02-24 13:08 UTC (permalink / raw)
  To: barebox


[-- Attachment #1.1: Type: text/plain, Size: 283 bytes --]

Hi,

i'm working on a project with a Freescale i.MX35 3-Stack board and try
to use barebox as bootloader.
My problem is that i don't know how to install barebox to NAND memory or
better directly to a sd-card.
Is there any documentation about this really basic stuff?

regards
Thomas

[-- Attachment #1.2: Type: text/html, Size: 753 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Install barebox on target
  2011-02-24 13:08 Install barebox on target Thomas Mayer
@ 2011-02-24 16:04 ` Sascha Hauer
  2011-02-25  9:15   ` Thomas Mayer
  0 siblings, 1 reply; 10+ messages in thread
From: Sascha Hauer @ 2011-02-24 16:04 UTC (permalink / raw)
  To: Thomas Mayer; +Cc: barebox

Hi Thomas,

On Thu, Feb 24, 2011 at 02:08:55PM +0100, Thomas Mayer wrote:
> Hi,
> 
> i'm working on a project with a Freescale i.MX35 3-Stack board and try
> to use barebox as bootloader.
> My problem is that i don't know how to install barebox to NAND memory or
> better directly to a sd-card.
> Is there any documentation about this really basic stuff?

According to the schematics the i.MX35 3-stack is without modifying it
only able to boot in external boot mode, that is nand or nor flash.
First step should be starting barebox as a second stage loader from the
existing bootloader. For this the defconfig for the 3stack should
be suitable. If you are using redboot you can use the following (replace
0x100000 with some valid sdram address):

load -r -b 0x100000 barebox.bin
run 0x100000

The same for u-Boot:

tftp 0x80100000 barebox.bin
go 0x80100000

If this works you should check if networking works:

dhcp; tftp barebox.bin /dev/ram0

or, if you use the smc9117 on the debug board:

ethact eth1; dhcp; tftp barebox.bin /dev/ram0

you can then flash barebox to either nand or nor flash:

erase /dev/nor0.barebox; tftp barebox.bin /dev/nor0.barebox

or:

erase /dev/nand0.barebox.bb; tftp barebox.bin /dev/nand0.barebox.bb

I suggest that you first try to flash barebox to the flash that does
not contain your original bootloader (if you haven't got jtag)

For getting a barebox suitable for starting from NAND you should enable
CONFIG_NAND_IMX_BOOT in your config.

The 3stack should be able to work in internal boot mode if TP41/42 on
the personality board are adjusted.

You also might want to apply the boot mode cleanup patch I just posted
which makes it a bit clearer what boot modes are actually supported by
barebox.

Hope that helps,

 Sascha

> 
> regards
> Thomas

> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox


-- 
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 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Install barebox on target
  2011-02-24 16:04 ` Sascha Hauer
@ 2011-02-25  9:15   ` Thomas Mayer
  2011-02-25 15:06     ` Sascha Hauer
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Mayer @ 2011-02-25  9:15 UTC (permalink / raw)
  To: barebox

Hi Sascha,

That's not quite correct. When you use the debug + personality board you
can boot directly from a mmc-card which contains bootloader, kernel and
rootfs without modifications. Only if you use the single personality
board, you have to modify die board a little bit.
Thanks for your short introduction. I tried to run the barebox image
with u-boot and it seems to work. But after I get the following output
barebox stops and do nothing.


MX35 U-Boot > go 0x80100000
## Starting application at 0x80100000 ...
h�

barebox 2011.02.0 (Feb 25 2011 - 09:49:05)

Board: Freescale MX35 3Stack
cfi_probe: cfi_flash base: 0xa0000000 size: 0x04000000
mc13892-i2c@mc13892-i2c0: PMIC ID: 0x000045d0 [Rev: 2.0a]
register_device: already registered eth0


Have you any idea what the problem is?


regards
Thomas


Am 24.02.2011 17:04, schrieb Sascha Hauer:
> Hi Thomas,
>
> On Thu, Feb 24, 2011 at 02:08:55PM +0100, Thomas Mayer wrote:
>   
>> Hi,
>>
>> i'm working on a project with a Freescale i.MX35 3-Stack board and try
>> to use barebox as bootloader.
>> My problem is that i don't know how to install barebox to NAND memory or
>> better directly to a sd-card.
>> Is there any documentation about this really basic stuff?
>>     
> According to the schematics the i.MX35 3-stack is without modifying it
> only able to boot in external boot mode, that is nand or nor flash.
> First step should be starting barebox as a second stage loader from the
> existing bootloader. For this the defconfig for the 3stack should
> be suitable. If you are using redboot you can use the following (replace
> 0x100000 with some valid sdram address):
>
> load -r -b 0x100000 barebox.bin
> run 0x100000
>
> The same for u-Boot:
>
> tftp 0x80100000 barebox.bin
> go 0x80100000
>
> If this works you should check if networking works:
>
> dhcp; tftp barebox.bin /dev/ram0
>
> or, if you use the smc9117 on the debug board:
>
> ethact eth1; dhcp; tftp barebox.bin /dev/ram0
>
> you can then flash barebox to either nand or nor flash:
>
> erase /dev/nor0.barebox; tftp barebox.bin /dev/nor0.barebox
>
> or:
>
> erase /dev/nand0.barebox.bb; tftp barebox.bin /dev/nand0.barebox.bb
>
> I suggest that you first try to flash barebox to the flash that does
> not contain your original bootloader (if you haven't got jtag)
>
> For getting a barebox suitable for starting from NAND you should enable
> CONFIG_NAND_IMX_BOOT in your config.
>
> The 3stack should be able to work in internal boot mode if TP41/42 on
> the personality board are adjusted.
>
> You also might want to apply the boot mode cleanup patch I just posted
> which makes it a bit clearer what boot modes are actually supported by
> barebox.
>
> Hope that helps,
>
>  Sascha
>
>   
>> regards
>> Thomas
>>     
>   
>> _______________________________________________
>> barebox mailing list
>> barebox@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/barebox
>>     
>
>   


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Install barebox on target
  2011-02-25  9:15   ` Thomas Mayer
@ 2011-02-25 15:06     ` Sascha Hauer
  2011-02-25 16:08       ` Thomas Mayer
  0 siblings, 1 reply; 10+ messages in thread
From: Sascha Hauer @ 2011-02-25 15:06 UTC (permalink / raw)
  To: Thomas Mayer; +Cc: barebox

On Fri, Feb 25, 2011 at 10:15:01AM +0100, Thomas Mayer wrote:
> Hi Sascha,
> 
> That's not quite correct. When you use the debug + personality board you
> can boot directly from a mmc-card which contains bootloader, kernel and
> rootfs without modifications. Only if you use the single personality
> board, you have to modify die board a little bit.

Ah, ok. I didn't know that.

> Thanks for your short introduction. I tried to run the barebox image
> with u-boot and it seems to work. But after I get the following output
> barebox stops and do nothing.

That's a bug in the support for multiple network devices. Please pull
the -next branch again, then it should work.

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 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Install barebox on target
  2011-02-25 15:06     ` Sascha Hauer
@ 2011-02-25 16:08       ` Thomas Mayer
  2011-02-28  7:40         ` Sascha Hauer
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Mayer @ 2011-02-25 16:08 UTC (permalink / raw)
  To: barebox

Hi Sasha,

thanks, I will try that.
Today I got our real hardware. It consists of the freescale cpu board, a
custom baseboard with a different display.
With that I was able to start barebox completely. Network works fine,
but I can't access the nand memory, because barebox doesn't find it at
startup. I added all possible nand drivers to barebox, but it still
doesn't work.

Any idea?

--------------------------------------- u-boot output
-----------------------------------------
U-Boot 2009.08 (Jan 13 2010 -
06:24:35)                                                                                                

                                                                                                                                       

CPU:   Freescale i.MX35 at 532
MHz                                                                                                     

Board: MX35 3STACK 2.0
[RST]                                                                                                           

I2C:  
ready                                                                                                                           

DRAM:  128
MB                                                                                                                          

Flash: 64
MB                                                                                                                           

NAND:  Manufacturer      : Samsung
(0xec)                                                                                              

Device Code       :
0xd7                                                                                                               

Cell Technology   :
MLC                                                                                                                

Chip Size         : 4
GiB                                                                                                              

Pages per Block   :
128                                                                                                                

Page Geometry     :
4096+218                                                                                                           

ECC Strength      : 8
bits                                                                                                             

ECC Size          : 512
B                                                                                                              

Data Setup Time   : 20
ns                                                                                                              

Data Hold Time    : 10
ns                                                                                                              

Address Setup Time: 25
ns                                                                                                              

GPMI Sample Delay : 6
ns                                                                                                               

tREA              :
Unknown                                                                                                            

tRLOH             :
Unknown                                                                                                            

tRHOH             :
Unknown                                                                                                            

Description       :
K9LBG08U0D                                                                                                         

Bad block table found at page 524160, version
0x01                                                                                     

Bad block table found at page 524032, version
0x01                                                                                     

2048
MiB                                                                                                                               

In:   
serial                                                                                                                          

Out:  
serial                                                                                                                          

Err:  
serial                                                                                                                          

PMIC@0x08:0x7 is
45d0                                                                                                                  

i.MX35 CPU board version
2.0                                                                                                           

Net:   FEC0
Hit any key to stop autoboot:  0



--------------------------------------- barebox output
------------------------------------------
barebox 2011.02.0 (Feb 25 2011 - 16:35:47)

Board: Freescale MX35 3Stack
No NAND device found!!!
cfi_probe: cfi_flash base: 0xa0000000 size: 0x04000000
mc13892-i2c@mc13892-i2c0: PMIC ID: 0x000045d0 [Rev: 2.0a]
smc911x: no smc911x found on 0xb6000000 (byte_test=0x00f000f0)
imx-ipu-fb@imx-ipu-fb0: i.MX Framebuffer driver
mc13892-i2c@mc13892-i2c0: revision: 0x45d0
i.MX35 PDK CPU board version 1.
Malloc space: 0x86f00000 -> 0x87f00000 (size 16 MB)
Stack space : 0x86ef8000 -> 0x86f00000 (size 32 kB)
Open /dev/env0 No such file or directory
no valid environment found on /dev/env0. Using default environment
running /env/bin/init...



regards
Thomas



Am 25.02.2011 16:06, schrieb Sascha Hauer:
> On Fri, Feb 25, 2011 at 10:15:01AM +0100, Thomas Mayer wrote:
>   
>> Hi Sascha,
>>
>> That's not quite correct. When you use the debug + personality board you
>> can boot directly from a mmc-card which contains bootloader, kernel and
>> rootfs without modifications. Only if you use the single personality
>> board, you have to modify die board a little bit.
>>     
> Ah, ok. I didn't know that.
>
>   
>> Thanks for your short introduction. I tried to run the barebox image
>> with u-boot and it seems to work. But after I get the following output
>> barebox stops and do nothing.
>>     
> That's a bug in the support for multiple network devices. Please pull
> the -next branch again, then it should work.
>
> Sascha
>
>
>   


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Install barebox on target
  2011-02-25 16:08       ` Thomas Mayer
@ 2011-02-28  7:40         ` Sascha Hauer
  2011-02-28  8:09           ` Baruch Siach
  0 siblings, 1 reply; 10+ messages in thread
From: Sascha Hauer @ 2011-02-28  7:40 UTC (permalink / raw)
  To: Thomas Mayer; +Cc: barebox

On Fri, Feb 25, 2011 at 05:08:10PM +0100, Thomas Mayer wrote:
> Hi Sasha,
> 
> thanks, I will try that.
> Today I got our real hardware. It consists of the freescale cpu board, a
> custom baseboard with a different display.
> With that I was able to start barebox completely. Network works fine,
> but I can't access the nand memory, because barebox doesn't find it at
> startup. I added all possible nand drivers to barebox, but it still
> doesn't work.
> 
> Any idea?
> 
> --------------------------------------- u-boot output
> -----------------------------------------
> U-Boot 2009.08 (Jan 13 2010 -
> 
> Page Geometry     :
> 4096+218

This will cause problems. I never had a nand with 4k block size and I
doubt it will work out of the box. I don't know if that's the reason
barebox does not find no nand device at all though.

Sasha

> 
> --------------------------------------- barebox output
> ------------------------------------------
> barebox 2011.02.0 (Feb 25 2011 - 16:35:47)
> 
> Board: Freescale MX35 3Stack
> No NAND device found!!!
> cfi_probe: cfi_flash base: 0xa0000000 size: 0x04000000
> mc13892-i2c@mc13892-i2c0: PMIC ID: 0x000045d0 [Rev: 2.0a]
> smc911x: no smc911x found on 0xb6000000 (byte_test=0x00f000f0)
> imx-ipu-fb@imx-ipu-fb0: i.MX Framebuffer driver
> mc13892-i2c@mc13892-i2c0: revision: 0x45d0
> i.MX35 PDK CPU board version 1.
> Malloc space: 0x86f00000 -> 0x87f00000 (size 16 MB)
> Stack space : 0x86ef8000 -> 0x86f00000 (size 32 kB)
> Open /dev/env0 No such file or directory
> no valid environment found on /dev/env0. Using default environment
> running /env/bin/init...
> 
> 
> 
> regards
> Thomas
> 
> 
> 
> Am 25.02.2011 16:06, schrieb Sascha Hauer:
> > On Fri, Feb 25, 2011 at 10:15:01AM +0100, Thomas Mayer wrote:
> >   
> >> Hi Sascha,
> >>
> >> That's not quite correct. When you use the debug + personality board you
> >> can boot directly from a mmc-card which contains bootloader, kernel and
> >> rootfs without modifications. Only if you use the single personality
> >> board, you have to modify die board a little bit.
> >>     
> > Ah, ok. I didn't know that.
> >
> >   
> >> Thanks for your short introduction. I tried to run the barebox image
> >> with u-boot and it seems to work. But after I get the following output
> >> barebox stops and do nothing.
> >>     
> > That's a bug in the support for multiple network devices. Please pull
> > the -next branch again, then it should work.
> >
> > Sascha
> >
> >
> >   
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
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 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Install barebox on target
  2011-02-28  7:40         ` Sascha Hauer
@ 2011-02-28  8:09           ` Baruch Siach
  2011-02-28  8:19             ` Baruch Siach
  0 siblings, 1 reply; 10+ messages in thread
From: Baruch Siach @ 2011-02-28  8:09 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha, Thomas,

On Mon, Feb 28, 2011 at 08:40:53AM +0100, Sascha Hauer wrote:
> On Fri, Feb 25, 2011 at 05:08:10PM +0100, Thomas Mayer wrote:
> > thanks, I will try that.
> > Today I got our real hardware. It consists of the freescale cpu board, a
> > custom baseboard with a different display.
> > With that I was able to start barebox completely. Network works fine,
> > but I can't access the nand memory, because barebox doesn't find it at
> > startup. I added all possible nand drivers to barebox, but it still
> > doesn't work.
> > 
> > Any idea?
> > 
> > --------------------------------------- u-boot output
> > -----------------------------------------
> > U-Boot 2009.08 (Jan 13 2010 -
> > 
> > Page Geometry     :
> > 4096+218
> 
> This will cause problems. I never had a nand with 4k block size and I
> doubt it will work out of the box. I don't know if that's the reason
> barebox does not find no nand device at all though.

I'm also seeing problems with a 4k page size (+218 OOB) SLC NAND flash of 
Micron on i.MX25. Barebox does identify the flash chip, but can't read it 
correctly.  I'm investigating the issue. So far I've found that the OOB area 
is read as 0x00s instead of 0xffs, even for good blocks. This makes Barebox to 
mark the whole flash as bad blocks.

The Linux kernel, however, seems to work correctly with this flash when 
applying a small fix to use the correct(?) nand_ecclayout.

baruch

> > --------------------------------------- barebox output
> > ------------------------------------------
> > barebox 2011.02.0 (Feb 25 2011 - 16:35:47)
> > 
> > Board: Freescale MX35 3Stack
> > No NAND device found!!!
> > cfi_probe: cfi_flash base: 0xa0000000 size: 0x04000000
> > mc13892-i2c@mc13892-i2c0: PMIC ID: 0x000045d0 [Rev: 2.0a]
> > smc911x: no smc911x found on 0xb6000000 (byte_test=0x00f000f0)
> > imx-ipu-fb@imx-ipu-fb0: i.MX Framebuffer driver
> > mc13892-i2c@mc13892-i2c0: revision: 0x45d0
> > i.MX35 PDK CPU board version 1.
> > Malloc space: 0x86f00000 -> 0x87f00000 (size 16 MB)
> > Stack space : 0x86ef8000 -> 0x86f00000 (size 32 kB)
> > Open /dev/env0 No such file or directory
> > no valid environment found on /dev/env0. Using default environment
> > running /env/bin/init...
> > 
> > 
> > 
> > regards
> > Thomas
> > 
> > 
> > 
> > Am 25.02.2011 16:06, schrieb Sascha Hauer:
> > > On Fri, Feb 25, 2011 at 10:15:01AM +0100, Thomas Mayer wrote:
> > >   
> > >> Hi Sascha,
> > >>
> > >> That's not quite correct. When you use the debug + personality board you
> > >> can boot directly from a mmc-card which contains bootloader, kernel and
> > >> rootfs without modifications. Only if you use the single personality
> > >> board, you have to modify die board a little bit.
> > >>     
> > > Ah, ok. I didn't know that.
> > >
> > >   
> > >> Thanks for your short introduction. I tried to run the barebox image
> > >> with u-boot and it seems to work. But after I get the following output
> > >> barebox stops and do nothing.
> > >>     
> > > That's a bug in the support for multiple network devices. Please pull
> > > the -next branch again, then it should work.
> > >
> > > Sascha

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Install barebox on target
  2011-02-28  8:09           ` Baruch Siach
@ 2011-02-28  8:19             ` Baruch Siach
  2011-03-02 10:17               ` Thomas Mayer
  0 siblings, 1 reply; 10+ messages in thread
From: Baruch Siach @ 2011-02-28  8:19 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha, Thomas,

On Mon, Feb 28, 2011 at 10:09:23AM +0200, Baruch Siach wrote:
> On Mon, Feb 28, 2011 at 08:40:53AM +0100, Sascha Hauer wrote:
> > On Fri, Feb 25, 2011 at 05:08:10PM +0100, Thomas Mayer wrote:
> > > thanks, I will try that.
> > > Today I got our real hardware. It consists of the freescale cpu board, a
> > > custom baseboard with a different display.
> > > With that I was able to start barebox completely. Network works fine,
> > > but I can't access the nand memory, because barebox doesn't find it at
> > > startup. I added all possible nand drivers to barebox, but it still
> > > doesn't work.
> > > 
> > > Any idea?
> > > 
> > > --------------------------------------- u-boot output
> > > -----------------------------------------
> > > U-Boot 2009.08 (Jan 13 2010 -
> > > 
> > > Page Geometry     :
> > > 4096+218
> > 
> > This will cause problems. I never had a nand with 4k block size and I
> > doubt it will work out of the box. I don't know if that's the reason
> > barebox does not find no nand device at all though.
> 
> I'm also seeing problems with a 4k page size (+218 OOB) SLC NAND flash of 
> Micron on i.MX25. Barebox does identify the flash chip, but can't read it 
> correctly.  I'm investigating the issue. So far I've found that the OOB area 
> is read as 0x00s instead of 0xffs, even for good blocks. This makes Barebox to 
> mark the whole flash as bad blocks.
> 
> The Linux kernel, however, seems to work correctly with this flash when 
> applying a small fix to use the correct(?) nand_ecclayout.

I should also add the booting from this NAND with Barebox works perfectly. I 
used the kernel to program Barebox into the flash.

baruch

> > > --------------------------------------- barebox output
> > > ------------------------------------------
> > > barebox 2011.02.0 (Feb 25 2011 - 16:35:47)
> > > 
> > > Board: Freescale MX35 3Stack
> > > No NAND device found!!!
> > > cfi_probe: cfi_flash base: 0xa0000000 size: 0x04000000
> > > mc13892-i2c@mc13892-i2c0: PMIC ID: 0x000045d0 [Rev: 2.0a]
> > > smc911x: no smc911x found on 0xb6000000 (byte_test=0x00f000f0)
> > > imx-ipu-fb@imx-ipu-fb0: i.MX Framebuffer driver
> > > mc13892-i2c@mc13892-i2c0: revision: 0x45d0
> > > i.MX35 PDK CPU board version 1.
> > > Malloc space: 0x86f00000 -> 0x87f00000 (size 16 MB)
> > > Stack space : 0x86ef8000 -> 0x86f00000 (size 32 kB)
> > > Open /dev/env0 No such file or directory
> > > no valid environment found on /dev/env0. Using default environment
> > > running /env/bin/init...
> > > 
> > > 
> > > 
> > > regards
> > > Thomas
> > > 
> > > 
> > > 
> > > Am 25.02.2011 16:06, schrieb Sascha Hauer:
> > > > On Fri, Feb 25, 2011 at 10:15:01AM +0100, Thomas Mayer wrote:
> > > >   
> > > >> Hi Sascha,
> > > >>
> > > >> That's not quite correct. When you use the debug + personality board you
> > > >> can boot directly from a mmc-card which contains bootloader, kernel and
> > > >> rootfs without modifications. Only if you use the single personality
> > > >> board, you have to modify die board a little bit.
> > > >>     
> > > > Ah, ok. I didn't know that.
> > > >
> > > >   
> > > >> Thanks for your short introduction. I tried to run the barebox image
> > > >> with u-boot and it seems to work. But after I get the following output
> > > >> barebox stops and do nothing.
> > > >>     
> > > > That's a bug in the support for multiple network devices. Please pull
> > > > the -next branch again, then it should work.
> > > >
> > > > Sascha

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Install barebox on target
  2011-02-28  8:19             ` Baruch Siach
@ 2011-03-02 10:17               ` Thomas Mayer
  2011-03-02 10:39                 ` Baruch Siach
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Mayer @ 2011-03-02 10:17 UTC (permalink / raw)
  To: barebox

Hi,
good know, I will try that.

regards
Thomas


Am 28.02.2011 09:19, schrieb Baruch Siach:
> Hi Sascha, Thomas,
>
> On Mon, Feb 28, 2011 at 10:09:23AM +0200, Baruch Siach wrote:
>   
>> On Mon, Feb 28, 2011 at 08:40:53AM +0100, Sascha Hauer wrote:
>>     
>>> On Fri, Feb 25, 2011 at 05:08:10PM +0100, Thomas Mayer wrote:
>>>       
>>>> thanks, I will try that.
>>>> Today I got our real hardware. It consists of the freescale cpu board, a
>>>> custom baseboard with a different display.
>>>> With that I was able to start barebox completely. Network works fine,
>>>> but I can't access the nand memory, because barebox doesn't find it at
>>>> startup. I added all possible nand drivers to barebox, but it still
>>>> doesn't work.
>>>>
>>>> Any idea?
>>>>
>>>> --------------------------------------- u-boot output
>>>> -----------------------------------------
>>>> U-Boot 2009.08 (Jan 13 2010 -
>>>>
>>>> Page Geometry     :
>>>> 4096+218
>>>>         
>>> This will cause problems. I never had a nand with 4k block size and I
>>> doubt it will work out of the box. I don't know if that's the reason
>>> barebox does not find no nand device at all though.
>>>       
>> I'm also seeing problems with a 4k page size (+218 OOB) SLC NAND flash of 
>> Micron on i.MX25. Barebox does identify the flash chip, but can't read it 
>> correctly.  I'm investigating the issue. So far I've found that the OOB area 
>> is read as 0x00s instead of 0xffs, even for good blocks. This makes Barebox to 
>> mark the whole flash as bad blocks.
>>
>> The Linux kernel, however, seems to work correctly with this flash when 
>> applying a small fix to use the correct(?) nand_ecclayout.
>>     
> I should also add the booting from this NAND with Barebox works perfectly. I 
> used the kernel to program Barebox into the flash.
>
> baruch
>
>   
>>>> --------------------------------------- barebox output
>>>> ------------------------------------------
>>>> barebox 2011.02.0 (Feb 25 2011 - 16:35:47)
>>>>
>>>> Board: Freescale MX35 3Stack
>>>> No NAND device found!!!
>>>> cfi_probe: cfi_flash base: 0xa0000000 size: 0x04000000
>>>> mc13892-i2c@mc13892-i2c0: PMIC ID: 0x000045d0 [Rev: 2.0a]
>>>> smc911x: no smc911x found on 0xb6000000 (byte_test=0x00f000f0)
>>>> imx-ipu-fb@imx-ipu-fb0: i.MX Framebuffer driver
>>>> mc13892-i2c@mc13892-i2c0: revision: 0x45d0
>>>> i.MX35 PDK CPU board version 1.
>>>> Malloc space: 0x86f00000 -> 0x87f00000 (size 16 MB)
>>>> Stack space : 0x86ef8000 -> 0x86f00000 (size 32 kB)
>>>> Open /dev/env0 No such file or directory
>>>> no valid environment found on /dev/env0. Using default environment
>>>> running /env/bin/init...
>>>>
>>>>
>>>>
>>>> regards
>>>> Thomas
>>>>
>>>>
>>>>
>>>> Am 25.02.2011 16:06, schrieb Sascha Hauer:
>>>>         
>>>>> On Fri, Feb 25, 2011 at 10:15:01AM +0100, Thomas Mayer wrote:
>>>>>   
>>>>>           
>>>>>> Hi Sascha,
>>>>>>
>>>>>> That's not quite correct. When you use the debug + personality board you
>>>>>> can boot directly from a mmc-card which contains bootloader, kernel and
>>>>>> rootfs without modifications. Only if you use the single personality
>>>>>> board, you have to modify die board a little bit.
>>>>>>     
>>>>>>             
>>>>> Ah, ok. I didn't know that.
>>>>>
>>>>>   
>>>>>           
>>>>>> Thanks for your short introduction. I tried to run the barebox image
>>>>>> with u-boot and it seems to work. But after I get the following output
>>>>>> barebox stops and do nothing.
>>>>>>     
>>>>>>             
>>>>> That's a bug in the support for multiple network devices. Please pull
>>>>> the -next branch again, then it should work.
>>>>>
>>>>> Sascha
>>>>>           
>   


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Install barebox on target
  2011-03-02 10:17               ` Thomas Mayer
@ 2011-03-02 10:39                 ` Baruch Siach
  0 siblings, 0 replies; 10+ messages in thread
From: Baruch Siach @ 2011-03-02 10:39 UTC (permalink / raw)
  To: Thomas Mayer; +Cc: barebox

Hi Thomas,

On Wed, Mar 02, 2011 at 11:17:45AM +0100, Thomas Mayer wrote:
> good know, I will try that.

Further investigation shows that the Linux kernel doesn't read (or write) the 
OOB area correctly. This is not a problem if all you do is program the barebox 
image into the NAND flash. However, since the kernel uses the OOB area to 
identify the BBT (bad block table), the BBT gets corrupted. When that happens, 
the mxc_nand .probe fails at nand_scan_tail().

I suspect that the nandv2_hw_eccoob_largepage is wrong for 4K+218B. I'm still 
investigating.

baruch

> Am 28.02.2011 09:19, schrieb Baruch Siach:
> > Hi Sascha, Thomas,
> >
> > On Mon, Feb 28, 2011 at 10:09:23AM +0200, Baruch Siach wrote:
> >   
> >> On Mon, Feb 28, 2011 at 08:40:53AM +0100, Sascha Hauer wrote:
> >>     
> >>> On Fri, Feb 25, 2011 at 05:08:10PM +0100, Thomas Mayer wrote:
> >>>       
> >>>> thanks, I will try that.
> >>>> Today I got our real hardware. It consists of the freescale cpu board, a
> >>>> custom baseboard with a different display.
> >>>> With that I was able to start barebox completely. Network works fine,
> >>>> but I can't access the nand memory, because barebox doesn't find it at
> >>>> startup. I added all possible nand drivers to barebox, but it still
> >>>> doesn't work.
> >>>>
> >>>> Any idea?
> >>>>
> >>>> --------------------------------------- u-boot output
> >>>> -----------------------------------------
> >>>> U-Boot 2009.08 (Jan 13 2010 -
> >>>>
> >>>> Page Geometry     :
> >>>> 4096+218
> >>>>         
> >>> This will cause problems. I never had a nand with 4k block size and I
> >>> doubt it will work out of the box. I don't know if that's the reason
> >>> barebox does not find no nand device at all though.
> >>>       
> >> I'm also seeing problems with a 4k page size (+218 OOB) SLC NAND flash of 
> >> Micron on i.MX25. Barebox does identify the flash chip, but can't read it 
> >> correctly.  I'm investigating the issue. So far I've found that the OOB area 
> >> is read as 0x00s instead of 0xffs, even for good blocks. This makes Barebox to 
> >> mark the whole flash as bad blocks.
> >>
> >> The Linux kernel, however, seems to work correctly with this flash when 
> >> applying a small fix to use the correct(?) nand_ecclayout.
> >>     
> > I should also add the booting from this NAND with Barebox works perfectly. I 
> > used the kernel to program Barebox into the flash.
> >
> > baruch
> >
> >   
> >>>> --------------------------------------- barebox output
> >>>> ------------------------------------------
> >>>> barebox 2011.02.0 (Feb 25 2011 - 16:35:47)
> >>>>
> >>>> Board: Freescale MX35 3Stack
> >>>> No NAND device found!!!
> >>>> cfi_probe: cfi_flash base: 0xa0000000 size: 0x04000000
> >>>> mc13892-i2c@mc13892-i2c0: PMIC ID: 0x000045d0 [Rev: 2.0a]
> >>>> smc911x: no smc911x found on 0xb6000000 (byte_test=0x00f000f0)
> >>>> imx-ipu-fb@imx-ipu-fb0: i.MX Framebuffer driver
> >>>> mc13892-i2c@mc13892-i2c0: revision: 0x45d0
> >>>> i.MX35 PDK CPU board version 1.
> >>>> Malloc space: 0x86f00000 -> 0x87f00000 (size 16 MB)
> >>>> Stack space : 0x86ef8000 -> 0x86f00000 (size 32 kB)
> >>>> Open /dev/env0 No such file or directory
> >>>> no valid environment found on /dev/env0. Using default environment
> >>>> running /env/bin/init...
> >>>>
> >>>>
> >>>>
> >>>> regards
> >>>> Thomas
> >>>>
> >>>>
> >>>>
> >>>> Am 25.02.2011 16:06, schrieb Sascha Hauer:
> >>>>         
> >>>>> On Fri, Feb 25, 2011 at 10:15:01AM +0100, Thomas Mayer wrote:
> >>>>>   
> >>>>>           
> >>>>>> Hi Sascha,
> >>>>>>
> >>>>>> That's not quite correct. When you use the debug + personality board you
> >>>>>> can boot directly from a mmc-card which contains bootloader, kernel and
> >>>>>> rootfs without modifications. Only if you use the single personality
> >>>>>> board, you have to modify die board a little bit.
> >>>>>>     
> >>>>>>             
> >>>>> Ah, ok. I didn't know that.
> >>>>>
> >>>>>   
> >>>>>           
> >>>>>> Thanks for your short introduction. I tried to run the barebox image
> >>>>>> with u-boot and it seems to work. But after I get the following output
> >>>>>> barebox stops and do nothing.
> >>>>>>     
> >>>>>>             
> >>>>> That's a bug in the support for multiple network devices. Please pull
> >>>>> the -next branch again, then it should work.
> >>>>>
> >>>>> Sascha
> >>>>>           

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-03-02 10:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-24 13:08 Install barebox on target Thomas Mayer
2011-02-24 16:04 ` Sascha Hauer
2011-02-25  9:15   ` Thomas Mayer
2011-02-25 15:06     ` Sascha Hauer
2011-02-25 16:08       ` Thomas Mayer
2011-02-28  7:40         ` Sascha Hauer
2011-02-28  8:09           ` Baruch Siach
2011-02-28  8:19             ` Baruch Siach
2011-03-02 10:17               ` Thomas Mayer
2011-03-02 10:39                 ` Baruch Siach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox