mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* testing barebox on calao sbc35-a9260 board
@ 2010-06-25  9:31 Belisko Marek
  2010-06-28  8:04 ` Sascha Hauer
  0 siblings, 1 reply; 11+ messages in thread
From: Belisko Marek @ 2010-06-25  9:31 UTC (permalink / raw)
  To: barebox

Hi,

I have a calao board sbc35-a9260 with u-boot pre-installed on it.
I would like to try barebox running on that board (also make some development).
I build at91sam9260ek_defconfig to try it out. I became to situation
that I don't know how to load image to board :)

I try via tftp but u-boot automatically try to boot it and I got some
error about magic number.
I think about possibility just download binary to some RAM address and
then use go command in u-boot
to test if barebox binary will work.

There exist some how-to or example how to do this?

Thanks in advance,

Marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com

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

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

* Re: testing barebox on calao sbc35-a9260 board
  2010-06-25  9:31 testing barebox on calao sbc35-a9260 board Belisko Marek
@ 2010-06-28  8:04 ` Sascha Hauer
  2010-06-28  8:32   ` Baruch Siach
  2010-06-28  9:08   ` Belisko Marek
  0 siblings, 2 replies; 11+ messages in thread
From: Sascha Hauer @ 2010-06-28  8:04 UTC (permalink / raw)
  To: Belisko Marek; +Cc: barebox

Hi Marek,

On Fri, Jun 25, 2010 at 11:31:49AM +0200, Belisko Marek wrote:
> Hi,
> 
> I have a calao board sbc35-a9260 with u-boot pre-installed on it.
> I would like to try barebox running on that board (also make some development).
> I build at91sam9260ek_defconfig to try it out. I became to situation
> that I don't know how to load image to board :)
> 
> I try via tftp but u-boot automatically try to boot it and I got some
> error about magic number.
> I think about possibility just download binary to some RAM address and
> then use go command in u-boot
> to test if barebox binary will work.
> 
> There exist some how-to or example how to do this?

It's perfectly fine to start barebox from U-Boot with the 'go' command.
Try 'setenv autostart no' in U-Boot to stop U-Boot from autostarting
images.

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] 11+ messages in thread

* Re: testing barebox on calao sbc35-a9260 board
  2010-06-28  8:04 ` Sascha Hauer
@ 2010-06-28  8:32   ` Baruch Siach
  2010-06-30  7:02     ` Sascha Hauer
  2010-06-28  9:08   ` Belisko Marek
  1 sibling, 1 reply; 11+ messages in thread
From: Baruch Siach @ 2010-06-28  8:32 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha,

On Mon, Jun 28, 2010 at 10:04:42AM +0200, Sascha Hauer wrote:
> On Fri, Jun 25, 2010 at 11:31:49AM +0200, Belisko Marek wrote:
> > I have a calao board sbc35-a9260 with u-boot pre-installed on it.
> > I would like to try barebox running on that board (also make some development).
> > I build at91sam9260ek_defconfig to try it out. I became to situation
> > that I don't know how to load image to board :)
> > 
> > I try via tftp but u-boot automatically try to boot it and I got some
> > error about magic number.
> > I think about possibility just download binary to some RAM address and
> > then use go command in u-boot
> > to test if barebox binary will work.
> > 
> > There exist some how-to or example how to do this?
> 
> It's perfectly fine to start barebox from U-Boot with the 'go' command.
> Try 'setenv autostart no' in U-Boot to stop U-Boot from autostarting
> images.

Is there a way to do the same on Barebox? Currently 'go barebox.bin' in ramfs 
returns -EINVAL from memmap.

baruch

-- 
                                                     ~. .~   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] 11+ messages in thread

* Re: testing barebox on calao sbc35-a9260 board
  2010-06-28  8:04 ` Sascha Hauer
  2010-06-28  8:32   ` Baruch Siach
