]> rtime.felk.cvut.cz Git - jailhouse-test.git/blob - qemu-launch-scripts/update-inmates-and-overlay.sh
qemu: Change update-script to follow the ferret pkg changes also,
[jailhouse-test.git] / qemu-launch-scripts / update-inmates-and-overlay.sh
1 #!/bin/bash
2
3 set -e
4
5 if [ -z $ARCH_IMAGE]; then
6         ARCH_IMAGE="x86_pentium"
7 fi
8
9 START_DIR=$(pwd)
10 echo "going inside Jailhouse dir for to remake it..."
11 cd ../jailhouse
12 make clean && make modules
13
14 echo "Copying inmates to overlay dir..."
15 cp ./inmates/demos/x86/*.bin ../buildroot-overlay/jailhouse/inmates/
16 cp ./configs/*.cell ../buildroot-overlay/jailhouse/configs/
17
18 echo "remake bootstrap and objcopy it to overlay.."
19 cd ../build/l4
20 make hello
21 make benchmarks
22
23 cd l4re/pkg/bootstrap_custom
24 objcopy -O binary ./server/src/OBJ-$ARCH_IMAGE/bootstrap_hello.elf $START_DIR/../buildroot-overlay/jailhouse/bootstrap_hello-jh.bin
25 objcopy -O binary ./server/src/OBJ-$ARCH_IMAGE/bootstrap_ferret-bench.elf $START_DIR/../buildroot-overlay/jailhouse/bootstrap_ferret-bench-jh.bin
26
27 echo "Update rootfs..."
28 cd $START_DIR/../build/buildroot/
29 make
30
31 echo "done!"