Skip to content

Commit ba7cd58

Browse files
authored
Merge pull request #28 from dgarske/octeon_docs
Octeon III (CN7300) build instructions
2 parents 2207326 + b569dda commit ba7cd58

File tree

1 file changed

+232
-0
lines changed

1 file changed

+232
-0
lines changed
Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
# Octeon III
2+
3+
Guide for setting up wolfSSL on the Octeon III CN7300
4+
5+
## Octeon SDK
6+
7+
```sh
8+
sudo yum install libuuid-devel
9+
sudo yum install perl-Env
10+
11+
sudo rpm -i OCTEON-SDK-5.1.0-609.x86_64.rpm
12+
```
13+
14+
The OCTEON-SDK package has been successfully installed under the
15+
/usr/local/Cavium_Networks directory.
16+
17+
The installation requires the OCTEON_MODEL environment variable
18+
to be set. To set this environment variable, cd to the
19+
/usr/local/Cavium_Networks/OCTEON-SDK directory, and invoke
20+
21+
source env-setup <OCTEON_MODEL>
22+
23+
script. Valid OCTEON_MODELs are listed in octeon-models.txt file
24+
under OCTEON-SDK directory.
25+
26+
You may want to copy the OCTEON-SDK package to your home directory to allow
27+
modification without root privileges.
28+
29+
For more information please refer to the online SDK documentation:
30+
file:///usr/local/Cavium_Networks/OCTEON-SDK/docs/html/index.html
31+
32+
```sh
33+
sudo rpm -i OCTEON-CRYPTO-CORE-5.1.0-01.x86_64.rpm
34+
```
35+
36+
The OCTEON-CRYPTO-CORE is installed under
37+
/usr/local/Cavium_Networks/OCTEON-SDK/components/crypto-api/core directory.
38+
This package installs the following sources.
39+
* Crypto-Core API Sources
40+
* Sample Crypto-Core Test Applications
41+
42+
Please refer to following documentation under
43+
/usr/local/Cavium_Networks/OCTEON-SDK/components/crypto-api/core directory
44+
* README.txt - contains build instructions and other details
45+
* Release_Notes.txt - contains change history
46+
47+
```sh
48+
sudo rpm -i OCTEON-LINUX-5.1.0-609.x86_64.rpm
49+
```
50+
51+
The Linux Kernel has been successfully installed under the directory
52+
/usr/local/Cavium_Networks/OCTEON-SDK/linux
53+
54+
Please refer to file:///usr/local/Cavium_Networks/OCTEON-SDK/docs/html/linux.html
55+
on how to use Linux on the OCTEON.
56+
57+
58+
Final Setup:
59+
60+
```sh
61+
cp -r /usr/local/Cavium_Networks/OCTEON-SDK/ ~
62+
cd OCTEON-SDK
63+
source env-setup OCTEON_CN73XX
64+
65+
cd examples
66+
make
67+
```
68+
69+
Setup for CN73XX board EVB7304
70+
71+
```sh
72+
setenv qlm2_mode pcie
73+
setenv pcie2_mode ep
74+
setenv pcie2_gen 2
75+
setenv pcie2_lanes 4
76+
setenv qlm2_mode sgmii
77+
78+
setenv qlm4_mode sata
79+
80+
#setenv ethact octeth0
81+
#setenv ethprime octeth0
82+
dhcp
83+
84+
saveenv
85+
```
86+
87+
## Building bootloader
88+
89+
```sh
90+
# On Host
91+
cd OCTEON-SDK/bootloader/u-boot
92+
make distclean
93+
make octeon_ebb7304
94+
make
95+
96+
cp *.bin /mnt/cf1
97+
98+
# On Target
99+
fatls mmc 1
100+
fatload mmc 1 $(loadaddr) u-boot-octeon_ebb7304.bin
101+
102+
bootloadervalidate
103+
bootloaderupdate
104+
```
105+
106+
Note: You must run `source env-setup OCTEON_CN73XX` anytime a new shell is opened to setup the build environment.
107+
108+
## Building Linux Kernel (Busybox)
109+
110+
```sh
111+
# On Host
112+
su root
113+
cd OCTEON-SDK
114+
source env-setup OCTEON_CN73XX
115+
cd linux
116+
make clean
117+
cd embedded_rootfs
118+
make menuconfig
119+
cd ..
120+
make kernel
121+
make strip
122+
123+
cp ./kernel/linux/vmlinux.64 /mnt/cf1
124+
```
125+
126+
```sh
127+
# On Target
128+
telnet 192.168.0.114 9761
129+
130+
fatls mmc 1
131+
fatload mmc 1 $(loadaddr) vmlinux.64
132+
bootoctlinux $(loadaddr) coremask=0xffff root=/dev/sda2 mem=0
133+
```
134+
135+
Shortcut macro from U-Boot:
136+
137+
```sh
138+
# On Target
139+
setenv linux_mmc 'fatload mmc 1 $(loadaddr) vmlinux.64;bootoctlinux $(loadaddr) coremask=0xffff root=/dev/sda2 mem=0'
140+
run linux_mmc
141+
saveenv
142+
```
143+
144+
## Building Linux Debian
145+
146+
```sh
147+
su root
148+
cd OCTEON-SDK
149+
source env-setup OCTEON_CN73XX
150+
151+
cd linux
152+
make kernel-deb
153+
154+
# Identify external /dev/sd*
155+
fdisk -l
156+
157+
# Edit /etc/fstab. Replace "sda" with the device name determined from above.
158+
/dev/sdb1 /mnt/cf1 auto noauto,noatime,user 0 0
159+
/dev/sdb2 /mnt/cf2 ext3 noauto,noatime,user 0 0
160+
161+
mkdir -p /mnt/cf1
162+
mkdir -p /mnt/cf2
163+
164+
cd debian
165+
make DISK=/dev/sdb compact-flash
166+
cd ..
167+
make kernel-deb flash
168+
169+
usb start
170+
fatls usb 0
171+
fatload usb 0 $(loadaddr) vmlinux.64
172+
173+
fatls mmc 0
174+
fatload mmc 0 $(loadaddr) vmlinux.64
175+
bootoctlinux $(loadaddr) coremask=0xffff root=/dev/mmcblk0p2 mem=0 rootdelay=5
176+
```
177+
178+
### Setting up default boot
179+
180+
```sh
181+
setenv bootcmd 'fatload mmc 0 $(loadaddr) vmlinux.64; bootoctlinux $(loadaddr) coremask=0xffff root=/dev/mmcblk0p2 mem=0 rootdelay=5'
182+
saveenv
183+
reset
184+
```
185+
186+
### Debian Packages
187+
188+
```sh
189+
vi /etc/sources.list
190+
deb http://archive.debian.org/debian/ jessie main contrib non-free
191+
deb-src http://archive.debian.org/debian/ jessie main contrib non-free
192+
#deb-src http://archive.debian.org/ jessie/updates main contrib non-free
193+
#deb http://archive.debian.org/ jessie/updates main contrib non-free
194+
```
195+
196+
## wolfSSL Building for Octeon
197+
198+
```sh
199+
cd examples
200+
ln -s ../../wolfssl wolfssl
201+
cd wolfssl
202+
./autogen.sh
203+
./configure --host=mips64 CC="mips64-octeon-linux-gnu-gcc -mabi=64" --with-octeon=/home/dgarske/OCTEON-SDK --enable-des3 --enable-debug --disable-shared CFLAGS="-DWOLFSSL_AES_DIRECT"
204+
make
205+
206+
```
207+
208+
Installing to USB media for use on Octeon Board:
209+
210+
```sh
211+
cp -r src /run/media/dgarske/OCTEON/
212+
cp -r wolfcrypt/ /run/media/dgarske/OCTEON/
213+
cp -r wolfssl /run/media/dgarske/OCTEON/
214+
cp -r certs /run/media/dgarske/OCTEON/
215+
```
216+
217+
218+
## Remote Access
219+
220+
### UART and Telnet
221+
222+
EBB7304_DEFAULT D8-80-39-7D-6D-0B
223+
224+
telnet 192.168.0.114 9760
225+
telnet 192.168.0.114 9761
226+
227+
date 070216502019
228+
229+
230+
## Support
231+
232+
For questions please email wolfSSL at [email protected]

0 commit comments

Comments
 (0)