Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-UPF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-UPF
Commits
d65ecf8c
Commit
d65ecf8c
authored
Jul 13, 2021
by
wangyongshou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
integrate upf:vpp pkg
parent
6635b5ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
13 deletions
+62
-13
scripts/build_upf.sh
scripts/build_upf.sh
+62
-13
No files found.
scripts/build_upf.sh
View file @
d65ecf8c
...
...
@@ -9,8 +9,32 @@ configure="$base/etc"
N4SRC
=
"
$base
/src/upf-n4/cmd/upf/main"
N4PATH
=
"
$base
/install/n4"
UPFINSTALL
=
"
$base
/install/upf"
function
pre_create
(){
if
[
!
-d
$VPPINSTALL
]
;
then
sudo mkdir
-p
$VPPINSTALL
fi
if
[
!
-d
$UPFINSTALL
]
;
then
sudo mkdir
-p
$UPFINSTALL
fi
if
[
!
-d
$UPFINSTALL
/pkg
]
;
then
sudo mkdir
-p
$UPFINSTALL
/pkg
fi
if
[
!
-d
$UPFINSTALL
/etc
]
;
then
sudo mkdir
-p
$UPFINSTALL
/etc
fi
if
[
!
-d
$UPFINSTALL
/scripts
]
;
then
sudo mkdir
-p
$UPFINSTALL
/scripts
fi
}
function
pre_install
(){
sudo
apt-get
install
sqlite
sudo
apt-get
install
net-tools
...
...
@@ -35,7 +59,7 @@ function vpp(){
}
function
make_package
()
function
make_
vpp_
package
()
{
PKG_NAME
=
"buptvppe.tar.gz"
...
...
@@ -64,29 +88,42 @@ function make_package()
return
fi
#step 2: pkg
cd
$VPPPATH
sudo tar
-zcvf
$PKG_NAME
${
BUILD_ROOT
}
/
*
.deb
>
/dev/null 2>&1
;
sudo rm
-rf
$VPPINSTALL
sudo mkdir
-p
$VPPINSTALL
#vpp_install,tmp
mkdir
-p
vpp_install
mv
${
BUILD_ROOT
}
/
*
.deb vpp_install
sudo tar
-zcvf
$PKG_NAME
vpp_install/
*
.deb
>
/dev/null 2>&1
;
sudo mv
$VPPPATH
/
$PKG_NAME
$VPPINSTALL
echo
"vpp buptvppe.tar.gz finished!!!"
#clear
rm
-rf
$VPPPATH
/
${
BUILD_ROOT
}
/.ccache
;
if
[
-f
$UPFINSTALL
/pkg/
$PKG_NAME
]
;
then
rm
-f
$UPFINSTALL
/pkg/
$PKG_NAME
fi
if
[
-d
$UPFINSTALL
/pkg/vpp_install
]
;
then
rm
-rf
$UPFINSTALL
/pkg/vpp_install
fi
cp
-f
$VPPINSTALL
/
$PKG_NAME
$UPFINSTALL
/pkg
echo
"vpp buptvppe.tar.gz finished!!!"
#clear
find
$VPPPATH
/
${
BUILD_ROOT
}
/
-name
'*.c'
-type
f
-print
-exec
rm
-rf
{}
\
>
/dev/null 2>&1
;
find
$VPPPATH
/
${
BUILD_ROOT
}
/
-name
'*.o'
-type
f
-print
-exec
rm
-rf
{}
\
>
/dev/null 2>&1
;
find
$VPPPATH
/
${
BUILD_ROOT
}
/
-name
'*.o.cmd'
-type
f
-print
-exec
rm
-rf
{}
>
/dev/null 2>&1
\;
find
$VPPPATH
/
${
BUILD_ROOT
}
/
-name
'*.debug'
-type
f
-print
-exec
rm
-rf
{}
>
/dev/null 2>&1
\;
find
$VPPPATH
/
${
BUILD_ROOT
}
/
-name
'*.api.json'
-type
f
-print
-exec
rm
-rf
{}
>
/dev/null 2>&1
\;
rm
-rf
$VPPPATH
/
${
BUILD_ROOT
}
/.ccache
;
rm
-rf
$VPPPATH
/
${
BUILD_ROOT
}
/build-test
;
rm
-rf
$VPPPATH
/
${
BUILD_ROOT
}
/
*
.deb
;
rm
-rf
$VPPPATH
/
${
BUILD_ROOT
}
/build-vpp_debug-native
;
rm
-rf
$VPPPATH
/
${
BUILD_ROOT
}
/install-vpp_debug-native
;
rm
-rf
$VPPPATH
/
${
BUILD_ROOT
}
/build-vpp-native
;
rm
-rf
$VPPPATH
/
${
BUILD_ROOT
}
/install-vpp-native
;
rm
-rf
$VPPPATH
/
${
BUILD_ROOT
}
/install-vpp-native
;
}
function
n4
(){
...
...
@@ -148,12 +185,24 @@ function main() {
vpp
shift
;;
--dp
|
--debug-pkg
)
make_package debug
--vpp-dp
|
--vpp-debug-pkg
)
pre_create
make_vpp_package debug
shift
;
;;
--vpp-rp
|
--vpp-release-pkg
)
pre_create
make_vpp_package release
shift
;
;;
--n4-dp
|
--vpp-debug-pkg
)
pre_create
make_n4_package debug
shift
;
;;
--rp
|
--release-pkg
)
make_package release
--n4-rp
|
--vpp-release-pkg
)
pre_create
make_n4_package release
shift
;
;;
--n4
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment