All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] stand alone application
@ 2007-03-31 19:13 kow9loon
  2007-04-01  0:37 ` Wolfgang Denk
  2007-04-01 17:11 ` kow9loon
  0 siblings, 2 replies; 6+ messages in thread
From: kow9loon @ 2007-03-31 19:13 UTC (permalink / raw)
  To: u-boot


I am trying to write a stand alone application, which is supposed to be a
board diagnostics for manufacturing. The way it supposes to work is as
follows: U_boot could either download the diagnostics manually under the
U_boot prompt, or be calling up do_tftp() directly if it is to be done
automatically. Results generated from the diagnostics are to be recorded in
the RAM, whose contents shall later be uploaded as a log file to an external
server via tftp. After reading the examples provided in the example
directory, I have the following questions:

(1) In my understanding, the stand alone application (the board diagnostic
for manufacturing) is supposed to be compiled as a separately entity in the
U-boot path and then be placed in an external server, waiting to be
downloaded to the RAM on board; when either go <address> or do_go(address)
is executed, control get passed to the stand alone application, how could
the stand alone application be able to make calls to functions that are
exported (those appeared in both exports.c and export.h), without some kind
of "linking"? Unless go <address> or do_go(address) perform some sort of
"linking" or "peudo linking" action, this doesn't sound possible. Could
someone explain to me how this works? 

My expectation of how this could work is: on execution of the go <address>
command or do_go (address), address of the jump table is to be loaded into a
register, and it is the responsibility of the application to save the value
of this register before anything else, in such a way to allow the
application to call up functions that it elects by picking up the correct
addresses of these functions via indexing. However, after reading the
examples provided in U-boot, I have not seen any motion of saving the value
of the register. However, vwhich register U-boot chooses to use would be
processor dependent. This is just my two cents.

(2) Is uploading currently being supported in U-boot's tftp implementation?
Judging from the do_tftp codes, it looks that only "downloading" action is
supported not "uploading". Could someone confirm that or point to the place
where "uploading" is implemented?

Any input would be greatly appreciated. Thanks.



Kow9loon
-- 
View this message in context: http://www.nabble.com/stand-alone-application-tf3498698.html#a9771147
Sent from the Uboot - Users mailing list archive at Nabble.com.

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

* [U-Boot-Users] stand alone application
  2007-03-31 19:13 [U-Boot-Users] stand alone application kow9loon
@ 2007-04-01  0:37 ` Wolfgang Denk
  2007-04-01 16:31   ` kow9loon
  2007-04-01 17:11 ` kow9loon
  1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2007-04-01  0:37 UTC (permalink / raw)
  To: u-boot

In message <9771147.post@talk.nabble.com> you wrote:
> 
> I am trying to write a stand alone application, which is supposed to be a
> board diagnostics for manufacturing. The way it supposes to work is as
> follows: U_boot could either download the diagnostics manually under the
> U_boot prompt, or be calling up do_tftp() directly if it is to be done
> automatically. Results generated from the diagnostics are to be recorded in
> the RAM, whose contents shall later be uploaded as a log file to an external
> server via tftp. After reading the examples provided in the example

I recommend to use the existing log device; note that it is
compatible with Linux's syslog mechanism.

> (1) In my understanding, the stand alone application (the board diagnostic
> for manufacturing) is supposed to be compiled as a separately entity in the

Yes.

> U-boot path and then be placed in an external server, waiting to be
> downloaded to the RAM on board; when either go <address> or do_go(address)

You can also store it in flash memory, or on some storage device, of
course.

> is executed, control get passed to the stand alone application, how could
> the stand alone application be able to make calls to functions that are
> exported (those appeared in both exports.c and export.h), without some kind
> of "linking"? Unless go <address> or do_go(address) perform some sort of

This is documented in the doc/README.standalone file; no linking is
done.

> "linking" or "peudo linking" action, this doesn't sound possible. Could
> someone explain to me how this works? 

The keyword is: jump table.

> My expectation of how this could work is: on execution of the go <address>

Why don't you simply read the documentation instead of speculating?

> command or do_go (address), address of the jump table is to be loaded into a
> register, and it is the responsibility of the application to save the value
> of this register before anything else, in such a way to allow the
> application to call up functions that it elects by picking up the correct
> addresses of these functions via indexing. However, after reading the
> examples provided in U-boot, I have not seen any motion of saving the value
> of the register. However, vwhich register U-boot chooses to use would be
> processor dependent. This is just my two cents.

You should RTFM.

> (2) Is uploading currently being supported in U-boot's tftp implementation?

No.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When properly administered, vacations do not  diminish  productivity:
for every week you're away and get nothing done, there's another when
your boss is away and you get twice as much done.  -- Daniel B. Luten

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

* [U-Boot-Users] stand alone application
  2007-04-01  0:37 ` Wolfgang Denk
