VxWorks startup code Usrroot () function analysis (ii)

Source: Internet
Author: User

The two days are very busy, almost forgot their own direction. Occasionally see a video asking people what their dreams are. Suddenly spirits, said very well, the dream is to make people insist and feel happy.

Then look at Usrroot this function, to tell the truth this function is really the essence of VxWorks initialization, powerful, clear.

Usrbootlineinit (), Initialize the system boot command, if there is no boot command in the corresponding location of flash, then using the default startup command, you can see that the default startup command is as follows:

#elifdefined (cpu_920t)

# define Default_boot_line \

"Fei (0,0) host:/tor2/target/config/integrator920t/vxworks" \

"h=90.0.0.3 e=90.0.0.50:ffffff00 U=targettn=targetname"

The default bootline is to go to the host Host:/tor2/target/config/integrator920t/vxworks location to download the kernel, for non-bootrom type VxWorks mirror, because the kernel has been copied into RAM, Can be started directly.

Usrnetinit (Boot_line_adrs); using the Boot_line_adrs parameter to initialize Ethernet, see the host IP is 90.0.0.3, the native IP is e=90.0.0.50:ffffff00.

Usrsmobjinit () shared memory mechanism initialization.

Vmtextprotect, Intvectablewriteprotect writes the code snippet and the interrupt vector table part memory write protection.

Then there are some mechanism support, C + + support, initialize wind Web server support, WDB Debug Debugging agent (many kinds of communication), the following is some information of the printing system:

printf ("\ n");

printf ("%23s\n\n", runtimename);

printf ("Copyright 1984-2002 wind Riversystems, inc.\n\n");

printf ("CPU:%s\n", Sysmodel ());

printf ("Runtime Name:%s\n", runtimename);

printf ("Runtime Version:%s\n", runtimeversion);

printf ("BSP version:" Bsp_version Bsp_rev "\ n");

printf ("Created:%s\n", creationdate);

printf ("WDB Comm Type:%s\n", WDB_COMM_TYPE_STR);

printf ("WDB:%s.\n\n",

((wdbrunsexternal () | | wdbrunstasking ())?

"Ready": "Agent configurationfailed"));

This is a very familiar boot screen.

Then according to whether the need to login password to add a additional users, the user named "target", the password is "RCQBRBZRYC", do not know vxworks why to take a so difficult to remember the password.

Printlogo (); Print VxWorks logo This figure is actually an array. Then print some system information similar to the above.

Usrhtmlinit (); VxWorks's features are really powerful, and you can create an HTML page.

By the end of this usrroot function, VxWorks will run, and the following will perform specific operations on the board, after which the code for 2410vxworksBSP will be analyzed. From this function, VxWorks supports enough features that are much more powerful than QNX and really worth learning.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.