Skip to content

Commit c6b7940

Browse files
Jiangbo-Wlijinxia
authored andcommitted
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: #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>
1 parent a7de5a1 commit c6b7940

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

devicemodel/samples/apl-mrb/acrn_guest.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ConditionPathExists=/dev/acrn_vhm
1010
[Service]
1111
Type=simple
1212
RemainAfterExit=false
13-
ExecStart=/bin/sh /usr/share/acrn/samples/apl-mrb/launch_uos.sh -V 5
13+
ExecStart=/bin/sh /usr/share/acrn/samples/apl-mrb/launch_uos.sh -V 6
1414

1515
[Install]
1616
WantedBy=multi-user.target

devicemodel/samples/apl-mrb/launch_uos.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,13 @@ fi
316316
-B "$kernel_cmdline" $vm_name
317317
}
318318

319+
function launch_alios()
320+
{
321+
#AliOS is not Android, only has same configuration currently, reuse launch function
322+
323+
launch_android "$@"
324+
}
325+
319326
function help()
320327
{
321328
echo "Use luanch_uos.sh like that ./launch_uos.sh -V <#>"
@@ -324,7 +331,8 @@ echo "-V 1 means just launching 1 clearlinux UOS"
324331
echo "-V 2 means just launching 1 android UOS"
325332
echo "-V 3 means launching 1 clearlinux UOS + 1 android UOS"
326333
echo "-V 4 means launching 2 clearlinux UOSs"
327-
echo "-V 5 means auto check android/linux UOS; if exist, launch it"
334+
echo "-V 5 means just launching 1 alios UOS"
335+
echo "-V 6 means auto check android/linux/alios UOS; if exist, launch it"
328336
}
329337

330338
launch_type=1
@@ -356,9 +364,11 @@ fi
356364
mkdir -p /data
357365
mount /dev/mmcblk1p3 /data
358366

359-
if [ $launch_type == 5 ]; then
367+
if [ $launch_type == 6 ]; then
360368
if [ -f "/data/android/android.img" ]; then
361369
launch_type=2;
370+
elif [ -f "/data/alios/alios.img" ]; then
371+
launch_type=5;
362372
else
363373
launch_type=1;
364374
fi
@@ -392,6 +402,9 @@ case $launch_type in
392402
sleep 5
393403
launch_clearlinux 2 1 "64 448 4" 0x070F00 clearlinux_dup "L2aaG" $debug
394404
;;
405+
5) echo "Launch alios UOS"
406+
launch_alios 1 3 "64 448 8" 0x070F00 alios "AliaaG" $debug
407+
;;
395408
esac
396409

397410
umount /data

0 commit comments

Comments
 (0)