@ 2007-04-01 16:31   ` kow9loon
  2007-04-01 19:36     ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: kow9loon @ 2007-04-01 16:31 UTC (permalink / raw)
  To: u-boot


Thank you for the reply and the direction. I am a novice in U_boot, though I
have some prior experience in working on other boot codes.

There is still another outstanding question that I would like to raisie,
however. In the Standalone-README file, it states that for PowerPC, the load
adress is 0x00040000, and the start address is 0x00040004. On the board that
I am working on, those two addresses aren't available. Is that a way for me
to have the load address and the start address to be RELOCATED to addresses
that fall within the aforementioned range? Any comment would be greatly
welcomed. Thanks.

Best Regards,

Kow9loon










wd wrote:
> 
> In message <9771147.post@talk.nabble.com> you wrote:
>> 
>> I am trying to write a stand alone application, which is supposed to be a
>> board diagnostics for manufacturing. The way it supposes to work is as
>> follows: U_boot could either download the diagnostics manually under the
>> U_boot prompt, or be calling up do_tftp() directly if it is to be done
>> automatically. Results generated from the diagnostics are to be recorded
>> in
>> the RAM, whose contents shall later be uploaded as a log file to an
>> external
>> server via tftp. After reading the examples provided in the example
> 
> I recommend to use the existing log device; note that it is
> compatible with Linux's syslog mechanism.
> 
>> (1) In my understanding, the stand alone application (the board
>> diagnostic
>> for manufacturing) is supposed to be compiled as a separately entity in
>> the
> 
> Yes.
> 
>> U-boot path and then be placed in an external server, waiting to be
>> downloaded to the RAM on board; when either go <address> or
>> do_go(address)
> 
> You can also store it in flash memory, or on some storage device, of
> course.
> 
>> is executed, control get passed to the stand alone application, how could
>> the stand alone application be able to make calls to functions that are
>> exported (those appeared in both exports.c and export.h), without some
>> kind
>> of "linking"? Unless go <address> or do_go(address) perform some sort of
> 
> This is documented in the doc/README.standalone file; no linking is
> done.
> 
>> "linking" or "peudo linking" action, this doesn't sound possible. Could
>> someone explain to me how this works? 
> 
> The keyword is: jump table.
> 
>> My expectation of how this could work is: on execution of the go
>> <address>
> 
> Why don't you simply read the documentation instead of speculating?
> 
>> command or do_go (address), address of the jump table is to be loaded
>> into a
>> register, and it is the responsibility of the application to save the
>> value
>> of this register before anything else, in such a way to allow the
>> application to call up functions that it elects by picking up the correct
>> addresses of these functions via indexing. However, after reading the
>> examples provided in U-boot, I have not seen any motion of saving the
>> value
>> of the register. However, vwhich register U-boot chooses to use would be
>> processor dependent. This is just my two cents.
> 
> You should RTFM.
> 
>> (2) Is uploading currently being supported in U-boot's tftp
>> implementation?
> 
> No.
> 
> Best regards,
> 
> Wolfgang Denk
> 
> -- 
> DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
> Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> When properly administered, vacations do not  diminish  productivity:
> for every week you're away and get nothing done, there's another when
> your boss is away and you get twice as much done.  -- Daniel B. Luten
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
> 
> 

-- 
View this message in context: http://www.nabble.com/stand-alone-application-tf3498698.html#a9779381
Sent from the Uboot - Users mailing list archive at Nabble.com.

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

* [U-Boot-Users] stand alone application
  2007-03-31 19:13 [U-Boot-Users] stand alone application kow9loon
  2007-04-01  0:37 ` Wolfgang Denk
@ 2007-04-01 17:11 ` kow9loon
  2007-04-01 19:39   ` Wolfgang Denk
  1 sibling, 1 reply; 6+ messages in thread
From: kow9loon @ 2007-04-01 17:11 UTC (permalink / raw)
  To: u-boot


After giving the matter some more thoughts, another question also comes into
mind:

How could I ensure that control is passed to the entry point of my
standalone application, which I designate, running in the PowerPC
environment, if the start address is confined to 0x00040000? I would expect
that, some how, the standalone application has to inform U_boot where the
start address is, before U_boot could get to the correct entry point. Please
correct me if I am wrong. Thank you again.


