mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-20 22:30:39 +00:00
samples: Add AliOS as guest launch option
Add sample script launch option to launch AliOS as a guest. And it reuse launch android function due to the same configurations. Tracked-On: projectacrn/acrn-hypervisor#1173 Signed-off-by: Jiangbo Wu <jiangbo.wu@intel.com> Reviewed-by: Binbin Wu <binbin.wu@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com> Signed-off-by: Jiangbo Wu <jiangbo.wu@intel.com>
This commit is contained in:
parent
a7de5a1940
commit
c6b7940bf9
@ -10,7 +10,7 @@ ConditionPathExists=/dev/acrn_vhm
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
RemainAfterExit=false
|
RemainAfterExit=false
|
||||||
ExecStart=/bin/sh /usr/share/acrn/samples/apl-mrb/launch_uos.sh -V 5
|
ExecStart=/bin/sh /usr/share/acrn/samples/apl-mrb/launch_uos.sh -V 6
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -316,6 +316,13 @@ fi
|
|||||||
-B "$kernel_cmdline" $vm_name
|
-B "$kernel_cmdline" $vm_name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function launch_alios()
|
||||||
|
{
|
||||||
|
#AliOS is not Android, only has same configuration currently, reuse launch function
|
||||||
|
|
||||||
|
launch_android "$@"
|
||||||
|
}
|
||||||
|
|
||||||
function help()
|
function help()
|
||||||
{
|
{
|
||||||
echo "Use luanch_uos.sh like that ./launch_uos.sh -V <#>"
|
echo "Use luanch_uos.sh like that ./launch_uos.sh -V <#>"
|
||||||
@ -324,7 +331,8 @@ echo "-V 1 means just launching 1 clearlinux UOS"
|
|||||||
echo "-V 2 means just launching 1 android UOS"
|
echo "-V 2 means just launching 1 android UOS"
|
||||||
echo "-V 3 means launching 1 clearlinux UOS + 1 android UOS"
|
echo "-V 3 means launching 1 clearlinux UOS + 1 android UOS"
|
||||||
echo "-V 4 means launching 2 clearlinux UOSs"
|
echo "-V 4 means launching 2 clearlinux UOSs"
|
||||||
echo "-V 5 means auto check android/linux UOS; if exist, launch it"
|
echo "-V 5 means just launching 1 alios UOS"
|
||||||
|
echo "-V 6 means auto check android/linux/alios UOS; if exist, launch it"
|
||||||
}
|
}
|
||||||
|
|
||||||
launch_type=1
|
launch_type=1
|
||||||
@ -356,9 +364,11 @@ fi
|
|||||||
mkdir -p /data
|
mkdir -p /data
|
||||||
mount /dev/mmcblk1p3 /data
|
mount /dev/mmcblk1p3 /data
|
||||||
|
|
||||||
if [ $launch_type == 5 ]; then
|
if [ $launch_type == 6 ]; then
|
||||||
if [ -f "/data/android/android.img" ]; then
|
if [ -f "/data/android/android.img" ]; then
|
||||||
launch_type=2;
|
launch_type=2;
|
||||||
|
elif [ -f "/data/alios/alios.img" ]; then
|
||||||
|
launch_type=5;
|
||||||
else
|
else
|
||||||
launch_type=1;
|
launch_type=1;
|
||||||
fi
|
fi
|
||||||
@ -392,6 +402,9 @@ case $launch_type in
|
|||||||
sleep 5
|
sleep 5
|
||||||
launch_clearlinux 2 1 "64 448 4" 0x070F00 clearlinux_dup "L2aaG" $debug
|
launch_clearlinux 2 1 "64 448 4" 0x070F00 clearlinux_dup "L2aaG" $debug
|
||||||
;;
|
;;
|
||||||
|
5) echo "Launch alios UOS"
|
||||||
|
launch_alios 1 3 "64 448 8" 0x070F00 alios "AliaaG" $debug
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
umount /data
|
umount /data
|
||||||
|
Loading…
Reference in New Issue
Block a user