@@ -38,15 +38,6 @@ if [[ "$result" != "" ]]; then
38
38
exit
39
39
fi
40
40
41
- # extract clearlinux bzImage from clearlinux virtual disk
42
- if [ $6 == 0 ]; then
43
- mkdir -p /home/root/$5
44
- mkdir -p /mnt/loop
45
- mount -o loop,offset=1048576 /data/$5 /$5 .img /mnt/loop
46
- cp /mnt/loop/bzImage /home/root/$5 /bzImage
47
- umount /mnt/loop
48
- fi
49
-
50
41
# for VT-d device setting
51
42
modprobe pci_stub
52
43
echo " 8086 5aa8" > /sys/bus/pci/drivers/pci-stub/new_id
@@ -98,16 +89,11 @@ if [ "$setup_mem" != "" ];then
98
89
mem_size=$setup_mem
99
90
fi
100
91
101
- boot_image_option=" -k /home/root/$5 /bzImage"
102
- boot_dev_flag=" "
103
-
92
+ boot_dev_flag=" ,b"
104
93
if [ $6 == 1 ]; then
105
- boot_dev_flag=" ,b"
106
- if [ $7 == 1 ]; then
107
- boot_image_option=" --vsbl /usr/share/acrn/bios/VSBL_debug.bin"
108
- else
109
- boot_image_option=" --vsbl /usr/share/acrn/bios/VSBL.bin"
110
- fi
94
+ boot_image_option=" --vsbl /usr/share/acrn/bios/VSBL_debug.bin"
95
+ else
96
+ boot_image_option=" --vsbl /usr/share/acrn/bios/VSBL.bin"
111
97
fi
112
98
113
99
@@ -182,13 +168,6 @@ if [[ "$result" != "" ]]; then
182
168
exit
183
169
fi
184
170
185
- # extract kernel and ramdisk from android disk image
186
- if [ $6 == 0 ]; then
187
- mkdir -p /home/root/$5
188
- dd if=/data/$5 /$5 .img of=/home/root/$5 /boot.img skip=63488 bs=512 count=81920
189
- split_bootimg.pl /home/root/$5 /boot.img
190
- fi
191
-
192
171
# for VT-d device setting
193
172
modprobe pci_stub
194
173
echo " 8086 5aa8" > /sys/bus/pci/drivers/pci-stub/new_id
@@ -260,30 +239,18 @@ if [ "$setup_mem" != "" ];then
260
239
mem_size=$setup_mem
261
240
fi
262
241
263
- boot_image_option=" -k /home/root/$5 /boot.img-kernel -r /home/root/$5 /boot.img-ramdisk.gz "
264
- boot_dev_flag=" "
265
242
kernel_cmdline_generic=" maxcpus=$2 nohpet tsc=reliable intel_iommu=off \
266
243
androidboot.serialno=$ser \
267
244
i915.enable_rc6=1 i915.enable_fbc=1 i915.enable_guc_loading=0 i915.avail_planes_per_pipe=$4 \
268
245
i915.enable_hangcheck=0 use_nuclear_flip=1 i915.enable_initial_modeset=1 "
269
246
247
+ boot_dev_flag=" ,b"
270
248
if [ $6 == 1 ]; then
271
- boot_dev_flag=" ,b"
272
- if [ $7 == 1 ]; then
273
- boot_image_option=" --vsbl /usr/share/acrn/bios/VSBL_debug.bin"
274
- else
275
- boot_image_option=" --vsbl /usr/share/acrn/bios/VSBL.bin"
276
- fi
277
- kernel_cmdline=" $kernel_cmdline_generic "
249
+ boot_image_option=" --vsbl /usr/share/acrn/bios/VSBL_debug.bin"
278
250
else
279
- kernel_cmdline=" $kernel_cmdline_generic " " initrd=0x48800000 root=/dev/ram0 rw rootwait \
280
- console=ttyS0 no_timer_check log_buf_len=16M consoleblank=0 reboot_panic=p,w \
281
- relative_sleep_states=1 vga=current \
282
- androidboot.hardware=gordon_peak_acrn firmware_class.path=/vendor/firmware \
283
- sys.init_log_level=7 drm.atomic=1 i915.nuclear_pageflip=1 \
284
- i915.modeset=1 drm.vblankoffdelay=1 i915.fastboot=1 \
285
- i915.hpd_sense_invert=0x7"
251
+ boot_image_option=" --vsbl /usr/share/acrn/bios/VSBL.bin"
286
252
fi
253
+ kernel_cmdline=" $kernel_cmdline_generic "
287
254
288
255
: '
289
256
select right virtual slots for acrn_dm:
333
300
334
301
function help()
335
302
{
336
- echo " Use luanch_UOS.sh like that ./launch_UOS.sh -U/-V <#>"
337
- echo " The option -U means the UOSs group to be launched as below"
338
- echo " -U 1 means just launching 1 clearlinux UOS"
339
- echo " -U 2 means just launching 1 android UOS"
340
- echo " -U 3 means launching 1 clearlinux UOS + 1 android UOS"
341
- echo " -U 4 means launching 2 clearlinux UOSs"
303
+ echo " Use luanch_uos.sh like that ./launch_uos.sh -V <#>"
342
304
echo " The option -V means the UOSs group to be launched by vsbl as below"
343
305
echo " -V 1 means just launching 1 clearlinux UOS"
344
306
echo " -V 2 means just launching 1 android UOS"
@@ -349,12 +311,10 @@ echo "-V 4 means launching 2 clearlinux UOSs"
349
311
launch_type=1
350
312
debug=0
351
313
352
- while getopts " U: V:M:hd" opt
314
+ while getopts " V:M:hd" opt
353
315
do
354
316
case $opt in
355
- U) launch_type=$OPTARG
356
- ;;
357
- V) launch_type=$[$OPTARG +4]
317
+ V) launch_type=$[$OPTARG ]
358
318
;;
359
319
M) setup_mem=$OPTARG
360
320
;;
@@ -377,36 +337,20 @@ echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
377
337
378
338
case $launch_type in
379
339
1) echo " Launch clearlinux UOS"
380
- launch_clearlinux 1 3 " 64 448 8" 0x070F00 clearlinux 0
340
+ launch_clearlinux 1 3 " 64 448 8" 0x070F00 clearlinux $debug
381
341
;;
382
342
2) echo " Launch android UOS"
383
- launch_android 1 3 " 64 448 8" 0x070F00 android 0
343
+ launch_android 1 3 " 64 448 8" 0x070F00 android $debug
384
344
;;
385
345
3) echo " Launch clearlinux UOS + android UOS"
386
- launch_android 1 2 " 64 448 4" 0x00000C android 0 &
346
+ launch_android 1 2 " 64 448 4" 0x00000C android $debug &
387
347
sleep 5
388
- launch_clearlinux 2 1 " 64 448 4" 0x070F00 clearlinux 0
348
+ launch_clearlinux 2 1 " 64 448 4" 0x070F00 clearlinux $debug
389
349
;;
390
350
4) echo " Launch two clearlinux UOSs"
391
- launch_clearlinux 1 1 " 64 448 4" 0x00000C clearlinux 0 &
392
- sleep 5
393
- launch_clearlinux 2 1 " 64 448 4" 0x070F00 clearlinux_dup 0
394
- ;;
395
- 5) echo " Launch clearlinux UOS"
396
- launch_clearlinux 1 3 " 64 448 8" 0x070F00 clearlinux 1 $debug
397
- ;;
398
- 6) echo " Launch android UOS"
399
- launch_android 1 3 " 64 448 8" 0x070F00 android 1 $debug
400
- ;;
401
- 7) echo " Launch clearlinux UOS + android UOS"
402
- launch_android 1 2 " 64 448 4" 0x00000C android 1 $debug &
403
- sleep 5
404
- launch_clearlinux 2 1 " 64 448 4" 0x070F00 clearlinux 1 $debug
405
- ;;
406
- 8) echo " Launch two clearlinux UOSs"
407
- launch_clearlinux 1 1 " 64 448 4" 0x00000C clearlinux 1 $debug &
351
+ launch_clearlinux 1 1 " 64 448 4" 0x00000C clearlinux $debug &
408
352
sleep 5
409
- launch_clearlinux 2 1 " 64 448 4" 0x070F00 clearlinux_dup 1 $debug
353
+ launch_clearlinux 2 1 " 64 448 4" 0x070F00 clearlinux_dup $debug
410
354
;;
411
355
esac
412
356
0 commit comments