@ 2010-06-28  9:08   ` Belisko Marek
  2010-06-28  9:17     ` Eric Bénard
  2010-06-30  7:03     ` Sascha Hauer
  1 sibling, 2 replies; 11+ messages in thread
From: Belisko Marek @ 2010-06-28  9:08 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha,

On Mon, Jun 28, 2010 at 10:04 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> Hi Marek,
>
> On Fri, Jun 25, 2010 at 11:31:49AM +0200, Belisko Marek wrote:
>> Hi,
>>
>> I have a calao board sbc35-a9260 with u-boot pre-installed on it.
>> I would like to try barebox running on that board (also make some development).
>> I build at91sam9260ek_defconfig to try it out. I became to situation
>> that I don't know how to load image to board :)
>>
>> I try via tftp but u-boot automatically try to boot it and I got some
>> error about magic number.
>> I think about possibility just download binary to some RAM address and
>> then use go command in u-boot
>> to test if barebox binary will work.
>>
>> There exist some how-to or example how to do this?
>
> It's perfectly fine to start barebox from U-Boot with the 'go' command.
> Try 'setenv autostart no' in U-Boot to stop U-Boot from autostarting
> images.

I disable autostart and download barebox image to 0x8000 with
tftp 0x8000 barebox.bin and then jut go 0x8000 ended with:
## Starting application at 0x00008000 ...

Same I got when load latest compiled u-boot binary.

For compilation I used Codesourcery eabi toolchain arm-2009q3
with at91sam9260ek_defconfig.

Could I somehow check (without JTAG :)) if image is compiled OK
and could start on board?

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

Thanks,

Marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com

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

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

* Re: testing barebox on calao sbc35-a9260 board
  2010-06-28  9:08   ` Belisko Marek
@ 2010-06-28  9:17     ` Eric Bénard
  2010-06-28  9:36       ` Juergen Beisert
  2010-06-30  7:03     ` Sascha Hauer
  1 sibling, 1 reply; 11+ messages in thread
From: Eric Bénard @ 2010-06-28  9:17 UTC (permalink / raw)
  To: Belisko Marek; +Cc: barebox

Hi Marek,

Le 28/06/2010 11:08, Belisko Marek a écrit :
> I disable autostart and download barebox image to 0x8000 with
> tftp 0x8000 barebox.bin and then jut go 0x8000 ended with:
> ## Starting application at 0x00008000 ...
>
if I remember well, on AT91 SDRAM is at 0x20000000 so actually you don't 
seem to load it in SDRAM.
For the binary to execute properly, you should load it at the right 
target address in SDRAM.

Eric

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

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

* Re: testing barebox on calao sbc35-a9260 board
  2010-06-28  9:17     ` Eric Bénard
@ 2010-06-28  9:36       ` Juergen Beisert
  2010-06-28 10:37         ` Belisko Marek
  0 siblings, 1 reply; 11+ messages in thread
From: Juergen Beisert @ 2010-06-28  9:36 UTC (permalink / raw)
  To: barebox

Eric Bénard wrote:
> Hi Marek,
>
> Le 28/06/2010 11:08, Belisko Marek a écrit :
> > I disable autostart and download barebox image to 0x8000 with
> > tftp 0x8000 barebox.bin and then jut go 0x8000 ended with:
> > ## Starting application at 0x00008000 ...
>
> if I remember well, on AT91 SDRAM is at 0x20000000 so actually you don't
> seem to load it in SDRAM.
> For the binary to execute properly, you should load it at the right
> target address in SDRAM.

If barebox detects its current runtime address differs from the link address 
it copies itself to the link address first.

So writing it anywhere into sdram should work. But only, if also the link 
address is in the sdram area...

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] 11+ messages in thread

* Re: testing barebox on calao sbc35-a9260 board
  2010-06-28  9:36       ` Juergen Beisert
@ 2010-06-28 10:37         ` Belisko Marek
  2010-06-30  6:57           ` Sascha Hauer
  0 siblings, 1 reply; 11+ messages in thread
From: Belisko Marek @ 2010-06-28 10:37 UTC (permalink / raw)
  To: Juergen Beisert; +Cc: barebox

Hi,

On Mon, Jun 28, 2010 at 11:36 AM, Juergen Beisert <jbe@pengutronix.de> wrote:
> Eric Bénard wrote:
>> Hi Marek,
>>
>> Le 28/06/2010 11:08, Belisko Marek a écrit :
>> > I disable autostart and download barebox image to 0x8000 with
>> > tftp 0x8000 barebox.bin and then jut go 0x8000 ended with:
>> > ## Starting application at 0x00008000 ...
>>
>> if I remember well, on AT91 SDRAM is at 0x20000000 so actually you don't
>> seem to load it in SDRAM.
>> For the binary to execute properly, you should load it at the right
>> target address in SDRAM.
>
> If barebox detects its current runtime address differs from the link address
> it copies itself to the link address first.
>
> So writing it anywhere into sdram should work. But only, if also the link
> address is in the sdram area...
Seems it's not working in my case. U-boot code just jump to address which
is taken as argument according code. If barebox is copied to correct link
address and started it should work. Is there any possibility to check
link address from binary
or it's not necessary to use mkimage tool from u-boot?

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

Marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com

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

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

* Re: testing barebox on calao sbc35-a9260 board
  2010-06-28 10:37         ` Belisko Marek
