Commit f3276962 authored by 吴洲洋's avatar 吴洲洋

update build script

parent 54339cbc
...@@ -7,12 +7,12 @@ vpp: ...@@ -7,12 +7,12 @@ vpp:
ueip: 192.169.0.0 ueip: 192.169.0.0
ueIPPrefix: 24 ueIPPrefix: 24
snatInter: ens32 snatInter: ens32
snatIP: 192.168.2.239 snatIP: 192.168.2.78
vppHost: ens40 vppHost: ens35
gtpu_entry: ens38 gtpu_entry: ens33
gtpu_export: ens39 gtpu_export: ens34
cpu: 3f cpu: 3f
n4: n4:
smf: 192.168.199.18 smf: 192.168.2.63
upf: 192.168.2.239 upf: 192.168.2.78
logSize: 100 logSize: 100
No preview for this file type
...@@ -23,26 +23,10 @@ function pre_install(){ ...@@ -23,26 +23,10 @@ function pre_install(){
function vpp(){ function vpp(){
echo "start build vpp" echo "start build vpp"
cd $VPPPATH cd $VPPPATH
clear_all make rebuild
make pkg-deb-debug
make_package debug
echo "build vpp success" echo "build vpp success"
cp $base/src/vppe/build-root/install-vpp_debug-native/vpp/bin/* /usr/bin
echo "unpack buptvpp.tar.gz start..." cp -r $base/src/vppe/build-root/install-vpp_debug-native/vpp/lib/vpp_plugins /usr/lib/x86_64-linux-gnu
sudo tar -zxvf $VPPINSTALL/buptvppe.tar.gz -C $VPPINSTALL > /dev/null 2>&1;
echo "unpack buptvpp.tar.gz finished!!!"
sleep 1;
#install
echo "install buptvppe start..."
sudo dpkg -i $VPPINSTALL/build-root/*.deb
sudo systemctl disable vpp;
sudo systemctl stop vpp
#rm install package
sudo rm -rf $VPPINSTALL
clear_all
sleep 1;
echo "install buptvppe finished!!!"
return 0 return 0
......
...@@ -11,7 +11,7 @@ arp="$base/src/setuniarp" ...@@ -11,7 +11,7 @@ arp="$base/src/setuniarp"
config_system="" config_system=""
VPPPROCESS="vpp" VPPPROCESS="vpp"
VPPCMD="/usr/bin/vpp -c /etc/vpp/startup_debug.conf" VPPCMD="/usr/bin/vpp -c /opt/5gc/startup_debug.conf"
N4PROCESS="main" N4PROCESS="main"
N4PATH="$base/install/n4" N4PATH="$base/install/n4"
...@@ -34,14 +34,13 @@ DPDK_ENTRY="" ...@@ -34,14 +34,13 @@ DPDK_ENTRY=""
DPDK_ENTRY_PCI="" DPDK_ENTRY_PCI=""
DPDK_EXPORT_PCI="" DPDK_EXPORT_PCI=""
DRIVE="" DRIVE=""
CPUNUMBER=""
function init_configure(){ function init_configure(){
yaml="$1" yaml="$1"
# vpp # vpp
mkdir -p /opt/5gc mkdir -p /opt/5gc
cp -r $configure/template /opt/5gc cp -r $configure/template /opt/5gc
$base/plugin/configure -i $yaml -o /opt/5gc $base/plugin/configure -i $yaml -o /opt/5gc
cp /opt/5gc/config_system.sh /opt/5gc
cp /opt/5gc/startup_debug.conf /etc/vpp
cp $base/plugin/yq $current cp $base/plugin/yq $current
# arp # arp
UEIP=$($current/yq r $yaml vpp.ip_link.ueip) UEIP=$($current/yq r $yaml vpp.ip_link.ueip)
...@@ -57,6 +56,7 @@ function init_configure(){ ...@@ -57,6 +56,7 @@ function init_configure(){
VPPHOST=$($current/yq r $yaml vpp.ip_link.vppHost) VPPHOST=$($current/yq r $yaml vpp.ip_link.vppHost)
DPDK_EXPORT=$($current/yq r $yaml vpp.ip_link.gtpu_export) DPDK_EXPORT=$($current/yq r $yaml vpp.ip_link.gtpu_export)
DPDK_ENTRY=$($current/yq r $yaml vpp.ip_link.gtpu_entry) DPDK_ENTRY=$($current/yq r $yaml vpp.ip_link.gtpu_entry)
CPUNUMBER=$($current/yq r $yaml vpp.ip_link.cpu)
rm -rf $current/yq rm -rf $current/yq
} }
...@@ -66,6 +66,7 @@ function start_vpp() { ...@@ -66,6 +66,7 @@ function start_vpp() {
install_dpdk_kmod install_dpdk_kmod
run_nat run_nat
$base/plugin/interreput -i $CPUNUMBER
echo Y | sudo tee /sys/module/vfio/parameters/enable_unsafe_noiommu_mode echo Y | sudo tee /sys/module/vfio/parameters/enable_unsafe_noiommu_mode
$cmd >/dev/null 2>&1 & $cmd >/dev/null 2>&1 &
sleep 1s sleep 1s
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment