]> rtime.felk.cvut.cz Git - hercules2020/jailhouse-build.git/blobdiff - build/rootfs-overlay/etc/init.d/S20jailhouse.sh
Allow building a Debian package from the repository
[hercules2020/jailhouse-build.git] / build / rootfs-overlay / etc / init.d / S20jailhouse.sh
index d3f988cb7237f51601a9750cb5b46b3b228c68ec..dea92ce3fde62c4b2580bb0efbf6750a82d151a7 100644 (file)
@@ -1,19 +1,24 @@
+#!/bin/sh
+
 if ! grep -q -w jailhouse /proc/cmdline; then
     echo "Jailhouse not enabled"
-    return
+    return 1
 fi
 
 case "$1" in
     start)
        printf "Starting Jailhouse: "
-       modprobe jailhouse
-       taskset 1 jailhouse enable /jailhouse/configs/jetson-tx2.cell
+       /sbin/modprobe jailhouse
+       # Switch off Denver cores
+       echo 0 > /sys/devices/system/cpu/cpu1/online
+       echo 0 > /sys/devices/system/cpu/cpu2/online
+       /usr/sbin/jailhouse enable /jailhouse/configs/jetson-tx2.cell
        [ $? = 0 ] && echo "OK" || echo "FAIL"
        ;;
     stop)
        printf "Stopping Jailhouse: "
-       jailhouse disable /jailhouse/configs/jetson-tx2.cell
-       rmmod jailhouse
+       /usr/sbin/jailhouse disable /jailhouse/configs/jetson-tx2.cell
+       /sbin/rmmod jailhouse
        [ $? = 0 ] && echo "OK" || echo "FAIL"
        ;;
 esac