forked from wolfSSL/wolfssl
updates to VxWorks README
This commit is contained in:
@@ -1,27 +1,11 @@
|
||||
## Wind River Workbench using VxWorks with wolfSSL
|
||||
####1 Necessary Files if Using VxWorks Simulator
|
||||
The following files are required to replicate this build:
|
||||
* vxsim\_linux\_1\_0\_2\_2 (directory)
|
||||
* compilers/gnu-4.8.1.5/include/c++/4.8
|
||||
* compilers/gnu-4.8.1.5/include/c++/4.8/i586-wrs-vxworks
|
||||
* compilers/gnu-4.8.1.5/lib/gcc/i586-wrs-vxworks/4.8.1/include
|
||||
* compilers/gnu-4.8.1.5/lib/gcc/i586-wrs-vxworks/4.8.1/include-fixed
|
||||
* vsb\_vxsim\_linux/share/h
|
||||
* vsb\_vxsim\_linux/krnl/h/system
|
||||
* vsb\_vxsim\_linux/krnl/h/public
|
||||
* vsb\_vxsim\_linux/krnl/configlette
|
||||
* vsb\_vxsim\_linux/h
|
||||
|
||||
Note: This project was tested with a pre-built image in the VxWorks distribution
|
||||
called vip\_vxsim\_linux\_gnu.
|
||||
|
||||
####2 Steps to Add wolfSSL to Workbench Project
|
||||
####1 Steps to Add wolfSSL to Workbench Project
|
||||
1. Start by creating a new VxWorks image in Workbench by going to File > New >
|
||||
Project and then selecting VxWorks Image Project.
|
||||
|
||||
2. Right click on the project and go to Import > General > Filesystem. Choose the path
|
||||
to the wolfSSL library here. Uncheck everything except the examples, src and
|
||||
wolfcrypt directories. Uncheck the following:
|
||||
2. Right click on the project and go to Import > General > Filesystem. Click Next.
|
||||
Choose the path to the wolfSSL library here. Uncheck everything except the examples,
|
||||
src and wolfcrypt directories. Uncheck the following:
|
||||
|
||||
wolfcrypt/src/aes_asm.asm
|
||||
wolfcrypt/src/aes_asm.s
|
||||
@@ -29,40 +13,33 @@ wolfcrypt directories. Uncheck the following:
|
||||
examples/echoserver/
|
||||
wolfcrypt/user-crypto
|
||||
|
||||
Leave "Create top level folder" unchecked. Click Finish.
|
||||
Uncheck "Create top level folder". Click Finish.
|
||||
|
||||
3. To include the path to the wolfSSL header files, right click on the project and go to Properties > Build Properties > Paths.
|
||||
Choose Browse and select:
|
||||
3. To include the path to the wolfSSL header files, right click on the project
|
||||
and go to Properties > Build Properties and select the "Paths" tab. Click "Add"
|
||||
then "Browse" and select:
|
||||
|
||||
<path_to_wolfssl>/
|
||||
|
||||
Click ok.
|
||||
Click "OK" then "OK" again.
|
||||
|
||||
4. In ```<path_to_wolfssl>/wolfssl/wolfcrypt/settings.h```, uncomment #define WOLFSSL_VXWORKS
|
||||
4. In ```<path_to_wolfssl>/wolfssl/wolfcrypt/settings.h```, uncomment
|
||||
|
||||
#define WOLFSSL_VXWORKS
|
||||
|
||||
5. If using the VxWorks simulator add the following to EXTRA\_DEFINE:
|
||||
|
||||
-DVXWORKS_SIM /* only if using the VxWorks simulator */
|
||||
|
||||
6. Copy the certs folder in ```<path_to_wolfssl>/``` to the Wind River Workbench workspace folder. This is where the simulator looks for the filesystem.
|
||||
This can be done by right clicking on the project in Project Explorer, going to
|
||||
Build Properties and selecting the "Variables" tab. Highlight EXTRA\_DEFINE and
|
||||
click "Edit". Enter the above define to the end of the line.
|
||||
|
||||
7. If NO\_DEV\_RANDOM is defined in ```<path_to_wolfssl>wolfssl/wolfcrypt/settings.h``` inside the
|
||||
\#ifdef WOLFSSL\_VXWORKS block, a new GenerateSeed() function will need to be defined
|
||||
in wolfcrypt/src/random.c.
|
||||
6. Copy the certs folder in ```<path_to_wolfssl>/``` to the Wind River Workbench
|
||||
workspace folder. This is where the simulator looks for the filesystem.
|
||||
|
||||
8. Include Entropy:
|
||||
- Create a new project, similar to step 1 but choose VxWorks Source Build Project as the type of project instead of VxWorks Image Project.
|
||||
|
||||
- In the project directory, double click "Source Build Configuration" and under os > core > CORE\_KERNEL Menu > VxWorks Kernel Component Configuration find "Inject entropy in interrupts". Double click this.
|
||||
|
||||
- Go back to your VIP project. Right click the project and select "Properties".
|
||||
|
||||
- In "Properties", select "Project References". Check the box next to the new project you created. Click "Ok".
|
||||
|
||||
- Rebuild the project.
|
||||
|
||||
####3 Testing wolfSSL with VxWorks:
|
||||
#####3.1 wolfCrypt Test and Benchmark Applications
|
||||
####2 Testing wolfSSL with VxWorks:
|
||||
#####2.1 wolfCrypt Test and Benchmark Applications
|
||||
The wolfCrypt test application will test each of the cryptographic algorithms
|
||||
and output the status for each as a success or failure. The benchmark application will output the runtime of the cryptographic algorithms in milliseconds.
|
||||
|
||||
@@ -94,7 +71,7 @@ by adding the following to the usrAppInit() function:
|
||||
|
||||
4. To run the VxWorks simulator, click the dropdown list next to "VxWorks Simulator" at the top of Workbench and go to "Open Connection Details". Add the correct Kernel Image file. This will be located in ```workspace/<project_name>/default/vxWorks```. Click Apply. Start the simulator by clicking the green, "Connect 'VxWorks Simulator'" button to the right of the "VxWorks Simulator" dropdown list. Verify in the simulator terminal that all wolfCrypt tests pass.
|
||||
|
||||
#####3.2 Example Client
|
||||
#####2.2 Example Client
|
||||
The wolfSSL example client.c file can be found in ```<path_to_wolfssl>/wolfssl/examples/client```.
|
||||
|
||||
1. Add the following include to usrAppInit.c:
|
||||
@@ -126,7 +103,7 @@ section, and add a call to the client function:
|
||||
SSL cipher suite is TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
||||
Server response: I hear you fa shizzle!
|
||||
|
||||
#####3.3 Example Server
|
||||
#####2.3 Example Server
|
||||
The example server requires more configuration than the client if using the
|
||||
VxWorks simulator.
|
||||
|
||||
@@ -175,3 +152,19 @@ Note: The wolfSSL example server and client cannot run at the same time on the V
|
||||
SSL cipher suite is TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
||||
Client message: hello wolfssl!
|
||||
|
||||
####3 Necessary Files if Using VxWorks Simulator
|
||||
The following files are required to replicate this build:
|
||||
* vxsim\_linux\_1\_0\_2\_2 (directory)
|
||||
* compilers/gnu-4.8.1.5/include/c++/4.8
|
||||
* compilers/gnu-4.8.1.5/include/c++/4.8/i586-wrs-vxworks
|
||||
* compilers/gnu-4.8.1.5/lib/gcc/i586-wrs-vxworks/4.8.1/include
|
||||
* compilers/gnu-4.8.1.5/lib/gcc/i586-wrs-vxworks/4.8.1/include-fixed
|
||||
* vsb\_vxsim\_linux/share/h
|
||||
* vsb\_vxsim\_linux/krnl/h/system
|
||||
* vsb\_vxsim\_linux/krnl/h/public
|
||||
* vsb\_vxsim\_linux/krnl/configlette
|
||||
* vsb\_vxsim\_linux/h
|
||||
|
||||
Note: This project was tested with a pre-built image in the VxWorks distribution
|
||||
called vip\_vxsim\_linux\_gnu.
|
||||
|
||||
|
Reference in New Issue
Block a user