Skip to content

Commit 3cab926

Browse files
mgcaolijinxia
authored andcommitted
DM: add param: -V 5 to auto check/boot UOS image
it can auto check android image, if exists, then launch it; if not, it will try to luanch clearlinux. it can be used by acrn_guest.service to auto boot UOS. Signed-off-by: Minggui Cao <minggui.cao@intel.com> Reviewed-by: Binbin Wu <binbin.wu@intel.com>
1 parent 45d6f72 commit 3cab926

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

devicemodel/samples/apl-mrb/launch_uos.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ echo "-V 1 means just launching 1 clearlinux UOS"
306306
echo "-V 2 means just launching 1 android UOS"
307307
echo "-V 3 means launching 1 clearlinux UOS + 1 android UOS"
308308
echo "-V 4 means launching 2 clearlinux UOSs"
309+
echo "-V 5 means auto check android/linux UOS; if exist, launch it"
309310
}
310311

311312
launch_type=1
@@ -332,6 +333,14 @@ done
332333
mkdir -p /data
333334
mount /dev/mmcblk1p3 /data
334335

336+
if [ $launch_type == 5 ]; then
337+
if [ -f "/data/android/android.img" ]; then
338+
launch_type=2;
339+
else
340+
launch_type=1;
341+
fi
342+
fi
343+
335344
# make sure there is enough 2M hugepages in the pool
336345
echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
337346

0 commit comments

Comments
 (0)