Skip to content

Commit a1b5c6f

Browse files
authored
Merge pull request sonic-net#62 from zhenggen-xu/sonic-cfg-mgmt-merge2
Sonic cfg mgmt merge2
2 parents da6958f + dd52413 commit a1b5c6f

File tree

297 files changed

+25176
-2353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

297 files changed

+25176
-2353
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,6 @@
7979
path = src/sonic-restapi
8080
url = https://github.com/Azure/sonic-restapi.git
8181
branch = master
82+
[submodule "src/sonic-ztp"]
83+
path = src/sonic-ztp
84+
url = https://github.com/Azure/sonic-ztp

Makefile.work

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# * BUILD_NUMBER: Desired version-number to pass to the building-system.
88
# * ENABLE_DHCP_GRAPH_SERVICE: Enables get-graph service to fetch minigraph files
99
# through http.
10+
# * ENABLE_ZTP: Enables zero touch provisioning.
1011
# * SHUTDOWN_BGP_ON_START: Sets admin-down state for all bgp peerings after restart.
1112
# * ENABLE_PFCWD_ON_START: Enable PFC Watchdog (PFCWD) on server-facing ports
1213
# * by default for TOR switch.
@@ -162,6 +163,7 @@ SONIC_BUILD_INSTRUCTION := make \
162163
BUILD_NUMBER=$(BUILD_NUMBER) \
163164
BUILD_TIMESTAMP=$(BUILD_TIMESTAMP) \
164165
ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE) \
166+
ENABLE_ZTP=$(ENABLE_ZTP) \
165167
SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \
166168
SONIC_ENABLE_PFCWD_ON_START=$(ENABLE_PFCWD_ON_START) \
167169
SONIC_ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \

build_debian.sh

+5-10
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then
3737
else
3838
DOCKER_VERSION=5:18.09.8~3-0~debian-stretch
3939
fi
40-
LINUX_KERNEL_VERSION=4.9.0-9-2
40+
LINUX_KERNEL_VERSION=4.9.0-11-2
4141

4242
## Working directory to prepare the file system
4343
FILESYSTEM_ROOT=./fsroot
@@ -139,7 +139,9 @@ sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/initramfs-tools_*.deb || \
139139
sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/linux-image-${LINUX_KERNEL_VERSION}-*_${CONFIGURED_ARCH}.deb || \
140140
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
141141
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install acl
142-
[[ $CONFIGURED_ARCH == amd64 ]] && sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install dmidecode
142+
if [[ $CONFIGURED_ARCH == amd64 ]]; then
143+
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install dmidecode hdparm
144+
fi
143145

144146
## Update initramfs for booting with squashfs+overlay
145147
cat files/initramfs-tools/modules | sudo tee -a $FILESYSTEM_ROOT/etc/initramfs-tools/modules > /dev/null
@@ -315,10 +317,6 @@ fi
315317
## Disable kexec supported reboot which was installed by default
316318
sudo sed -i 's/LOAD_KEXEC=true/LOAD_KEXEC=false/' $FILESYSTEM_ROOT/etc/default/kexec
317319

318-
## Modifty ntp default configuration: disable initial jump (add -x), and disable
319-
## jump when time difference is greater than 1000 seconds (remove -g).
320-
sudo sed -i "s/NTPD_OPTS='-g'/NTPD_OPTS='-x'/" $FILESYSTEM_ROOT/etc/default/ntp
321-
322320
## Remove sshd host keys, and will regenerate on first sshd start
323321
sudo rm -f $FILESYSTEM_ROOT/etc/ssh/ssh_host_*_key*
324322
sudo cp files/sshd/host-ssh-keygen.sh $FILESYSTEM_ROOT/usr/local/bin/
@@ -394,9 +392,6 @@ set /files/etc/sysctl.conf/net.ipv6.conf.default.keep_addr_on_down 1
394392
set /files/etc/sysctl.conf/net.ipv6.conf.all.keep_addr_on_down 1
395393
set /files/etc/sysctl.conf/net.ipv6.conf.eth0.keep_addr_on_down 1
396394
397-
set /files/etc/sysctl.conf/net.ipv6.conf.eth0.accept_ra_defrtr 0
398-
set /files/etc/sysctl.conf/net.ipv6.conf.eth0.accept_ra 0
399-
400395
set /files/etc/sysctl.conf/net.ipv4.tcp_l3mdev_accept 1
401396
set /files/etc/sysctl.conf/net.ipv4.udp_l3mdev_accept 1
402397
@@ -435,10 +430,10 @@ EOF
435430