@ 2010-06-30  6:57           ` Sascha Hauer
  2010-06-30 11:39             ` Belisko Marek
  0 siblings, 1 reply; 11+ messages in thread
From: Sascha Hauer @ 2010-06-30  6:57 UTC (permalink / raw)
  To: Belisko Marek; +Cc: barebox

On Mon, Jun 28, 2010 at 12:37:06PM +0200, Belisko Marek wrote:
> Hi,
> 
> On Mon, Jun 28, 2010 at 11:36 AM, Juergen Beisert <jbe@pengutronix.de> wrote:
> > Eric Bénard wrote:
> >> Hi Marek,
> >>
> >> Le 28/06/2010 11:08, Belisko Marek a écrit :
> >> > I disable autostart and download barebox image to 0x8000 with
> >> > tftp 0x8000 barebox.bin and then jut go 0x8000 ended with:
> >> > ## Starting application at 0x00008000 ...
> >>
> >> if I remember well, on AT91 SDRAM is at 0x20000000 so actually you don't
> >> seem to load it in SDRAM.
> >> For the binary to execute properly, you should load it at the right
> >> target address in SDRAM.
> >
> > If barebox detects its current runtime address differs from the link address
> > it copies itself to the link address first.
> >
> > So writing it anywhere into sdram should work. But only, if also the link
> > address is in the sdram area...
> Seems it's not working in my case. U-boot code just jump to address which
> is taken as argument according code. If barebox is copied to correct link
> address and started it should work. Is there any possibility to check
> link address from binary
> or it's not necessary to use mkimage tool from u-boot?

Here are the necessary steps to run the barebox.bin file from U-Boot:

tftp 0x20000000 barebox.bin
go 0x20000000

As Eric stated the 9260 has SDRAM at 0x20000000, so this would be an
appropriate load address. barebox then relocates itself to 0x23f00000
according to the link address which you can check by doing 'make
barebox.S' and looking at barebox.S.

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] 11+ messages in thread

* Re: testing barebox on calao sbc35-a9260 board
  2010-06-28  8:32   ` Baruch Siach
@ 2010-06-30  7:02     ` Sascha Hauer
  0 siblings, 0 replies; 11+ messages in thread
From: Sascha Hauer @ 2010-06-30  7:02 UTC (permalink / raw)
  To: Baruch Siach; +Cc: barebox

On Mon, Jun 28, 2010 at 11:32:15AM +0300, Baruch Siach wrote:
> Hi Sascha,
> 
> On Mon, Jun 28, 2010 at 10:04:42AM +0200, Sascha Hauer wrote:
> > On Fri, Jun 25, 2010 at 11:31:49AM +0200, Belisko Marek wrote:
> > > I have a calao board sbc35-a9260 with u-boot pre-installed on it.
> > > I would like to try barebox running on that board (also make some development).
> > > I build at91sam9260ek_defconfig to try it out. I became to situation
> > > that I don't know how to load image to board :)
> > > 
> > > I try via tftp but u-boot automatically try to boot it and I got some
> > > error about magic number.
> > > I think about possibility just download binary to some RAM address and
> > > then use go command in u-boot
> > > to test if barebox binary will work.
> > > 
> > > There exist some how-to or example how to do this?
> > 
> > It's perfectly fine to start barebox from U-Boot with the 'go' command.
> > Try 'setenv autostart no' in U-Boot to stop U-Boot from autostarting
> > images.
> 
> Is there a way to do the same on Barebox? Currently 'go barebox.bin' in ramfs 
> returns -EINVAL from memmap.

