mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* More Mini2440 questions...
@ 2011-04-04 11:02 Zoltán Kócsi
  2011-04-04 11:13 ` Juergen Beisert
  0 siblings, 1 reply; 7+ messages in thread
From: Zoltán Kócsi @ 2011-04-04 11:02 UTC (permalink / raw)
  To: barebox

Thanks for all the answers for my previous questions!

The 'next' branch indeed boots from the NAND FLASH like a charm.

What I'm looking for now is a crash-course, or at least a pointer to
some web-based one, on barebox itself, from the usage point of view. I
created the docs and read the User's Manual, but I'm none the wiser. 

How do I boot a kernel from FLASH or via TFTP? I figured that I
can set the Ethernet MAC address by eth0.ethaddr=xx:xx:xx:xx:xx:xx
(although I don't know if that actually changes the MAC) but how can I
save that so that next time I reset the board it is there? 

Same with other environment variables, such as bootargs. The command
'saveenv' says that it saved the environment. According to its docs, it
saved it in /dev/env0. According the the docs of loadenv, that
command should load the saved environment, but I could not get any
of my changes back.

Any help regarding to how to use barebox would be most welcome.

Thanks,

Best Regards,

Zoltan


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

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

* Re: More Mini2440 questions...
  2011-04-04 11:02 More Mini2440 questions Zoltán Kócsi
@ 2011-04-04 11:13 ` Juergen Beisert
  2011-04-04 12:13   ` Zoltán Kócsi
  0 siblings, 1 reply; 7+ messages in thread
From: Juergen Beisert @ 2011-04-04 11:13 UTC (permalink / raw)
  To: Zoltán Kócsi; +Cc: barebox

Hi Zoltán,

Zoltán Kócsi wrote:
> Thanks for all the answers for my previous questions!
>
> The 'next' branch indeed boots from the NAND FLASH like a charm.

\o/

Just for my list of tested min2440 variants: What type of SDRAMs and NAND is 
your system using? 

> What I'm looking for now is a crash-course, or at least a pointer to
> some web-based one, on barebox itself, from the usage point of view. I
> created the docs and read the User's Manual, but I'm none the wiser.

Authors of documentation are always welcome. But they are rare :-(

> How do I boot a kernel from FLASH or via TFTP? I figured that I
> can set the Ethernet MAC address by eth0.ethaddr=xx:xx:xx:xx:xx:xx
> (although I don't know if that actually changes the MAC) but how can I
> save that so that next time I reset the board it is there?

Take a look into the generic environment in "defaultenv/bin/". These scripts 
are used when the system comes up. They are using the "/env/config" for 
parameterization. Maybe these file will help you to understand how it works.

> Same with other environment variables, such as bootargs. The command
> 'saveenv' says that it saved the environment. According to its docs, it
> saved it in /dev/env0. According the the docs of loadenv, that
> command should load the saved environment, but I could not get any
> of my changes back.

So, the changes in your environment are lost after reboot? Do you see any kind 
of error message (like CRC sum errors)? when barebox comes up after reset and 
tries to load the saved environment?

jbe

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | Phone: +49-8766-939 228     |
Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |

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

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

* Re: More Mini2440 questions...
  2011-04-04 11:13 ` Juergen Beisert
@ 2011-04-04 12:13   ` Zoltán Kócsi
  2011-04-04 12:26     ` Juergen Beisert
  0 siblings, 1 reply; 7+ messages in thread
From: Zoltán Kócsi @ 2011-04-04 12:13 UTC (permalink / raw)
  To: Juergen Beisert; +Cc: barebox

On Mon, 4 Apr 2011 13:13:31 +0200
Juergen Beisert <jbe@pengutronix.de> wrote:

> Hi Zoltán,
> 
> Zoltán Kócsi wrote:
> > Thanks for all the answers for my previous questions!
> >
> > The 'next' branch indeed boots from the NAND FLASH like a charm.
> 
> \o/
> 
> Just for my list of tested min2440 variants: What type of SDRAMs and
> NAND is your system using? 