Regards,


Kow9loon









kow9loon wrote:
> 
> I am trying to write a stand alone application, which is supposed to be a
> board diagnostics for manufacturing. The way it supposes to work is as
> follows: U_boot could either download the diagnostics manually under the
> U_boot prompt, or be calling up do_tftp() directly if it is to be done
> automatically. Results generated from the diagnostics are to be recorded
> in the RAM, whose contents shall later be uploaded as a log file to an
> external server via tftp. After reading the examples provided in the
> example directory, I have the following questions:
> 
> (1) In my understanding, the stand alone application (the board diagnostic
> for manufacturing) is supposed to be compiled as a separately entity in
> the U-boot path and then be placed in an external server, waiting to be
> downloaded to the RAM on board; when either go <address> or do_go(address)
> is executed, control get passed to the stand alone application, how could
> the stand alone application be able to make calls to functions that are
> exported (those appeared in both exports.c and export.h), without some
> kind of "linking"? Unless go <address> or do_go(address) perform some sort
> of "linking" or "peudo linking" action, this doesn't sound possible. Could
> someone explain to me how this works? 
> 
> My expectation of how this could work is: on execution of the go <address>
> command or do_go (address), address of the jump table is to be loaded into
> a register, and it is the responsibility of the application to save the
> value of this register before anything else, in such a way to allow the
> application to call up functions that it elects by picking up the correct
> addresses of these functions via indexing. However, after reading the
> examples provided in U-boot, I have not seen any motion of saving the
> value of the register. However, vwhich register U-boot chooses to use
> would be processor dependent. This is just my two cents.
> 
> (2) Is uploading currently being supported in U-boot's tftp
> implementation? Judging from the do_tftp codes, it looks that only
> "downloading" action is supported not "uploading". Could someone confirm
> that or point to the place where "uploading" is implemented?
> 
> Any input would be greatly appreciated. Thanks.
> 
> 
> 
> Kow9loon
> 

-- 
View this message in context: http://www.nabble.com/stand-alone-application-tf3498698.html#a9779774
Sent from the Uboot - Users mailing list archive at Nabble.com.

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

* [U-Boot-Users] stand alone application
  2007-04-01 16:31   ` kow9loon
@ 2007-04-01 19:36     ` Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2007-04-01 19:36 UTC (permalink / raw)
  To: u-boot

In message <9779381.post@talk.nabble.com> you wrote:
> 
> There is still another outstanding question that I would like to raisie,
> however. In the Standalone-README file, it states that for PowerPC, the load
> adress is 0x00040000, and the start address is 0x00040004. On the board that
> I am working on, those two addresses aren't available. Is that a way for me

Chose any other free address you like, then.

> to have the load address and the start address to be RELOCATED to addresses
> that fall within the aforementioned range? Any comment would be greatly
> welcomed. Thanks.

No relocation is done here. You link for a fixed address.

> wd wrote:

[Full quote deleted.]

Please don't top post / full quote. Learn to quote. See
http://www.netmeister.org/news/learn2quote.html

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Dealing with failure is easy: work hard to improve. Success  is  also
easy  to  handle:  you've  solved  the  wrong  problem.  Work hard to
improve.

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

* [U-Boot-Users] stand alone application
  2007-04-01 17:11 ` kow9loon
@ 2007-04-01 19:39   ` Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2007-04-01 19:39 UTC (permalink / raw)
  To: u-boot

In message <9779774.post@talk.nabble.com> you wrote:
> 
> How could I ensure that control is passed to the entry point of my
> standalone application, which I designate, running in the PowerPC

You enter the correct entry point address as argument of the go
command. You are expected to know what you are doing.

> environment, if the start address is confined to 0x00040000? I would expect
> that, some how, the standalone application has to inform U_boot where the
> start address is, before U_boot could get to the correct entry point. Please
> correct me if I am wrong. Thank you again.

Did you bother to read the FAQ? I guess not. See especially
http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork

> kow9loon wrote:

AND STOP TOP-POSTING / FULL-QUOTING!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
War is never imperative.
	-- McCoy, "Balance of Terror", stardate 1709.2

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

end of thread, other threads:[~2007-04-01 19:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-31 19:13 [U-Boot-Users] stand alone application kow9loon
2007-04-01  0:37 ` Wolfgang Denk
2007-04-01 16:31   ` kow9loon
2007-04-01 19:36     ` Wolfgang Denk
2007-04-01 17:11 ` kow9loon
2007-04-01 19:39   ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.