deb-pkg: Delete the pre-condition checks in install the Debian package

These pre-condition checks should be checked when getting board.xml.

Tracked-On: #6688

Signed-off-by: Hu Fenglin <fenglin.hu@intel.com>
This commit is contained in:
Hu Fenglin 2022-01-18 16:50:12 +08:00 committed by acrnsi-robot
parent d78d06c23d
commit 22af2fbb0b
3 changed files with 0 additions and 57 deletions

View File

@ -1,55 +0,0 @@
#!/bin/bash
#* Copyright (c) 2020 Intel Corporation SPDX-License-Identifier: BSD-3-Clause
# preinst script for acrn-hypervisor
acrnnative=$(ls /sys/class/ |grep vhm || true)
if [ -z "$acrnnative" ]
then
echo "You are in ubuntu, let's pre-check whether fit acrn needs"
else
echo "You are in acrn already, no need pre-check "
exit 0
fi
#check vt
vtd=$(ls -al /sys/firmware/acpi/tables |grep DMAR || true)
if [ -z "$vtd" ]
then
echo "Error ! VT-d not enabled!"
echo "This CPU does not support VT-d or it's not enabled through BIOS settings"
fi
vtx=$(lscpu |grep VT-x)
if [ -z "$vtx" ]
then
echo "Error ! VT-x not enabled!"
echo "This CPU does not support VT-x or it's not enabled through BIOS settings"
fi
echo "VT-x/VT-d config is ok"
#check cpu
cputype=$(lscpu |awk '$1 == "Model"'|grep Core || true)
if [ -z "$cputype" ]
then
echo "CPU type not Core"
echo "Xeon Processors are not supported!"
echo "Warning ! ACRN may not support your hardware!"
else
echo "cpu type is ok"
fi
#check memory
totalmemry=200000000000
wholememory=$(cat /proc/meminfo |grep MemTotal:|awk '{print $2}')
if [[ $wholememory -gt $totalmemry ]]
then
echo "Warning ! memory is greater than 16G, please rebuild hypervisor"
echo "if you had rebuild version please ignore"
else
echo "memory is ok, $wholememory"
fi

View File

@ -104,7 +104,6 @@ def create_acrn_deb(board, scenario, version, build_dir):
run_command('chmod +x ./build/acrn_release_deb/etc/grub.d/100_ACRN', cur_dir)
run_command('chmod +x ./build/acrn_release_deb/DEBIAN/postinst', cur_dir)
run_command('sed -i \'s/\r//\' ./build/acrn_release_deb/DEBIAN/postinst', cur_dir)
run_command('cp ./misc/packaging/acrn-hypervisor.preinst ./build/acrn_release_deb/DEBIAN/preinst', cur_dir)
run_command('chmod +x ./build/acrn_release_deb/DEBIAN/preinst', cur_dir)
run_command('sed -i \'s/\r//\' ./build/acrn_release_deb/DEBIAN/preinst', cur_dir)

View File

@ -339,7 +339,6 @@ def create_acrn_deb():
add_cmd_list(cmd_list, 'chmod +x acrn_release_deb/DEBIAN/postinst', cur_dir)
add_cmd_list(cmd_list, 'sed -i \'s/\r//\' acrn_release_deb/DEBIAN/postinst', cur_dir)
add_cmd_list(cmd_list, 'cp acrn-hypervisor.preinst acrn_release_deb/DEBIAN/preinst', cur_dir)
add_cmd_list(cmd_list, 'chmod +x acrn_release_deb/DEBIAN/preinst', cur_dir)
add_cmd_list(cmd_list, 'sed -i \'s/\r//\' acrn_release_deb/DEBIAN/preinst', cur_dir)