If stored in a file it is indeed not runnable as the file is fragmented
in memory. It would be possible to copy it to a linear memory to memmap
it, but currently this is not implemented and I'm not sure this is a
good idea. It's possible to do a 'tftp barebox.bin /dev/ram0; go
/dev/ram0' instead. (or 'memcpy -s barebox.bin <sdramadr> 0x0 <size>; go
<sdramadr> if the file is already in the filesystem)

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] 11+ messages in thread

* Re: testing barebox on calao sbc35-a9260 board
  2010-06-28  9:08   ` Belisko Marek
  2010-06-28  9:17     ` Eric Bénard
@ 2010-06-30  7:03     ` Sascha Hauer
  1 sibling, 0 replies; 11+ messages in thread
From: Sascha Hauer @ 2010-06-30  7:03 UTC (permalink / raw)
  To: Belisko Marek; +Cc: barebox

On Mon, Jun 28, 2010 at 11:08:36AM +0200, Belisko Marek wrote:
> Hi Sascha,
> 
> 
> I disable autostart and download barebox image to 0x8000 with
> tftp 0x8000 barebox.bin and then jut go 0x8000 ended with:
> ## Starting application at 0x00008000 ...
> 
> Same I got when load latest compiled u-boot binary.

U-Boot binaries compiled for starting from flash are usually not
suitable to be run as second stage from SDRAM. Most of the time
it requires at least a include/config.h tweaking.

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] 11+ messages in thread

* Re: testing barebox on calao sbc35-a9260 board
  2010-06-30  6:57           ` Sascha Hauer
@ 2010-06-30 11:39             ` Belisko Marek
  0 siblings, 0 replies; 11+ messages in thread
From: Belisko Marek @ 2010-06-30 11:39 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On Wed, Jun 30, 2010 at 8:57 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Mon, Jun 28, 2010 at 12:37:06PM +0200, Belisko Marek wrote:
>> Hi,
>>
>> On Mon, Jun 28, 2010 at 11:36 AM, Juergen Beisert <jbe@pengutronix.de> wrote:
>> > Eric Bénard wrote:
>> >> Hi Marek,
>> >>
>> >> Le 28/06/2010 11:08, Belisko Marek a écrit :
>> >> > I disable autostart and download barebox image to 0x8000 with
>> >> > tftp 0x8000 barebox.bin and then jut go 0x8000 ended with:
>> >> > ## Starting application at 0x00008000 ...
>> >>
>> >> if I remember well, on AT91 SDRAM is at 0x20000000 so actually you don't
>> >> seem to load it in SDRAM.
>> >> For the binary to execute properly, you should load it at the right
>> >> target address in SDRAM.
>> >
>> > If barebox detects its current runtime address differs from the link address
>> > it copies itself to the link address first.
>> >
>> > So writing it anywhere into sdram should work. But only, if also the link
>> > address is in the sdram area...
>> Seems it's not working in my case. U-boot code just jump to address which
>> is taken as argument according code. If barebox is copied to correct link
>> address and started it should work. Is there any possibility to check
>> link address from binary
>> or it's not necessary to use mkimage tool from u-boot?
>
> Here are the necessary steps to run the barebox.bin file from U-Boot:
>
> tftp 0x20000000 barebox.bin
> go 0x20000000

Following steps give me the also only Starting application at
0x20000000 and nothing more.
>
> As Eric stated the 9260 has SDRAM at 0x20000000, so this would be an
> appropriate load address. barebox then relocates itself to 0x23f00000
> according to the link address which you can check by doing 'make
> barebox.S' and looking at barebox.S.
Yes it seems link address ( 0x23f00000) is correct according barebox.S file.
Strange.

Anyway thanks for support and advices.
>
> 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 |
>



-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com

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

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

end of thread, other threads:[~2010-06-30 11:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-25  9:31 testing barebox on calao sbc35-a9260 board Belisko Marek
2010-06-28  8:04 ` Sascha Hauer
2010-06-28  8:32   ` Baruch Siach
2010-06-30  7:02     ` Sascha Hauer
2010-06-28  9:08   ` Belisko Marek
2010-06-28  9:17     ` Eric Bénard
2010-06-28  9:36       ` Juergen Beisert
2010-06-28 10:37         ` Belisko Marek
2010-06-30  6:57           ` Sascha Hauer
2010-06-30 11:39             ` Belisko Marek
2010-06-30  7:03     ` Sascha Hauer

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