The SDRAM is Micron 48LC16M16A2-75, the NAND is Samsung K9F1G08U0B.

Actually, taking a look at the RAM datasheet of the reveals that with a
3 clock RAS->CAS latency the chip can can merrily work with a 133MHz
bus clock, so the S3C's FCLK could be boosted up to 532MHz. A
30% speed increase is not something to sneeze on...

>[...]
>
> "/env/config" for parameterization. Maybe these file will help you to
> understand how it works.

I'll try my bestto grok them :-)

> So, the changes in your environment are lost after reboot? 

Yes.

> Do you see any kind of error message (like CRC sum errors)? when
> barebox comes up after reset and tries to load the saved environment?

No. Here's what goes on, with unimportant stuff deleted:

mini2440:/ printenv
locals:
machine=mini2440
[...]
nfsroot=:/path/to/nfs/root
[...]
globals:
PATH=/env/bin

mini2440:/ nfsroot=/some/other/root
mini2440:/ PATH=$PATH:/some/location
mini2440:/ printenv
locals:
[...]
nfsroot=/some/other/root
[...]
globals:
PATH=/env/bin:/some/location

mini2440:/ saveenv
saving environment

mini2440:/ reset


barebox 2011.03.0-00081-g6402171 (Apr  3 2011 - 11:12:11)

Board: Mini 2440
registered netconsole as cs1
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
dm9000 i/o: 0x20000300, id: 0x90000a46 
eth@eth0: got MAC address from EEPROM: 00:00:00:00:00:00
refclk:    12000 kHz
mpll:     405000 kHz
upll:      48000 kHz
fclk:     405000 kHz
hclk:     101250 kHz
pclk:      50625 kHz
SDRAM1:   CL2@101MHz
Malloc space: 0x33a00000 -> 0x33e00000 (size  4 MB)
Stack space : 0x339f8000 -> 0x33a00000 (size 32 kB)
running /env/bin/init...

Hit any key to stop autoboot:  3

type update_kernel [<imagename>] to update kernel into flash
type update_root [<imagename>] to update rootfs into flash

mini2440:/ printenv
locals:
[...]
nfsroot=:/path/to/nfs/root
[...]
globals:
PATH=/env/bin
mini2440:/ 

No error message, nothing. 

Zoltan

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

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

* Re: More Mini2440 questions...
  2011-04-04 12:13   ` Zoltán Kócsi
@ 2011-04-04 12:26     ` Juergen Beisert
  2011-04-04 12:52       ` Marc Kleine-Budde
  2011-04-05  3:07       ` Zoltán Kócsi
  0 siblings, 2 replies; 7+ messages in thread
From: Juergen Beisert @ 2011-04-04 12:26 UTC (permalink / raw)
  To: Zoltán Kócsi; +Cc: barebox

Hi Zoltán,

Zoltán Kócsi wrote:
> On Mon, 4 Apr 2011 13:13:31 +0200
>
> Juergen Beisert <jbe@pengutronix.de> wrote:
> > Hi Zoltán,
> >
> > Zoltán Kócsi wrote:
> > > Thanks for all the answers for my previous questions!
> > >
> > > The 'next' branch indeed boots from the NAND FLASH like a charm.
> >
> > \o/
> >
> > Just for my list of tested min2440 variants: What type of SDRAMs and
> > NAND is your system using?
>
> The SDRAM is Micron 48LC16M16A2-75, the NAND is Samsung K9F1G08U0B.
>
> Actually, taking a look at the RAM datasheet of the reveals that with a
> 3 clock RAS->CAS latency the chip can can merrily work with a 133MHz
> bus clock, so the S3C's FCLK could be boosted up to 532MHz. A
> 30% speed increase is not something to sneeze on...

You can try. But when I read the datasheet, most of the time they only talk 
about 400 MHz max. CPU clock, and never about 533 MHz any more.

BTW: The average data throughput of a SDRAM running at 133 MHz @ CL3 is lower 
than of a SDRAM running at 100 MHz @ CL2. The CL3 hurts more than you will 
win with the increased clock.
 