436431
sudo cp files/dhcp/rfc3442-classless-routes $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d
437432
sudo cp files/dhcp/sethostname $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d/
433+
sudo cp files/dhcp/sethostname6 $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d/
438434
sudo cp files/dhcp/graphserviceurl $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d/
439435
sudo cp files/dhcp/snmpcommunity $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d/
440436
sudo cp files/dhcp/vrf $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d/
441-
sudo cp files/dhcp/dhclient.conf $FILESYSTEM_ROOT/etc/dhcp/
442437
if [ -f files/image_config/ntp/ntp ]; then
443438
sudo cp ./files/image_config/ntp/ntp $FILESYSTEM_ROOT/etc/init.d/
444439
fi
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# name lanes alias index
2+
Ethernet0 1,2,3,4 Ethernet1/1 1
3+
Ethernet4 5,6,7,8 Ethernet2/1 2
4+
Ethernet8 9,10,11,12 Ethernet3/1 3
5+
Ethernet12 13,14,15,16 Ethernet4/1 4
6+
Ethernet16 21,22,23,24 Ethernet5/1 5
7+
Ethernet20 17,18,19,20 Ethernet6/1 6
8+
Ethernet24 25,26,27,28 Ethernet7/1 7
9+
Ethernet28 29,30,31,32 Ethernet8/1 8
10+
Ethernet32 37,38,39,40 Ethernet9/1 9
11+
Ethernet36 33,34,35,36 Ethernet10/1 10
12+
Ethernet40 41,42,43,44 Ethernet11/1 11
13+
Ethernet44 45,46,47,48 Ethernet12/1 12
14+
Ethernet48 53,54,55,56 Ethernet13/1 13
15+
Ethernet52 49,50,51,52 Ethernet14/1 14
16+
Ethernet56 57,58,59,60 Ethernet15/1 15
17+
Ethernet60 61,62,63,64 Ethernet16/1 16
18+
Ethernet64 69,70,71,72 Ethernet17/1 17
19+
Ethernet68 65,66,67,68 Ethernet18/1 18
20+
Ethernet72 73,74,75,76 Ethernet19/1 19
21+
Ethernet76 77,78,79,80 Ethernet20/1 20
22+
Ethernet80 85,86,87,88 Ethernet21/1 21
23+
Ethernet84 81,82,83,84 Ethernet22/1 22
24+
Ethernet88 89,90,91,92 Ethernet23/1 23
25+
Ethernet92 93,94,95,96 Ethernet24/1 24
26+
Ethernet96 101,102,103,104 Ethernet25/1 25
27+
Ethernet100 97,98,99,100 Ethernet26/1 26
28+
Ethernet104 105,106,107,108 Ethernet27/1 27
29+
Ethernet108 109,110,111,112 Ethernet28/1 28
30+
Ethernet112 117,118,119,120 Ethernet29/1 29
31+
Ethernet116 113,114,115,116 Ethernet30/1 30
32+
Ethernet120 121,122,123,124 Ethernet31/1 31
33+
Ethernet124 125,126,127,128 Ethernet32/1 32
34+
Ethernet128 129 Ethernet33 33
35+
Ethernet132 128 Ethernet34 34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td3-a7050cx3-32s-32x100G.config.bcm

0 commit comments

Comments
 (0)