Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Accessing "Target Name" Bootline Parameter

90 views
Skip to first unread message

Fred

unread,
Nov 1, 2009, 11:23:23 AM11/1/09
to
I'm sure it's something simple, but for the life of me I can't find it
in the Wind River documentation.

I'm running vxWorks 6.6 on a PPC target. I want to access the "Target
Name" (tn=XXX) parameter supplied to the kernel on the vxWorks
bootline. Is there an API that I can call to retrieve this
information? If it matters, the code making this API call would be
inside an RTP.

How do I do it?

Michael R. Kesti

unread,
Nov 1, 2009, 12:26:37 PM11/1/09
to

bootLib's functions bootStringToStruct() is what you need.

#include "bootLib.h

#define BOOT_LINE_ADRS ( 0x4200 )

BOOT_PARAMS bootParams;

bootStringToStruct ( (char *)BOOT_LINE_ADRS, &bootParams );
sprintf ( stdout, "target name = \"%s\"\n", bootParams.targetName );

--
========================================================================
Michael Kesti | "And like, one and one don't make
| two, one and one make one."
mrkesti at hotmail dot com | - The Who, Bargain

Fred

unread,
Nov 1, 2009, 7:43:32 PM11/1/09
to
Last time on comp.os.vxworks, "Michael R. Kesti"
<michae...@comcast.net> said:

>bootLib's functions bootStringToStruct() is what you need.

Thank you - I knew it would be simple!

<grin>

Fred

unread,
Nov 4, 2009, 12:38:20 AM11/4/09
to
Last time on comp.os.vxworks, "Michael R. Kesti"
<michae...@comcast.net> said:

>Fred wrote:
>> I'm sure it's something simple, but for the life of me I can't find it
>> in the Wind River documentation.
>>
>> I'm running vxWorks 6.6 on a PPC target. I want to access the "Target
>> Name" (tn=XXX) parameter supplied to the kernel on the vxWorks
>> bootline. Is there an API that I can call to retrieve this
>> information? If it matters, the code making this API call would be
>> inside an RTP.
>>
>> How do I do it?
>
>bootLib's functions bootStringToStruct() is what you need.

Just a quick followup: this function did the trick, but it's only
available from kernel code, not from an RTP. The workaround is an easy
one: I retrieved the target name prior to launching the RTP, and
passed the target name in the RTP's argument vector.

0 new messages