> >[...]
> >
> > "/env/config" for parameterization. Maybe these file will help you to
> > understand how it works.
>
> I'll try my bestto grok them :-)
>
> > So, the changes in your environment are lost after reboot?
>
> Yes.
>
> > Do you see any kind of error message (like CRC sum errors)? when
> > barebox comes up after reset and tries to load the saved environment?
>
> No. Here's what goes on, with unimportant stuff deleted:
>
> mini2440:/ printenv
> locals:
> machine=mini2440
> [...]
> nfsroot=:/path/to/nfs/root
> [...]
> globals:
> PATH=/env/bin
>
> mini2440:/ nfsroot=/some/other/root
> mini2440:/ PATH=$PATH:/some/location
> mini2440:/ printenv
> locals:
> [...]
> nfsroot=/some/other/root
> [...]
> globals:
> PATH=/env/bin:/some/location
>
> mini2440:/ saveenv
> saving environment

Ahh, no I see the problem: You did not change anything in the environment. You 
are using barebox, not u-boot!

Try to edit the /env/config file at your mini2440 instead:

mini2440:/ edit /env/config
mini2440:/ saveenv

Think in scripts now, not in environment variables any more.

Regards,
Juergen

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | Phone: +49-8766-939 228     |
Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |

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

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

* Re: More Mini2440 questions...
  2011-04-04 12:26     ` Juergen Beisert
@ 2011-04-04 12:52       ` Marc Kleine-Budde
  2011-04-05  3:09         ` Zoltán Kócsi
  2011-04-05  3:07       ` Zoltán Kócsi
  1 sibling, 1 reply; 7+ messages in thread
From: Marc Kleine-Budde @ 2011-04-04 12:52 UTC (permalink / raw)
  To: Juergen Beisert; +Cc: barebox


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

On 04/04/2011 02:26 PM, Juergen Beisert wrote:

> mini2440:/ edit /env/config

exit+save with Ctrl+d
just exit with Ctrl+c

> mini2440:/ saveenv

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 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] 7+ messages in thread

* Re: More Mini2440 questions...
  2011-04-04 12:26     ` Juergen Beisert
  2011-04-04 12:52       ` Marc Kleine-Budde
@ 2011-04-05  3:07       ` Zoltán Kócsi
  1 sibling, 0 replies; 7+ messages in thread
From: Zoltán Kócsi @ 2011-04-05  3:07 UTC (permalink / raw)
  To: Juergen Beisert; +Cc: barebox

Hi Jürgen,

> You can try. But when I read the datasheet, most of the time they
> only talk about 400 MHz max. CPU clock, and never about 533 MHz any
> more.

That's actually a worry. I checked the manual and it indeed explicitely
specifies 400MHz. Damn.

> Ahh, no I see the problem: You did not change anything in the
> environment. You are using barebox, not u-boot!
> 
> Try to edit the /env/config file at your mini2440 instead:
> 
> mini2440:/ edit /env/config
> mini2440:/ saveenv
> 
> Think in scripts now, not in environment variables any more.

Thanks!!!

Regards,

Zoltan

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

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

* Re: More Mini2440 questions...
  2011-04-04 12:52       ` Marc Kleine-Budde
@ 2011-04-05  3:09         ` Zoltán Kócsi
  0 siblings, 0 replies; 7+ messages in thread
From: Zoltán Kócsi @ 2011-04-05  3:09 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: barebox

Hi Marc,

> > mini2440:/ edit /env/config
> 
> exit+save with Ctrl+d
> just exit with Ctrl+c

Very useful info :-)

Thanks a lot,

Zoltan

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

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

end of thread, other threads:[~2011-04-05  3:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-04 11:02 More Mini2440 questions Zoltán Kócsi
2011-04-04 11:13 ` Juergen Beisert
2011-04-04 12:13   ` Zoltán Kócsi
2011-04-04 12:26     ` Juergen Beisert
2011-04-04 12:52       ` Marc Kleine-Budde
2011-04-05  3:09         ` Zoltán Kócsi
2011-04-05  3:07       ` Zoltán Kócsi

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