ipu: virtio-ipu4 as default IPU DM
Acked-by: Eddie Dong
#!/bin/bash
+ipu_passthrough=0
+
function launch_clearlinux()
{
if [ ! -f "/data/$5/$5.img" ]; then
@@ -54,6 +56,7 @@ echo "0000:00:0f.0" > /sys/bus/pci/devices/0000:00:0f.0/driver/unbind
echo "0000:00:0f.0" > /sys/bus/pci/drivers/pci-stub/bind
boot_ipu_option=""
+if [ $ipu_passthrough == 1 ];then
# for ipu passthrough - ipu device 0:3.0
if [ -d "/sys/bus/pci/devices/0000:00:03.0" ]; then
echo "8086 5a88" > /sys/bus/pci/drivers/pci-stub/new_id
@@ -71,6 +74,9 @@ if [ -d "/sys/bus/pci/devices/0000:00:16.0" ]; then
echo "0000:00:16.0" > /sys/bus/pci/drivers/pci-stub/bind
boot_ipu_option="$boot_ipu_option"" -s 22,passthru,0/16/0 "
fi
+else
+ boot_ipu_option="$boot_ipu_option"" -s 21,virtio-ipu "
+fi
# for sd card passthrough - SDXC/MMC Host Controller 00:1b.0
echo "8086 5aca" > /sys/bus/pci/drivers/pci-stub/new_id
@@ -211,6 +217,7 @@ echo "0000:00:18.0" > /sys/bus/pci/devices/0000:00:18.0/driver/unbind
echo "0000:00:18.0" > /sys/bus/pci/drivers/pci-stub/bind
boot_ipu_option=""
+if [ $ipu_passthrough == 1 ];then
# for ipu passthrough - ipu device 0:3.0
if [ -d "/sys/bus/pci/devices/0000:00:03.0" ]; then
echo "8086 5a88" > /sys/bus/pci/drivers/pci-stub/new_id
@@ -228,6 +235,9 @@ if [ -d "/sys/bus/pci/devices/0000:00:16.0" ]; then
echo "0000:00:16.0" > /sys/bus/pci/drivers/pci-stub/bind
boot_ipu_option="$boot_ipu_option"" -s 22,passthru,0/16/0 "
fi
+else
+ boot_ipu_option="$boot_ipu_option"" -s 21,virtio-ipu "
+fi
#for memsize setting
memsize=`cat /proc/meminfo|head -n 1|awk '{print $2}'`
