Skip to content

Commit a7de5a1

Browse files
Jiangbo-Wlijinxia
authored andcommitted
samples: Add tap name as launch function parameter
launch two clearlinux will use the same 'LaaG' as tap interface name. Add tap name as parameter that will meet two UOS using different tap interface. Tracked-On: #1194 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 bcfe447 commit a7de5a1

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

devicemodel/samples/apl-mrb/launch_uos.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ vm_name=vm$1
1515
vm_name=${vm_name}-${mac:9:8}
1616

1717
# create a unique tap device for each VM
18-
tap=tap_LaaG
18+
tap=tap_$6
1919
tap_exist=$(ip a | grep acrn_"$tap" | awk '{print $1}')
2020
if [ "$tap_exist"x != "x" ]; then
2121
echo "tap device existed, reuse acrn_$tap"
@@ -96,7 +96,7 @@ if [ "$setup_mem" != "" ];then
9696
fi
9797

9898
boot_dev_flag=",b"
99-
if [ $6 == 1 ];then
99+
if [ $7 == 1 ];then
100100
boot_image_option="--vsbl /usr/share/acrn/bios/VSBL_debug.bin"
101101
else
102102
boot_image_option="--vsbl /usr/share/acrn/bios/VSBL.bin"
@@ -146,7 +146,7 @@ vm_name=vm$1
146146
vm_name=${vm_name}-${mac:9:8}
147147

148148
# create a unique tap device for each VM
149-
tap=tap_AaaG
149+
tap=tap_$6
150150
tap_exist=$(ip a | grep acrn_"$tap" | awk '{print $1}')
151151
if [ "$tap_exist"x != "x" ]; then
152152
echo "tap device existed, reuse acrn_$tap"
@@ -265,7 +265,7 @@ kernel_cmdline_generic="maxcpus=$2 nohpet tsc=reliable intel_iommu=off \
265265
i915.enable_hangcheck=0 use_nuclear_flip=1 i915.enable_guc_submission=0 i915.enable_guc=0"
266266

267267
boot_dev_flag=",b"
268-
if [ $6 == 1 ];then
268+
if [ $7 == 1 ];then
269269
boot_image_option="--vsbl /usr/share/acrn/bios/VSBL_debug.bin"
270270
else
271271
boot_image_option="--vsbl /usr/share/acrn/bios/VSBL.bin"
@@ -377,20 +377,20 @@ done
377377

378378
case $launch_type in
379379
1) echo "Launch clearlinux UOS"
380-
launch_clearlinux 1 3 "64 448 8" 0x070F00 clearlinux $debug
380+
launch_clearlinux 1 3 "64 448 8" 0x070F00 clearlinux "LaaG" $debug
381381
;;
382382
2) echo "Launch android UOS"
383-
launch_android 1 3 "64 448 8" 0x070F00 android $debug
383+
launch_android 1 3 "64 448 8" 0x070F00 android "AaaG" $debug
384384
;;
385385
3) echo "Launch clearlinux UOS + android UOS"
386-
launch_android 1 2 "64 448 4" 0x00000C android $debug &
386+
launch_android 1 2 "64 448 4" 0x00000C android "AaaG" $debug &
387387
sleep 5
388-
launch_clearlinux 2 1 "64 448 4" 0x070F00 clearlinux $debug
388+
launch_clearlinux 2 1 "64 448 4" 0x070F00 clearlinux "LaaG" $debug
389389
;;
390390
4) echo "Launch two clearlinux UOSs"
391-
launch_clearlinux 1 1 "64 448 4" 0x00000C clearlinux $debug &
391+
launch_clearlinux 1 1 "64 448 4" 0x00000C clearlinux "L1aaG" $debug &
392392
sleep 5
393-
launch_clearlinux 2 1 "64 448 4" 0x070F00 clearlinux_dup $debug
393+
launch_clearlinux 2 1 "64 448 4" 0x070F00 clearlinux_dup "L2aaG" $debug
394394
;;
395395
esac
396396

0 commit comments

Comments
 (0)