Skip to content

Commit 6b26766

Browse files
binbinwu1lijinxia
authored andcommitted
dm: remove -U option in launch script.
On SBL platform, UOS bsp always starts from realmode, which requires the support of vSBL. Boot kernel directly by -U option is no longer supported. Remove -U option in launch script. Signed-off-by: Binbin Wu <binbin.wu@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Edwin Zhai <edwin.zhai@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent 02f0ecd commit 6b26766

File tree

1 file changed

+17
-73
lines changed

1 file changed

+17
-73
lines changed

devicemodel/samples/apl-mrb/launch_uos.sh

Lines changed: 17 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,6 @@ if [[ "$result" != "" ]]; then
3838
exit
3939
fi
4040

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-
5041
#for VT-d device setting
5142
modprobe pci_stub
5243
echo "8086 5aa8" > /sys/bus/pci/drivers/pci-stub/new_id
@@ -98,16 +89,11 @@ if [ "$setup_mem" != "" ];then
9889
mem_size=$setup_mem
9990
fi
10091

101-
boot_image_option="-k /home/root/$5/bzImage"
102-
boot_dev_flag=""
103-
92+
boot_dev_flag=",b"
10493
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"
11197
fi
11298

11399

@@ -182,13 +168,6 @@ if [[ "$result" != "" ]]; then
182168
exit
183169
fi
184170

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-
192171
#for VT-d device setting
193172
modprobe pci_stub
194173
echo "8086 5aa8" > /sys/bus/pci/drivers/pci-stub/new_id
@@ -260,30 +239,18 @@ if [ "$setup_mem" != "" ];then
260239
mem_size=$setup_mem
261240
fi
262241

263-
boot_image_option="-k /home/root/$5/boot.img-kernel -r /home/root/$5/boot.img-ramdisk.gz "
264-
boot_dev_flag=""
265242
kernel_cmdline_generic="maxcpus=$2 nohpet tsc=reliable intel_iommu=off \
266243
androidboot.serialno=$ser \
267244
i915.enable_rc6=1 i915.enable_fbc=1 i915.enable_guc_loading=0 i915.avail_planes_per_pipe=$4 \
268245
i915.enable_hangcheck=0 use_nuclear_flip=1 i915.enable_initial_modeset=1 "
269246

247+
boot_dev_flag=",b"
270248
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"
278250
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"
286252
fi
253+
kernel_cmdline="$kernel_cmdline_generic"
287254

288255
: '
289256
select right virtual slots for acrn_dm:
@@ -333,12 +300,7 @@ fi
333300

334301
function help()
335302
{
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 <#>"
342304
echo "The option -V means the UOSs group to be launched by vsbl as below"
343305
echo "-V 1 means just launching 1 clearlinux UOS"
344306
echo "-V 2 means just launching 1 android UOS"
@@ -349,12 +311,10 @@ echo "-V 4 means launching 2 clearlinux UOSs"
349311
launch_type=1
350312
debug=0
351313

352-
while getopts "U:V:M:hd" opt
314+
while getopts "V:M:hd" opt
353315
do
354316
case $opt in
355-
U) launch_type=$OPTARG
356-
;;
357-
V) launch_type=$[$OPTARG+4]
317+
V) launch_type=$[$OPTARG]
358318
;;
359319
M) setup_mem=$OPTARG
360320
;;
@@ -377,36 +337,20 @@ echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
377337

378338
case $launch_type in
379339
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
381341
;;
382342
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
384344
;;
385345
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 &
387347
sleep 5
388-
launch_clearlinux 2 1 "64 448 4" 0x070F00 clearlinux 0
348+
launch_clearlinux 2 1 "64 448 4" 0x070F00 clearlinux $debug
389349
;;
390350
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 &
408352
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
410354
;;
411355
esac
412356

0 commit comments

Comments
 (0)