-
Notifications
You must be signed in to change notification settings - Fork 15
Baikal T1 Deployment
Follow the bellow instructions for deployment on Baikal-T1 boards.
From the prpl-hypervisor folder created with git clone command, go to the platform corresponding to your board. The available platform (folder) is:
- platform/baikal_t1_board;
In the chosen folder, use the make command to compile the hypervisor with its default configuration, using the MIPS-MTI toolchain. This process will generate the firmware.bin file. This file contains the hypervisor and bare-metal guests. Example:
~/prplHypervisor/platform/baikal_t1_board$: make
gcc -DBAIKAL_T1 -o genconf ../cfg_reader/genconf.c -lconfig
#execute first and exit in case of errors
./genconf cfg/sample-ping-pong.cfg baikal-t1 || (exit 1)
ping pong
#execute and export to a makefile variable the ouput of the script
mipsel-unknown-linux-gnu-gcc -DCPU_ID="P5600" -DCPU_ARCH="Baikal-T1 board." -DCPU_FREQ=850000000 -EL -O2 -mips32r2 -Wall -Wa,-mvirt -mno-check-zero-division -msoft-float -fshort-double -c -ffreestanding -nostdlib -fomit-frame-pointer -G 0 -DHYPVERSION="v0.12.111 (g662ee0a)" -DBAIKAL_T1 -I../../arch/mips/baikal-t1/include -I../../arch/mips/common/include -I../..//platform/include -I../../sys/lib/include -I../../sys/kernel/include -I../../platform/baikal_t1_board/include -I../..//include \
../../sys/lib/libc.c \
../../sys/lib/linkedlist.c \
../../sys/lib/malloc.c \
../../sys/lib/queue.c
...
mipsel-unknown-linux-gnu-size ../../apps/pong/pong.elf
text data bss dec hex filename
15396 16 3472 18884 49c4 ../../apps/pong/pong.elf
make[1]: Leaving directory '/home/sumatra/hyper/prpl-hypervisor/bare-metal-apps/platform/baikal_t1_board'
0+1 registros de entrada
1+0 registros de saída
65536 bytes (66 kB, 64 KiB) copied, 0,000231322 s, 283 MB/s
0+1 registros de entrada
1+0 registros de saída
32768 bytes (33 kB, 32 KiB) copied, 0,000154802 s, 212 MB/s
0+1 registros de entrada
1+0 registros de saída
32768 bytes (33 kB, 32 KiB) copied, 0,000142737 s, 230 MB/s
Note: See the main Makefile in your platform directory. You may want to modify the input configuration file (CFG_FILE) or CROSS_COMPILER. Example:
CFG_FILE = cfg/sample-ping-pong.cfg
# CROSS Compiler
CROSS_COMPILER = mipsel-unknown-linux-gnu-
The TFTP protocol will be used to upload the firmware to the Baikal board. This tutorial considers that you already have a TFTP server on your host machine. If you need to install a TFTP server, you may want to follow one of the suggestions bellow:
- Install, configure and test TFTP server in Ubuntu
- Installing and testing TFTP server in Ubuntu/Debian
Use the Minicom to connect through Baikal's Serial port to have access to the u-boot. You should see the following output (choose the option "U-Boot console"):
U-Boot 2014.10-g3084ff7 / SDK 3.00.06 (Apr 20 2016 - 12:12:38)
CPU: MIPS32 P5600 @ 850 MHz (Rev 1.4)
FPU: Present
Cores: 2 (running on CPU0)
Timer: 425 MHz
ECC: L1 L2 (80800ff0)
PLLs: CPU: 850MHz SATA:1100MHz ETH: 625MHz
PCIE:1000MHz DDR3: 400MHz AXI: 425MHz
Board: Baikal-T BFK
Watchdog enabled
I2C: ready
SPI: ready
DRAM: 128 MiB
NVRAM: ready
Rev: 1.6
S/N: 1609050921161110305
SIMD: ready
In: serial
Out: serial
Err: serial
Net: dwmac.bf05e000, dwmac.bf060000
--== BFK boot menu ==--
Boot 1. Boot from internal flash (ramdisk)
Boot 2. Boot from HDD/USB disk (sda1)
U-Boot console
Press UP/DOWN to move, ENTER to select
BAIKAL #
Make sure that the file firwmare.bin is in the TFTP server's folder. Then, upload it to the board as described bellow:
BAIKAL #tftp 0xa0000000 192.168.68.1:firmware.bin
dwmac.bf05e000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
dwmac.bf05e000: No link.
Speed: 100, full duplex
Using dwmac.bf060000 device
TFTP from server 192.168.68.1; our IP address is 192.168.68.230
Filename 'firmware.bin'.
Load address: 0xa0000000
Loading: ###
381.8 KiB/s
done
Bytes transferred = 131072 (20000 hex)
Finally, execute the hypervisor:
BAIKAL #go 0x80002000
You should see the following output on Minicom:
===========================================================
prplHypervsior v0.12.109 (g0c7453e) [May 3 2017, 12:39:08]
Copyright (c) 2016, prpl Foundation
===========================================================
CPU Core: P5600
Board: Baikal-T1 board.
System Clock: 850MHz
Heap Size: 41Kbytes
Scheduler: 5ms
Guest Tick: 1ms
VMs: 2
Initializing Virtual Machines.
Configuring ping VM starting at 0x80010000 RAM address.
Configuring pong VM starting at 0x80018000 RAM address.
P5600 core in Vectored Interrupt Mode.
Inter-VM communication hypercalls registered.
UART driver enabled.
Starting hypervisor execution.
Measuring Inter VM communication latency.
Target VCPU not initialized.
Target VCPU not initialized.
Wait...
Round trip latency for messages 64 bytes long.
Average 197.96 us
Worst 213 us
Best 198 us
One way latency for messages 64 bytes long.
Average 97.99 us
Worst 113 us
Best 98 us
...