forked from dentproject/dentOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.env
executable file
·83 lines (69 loc) · 2.64 KB
/
setup.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
############################################################
#
# The settings in this script are required
# and should be sourced into you local build shell.
#
############################################################
# Fix expired letsencrypt root certificate https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/
sudo apt-get update; sudo apt-get install -y libgnutls30
# The root of the ONL build tree is here
export ONL=$( cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)
# The ONL package dir is here:
export ONLPM_OPTION_PACKAGEDIRS="$ONL/packages:$ONL/builds"
# The ONL repo dir is here:
export ONLPM_OPTION_REPO="$ONL/REPO"
# The default RELEASE dir is here:
export ONLPM_OPTION_RELEASE_DIR="$ONL/RELEASE"
# The ONL build tools should be included in the local path:
export PATH="$ONL/tools/scripts:$ONL/tools:$PATH"
# Parallel Make Jobs
# Default parallel build settings
export ONL_MAKE_PARALLEL=-j$(echo "$(nproc) * 2" | bc)
# Version files
$ONL/tools/make-versions.py --import-file=$ONL/tools/onlvi --class-name=OnlVersionImplementation --output-dir $ONL/make/versions
#
# buildroot download mirror. We suggest you setup a local repository containing these contents for faster local builds.
#
export BUILDROOTMIRROR=${BUILDROOTMIRROR:-"http://buildroot.opennetlinux.org/dl"}
# These submodules are required for almost everything.
$ONL/tools/submodules.py $ONL sm/infra
$ONL/tools/submodules.py $ONL sm/bigcode
$ONL/tools/submodules.py $ONL sm/build-artifacts
$ONL/tools/submodules.py $ONL sm/dent-artifacts
$ONL/tools/submodules.py $ONL sm/iproute2
$ONL/tools/submodules.py $ONL sm/ethtool
# Prepopulate local REPO with build-artifacts.
cp -R $ONL/sm/build-artifacts/REPO/* $ONL/REPO
cp -R $ONL/sm/dent-artifacts/REPO/* $ONL/REPO
# Export the current debian suite
export ONL_DEBIAN_SUITE=$(lsb_release -c -s)
# Enable local post-merge githook
if [ ! -f $ONL/.git/hooks/post-merge ] && [ -d $ONL/.git ]; then
cp $ONL/tools/scripts/post-merge.hook $ONL/.git/hooks/post-merge
fi
# submodule post update scripts.
export ONL_SUBMODULE_UPDATED_SCRIPTS="$ONL/tools/scripts/submodule-updated.sh"
# Build Whitelist
export ONLPM_OPTION_PLATFORM_ALLOWLIST="\
arm-accton-as4610-54-r0
arm64-nxp-ls1043ardb-r0
arm64-nxp-ls1046ardb-r0
arm64-delta-tx4810-r0
arm64-delta-tn4810m-r0
arm64-delta-tn48m2-r0
arm64-delta-tn48m-r0
arm64-delta-tn48m-poe-r0
arm64-delta-tn48m-dn-r0
arm64-delta-tn48m-poe-dn-r0
arm64-delta-tn4810m-dn-r0
arm64-wnc-qsd61-aom-a-48-r0
arm64-wnc-qsa72-aom-a-48p-r0
arm64-accton-as4224-52p-r0
arm64-accton-as4224-52t-r0
arm64-accton-as5114-48x-r0
arm64-accton-as4564-26p-r0
x86-64-accton-as5912-54x-r0
x86-64-kvm-x86-64-r0
x86-64-mlnx-msn2410-r0
"