Skip to content

Update README.buildsystem.md with pictorial representation of SONiC Build execution sequence #16783

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.buildsystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ Every **platform/[VENDOR]/** directory is a derived part of buildimage frontend,
### Build output
**target/** is basically a build output. You can find all build artifacts there.

### SONiC Build Execution sequence
A pictorial representation depicting the control flow during build execution sequence is shown as below,

![image](./images/sonic_build_execution_sequence.png)


## Recipes and target groups
Now let's go over a definition of recipes and target groups.
**Recipe** is a small makefile that defines a target and set of variables for building it.
Expand Down
Binary file added images/sonic_build_execution_sequence.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 31 additions & 4 deletions platform/vs/README.vsdocker.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
HOWTO Use Virtual Switch (Docker)

**Steps for Docker Virtual Switch Image readiness:**

Option 1: Generate the image from source, using following commands.
```
Step1: Clone SONiC Source Repository
$ git clone https://github.com/sonic-net/sonic-buildimage.git

Step2: Load the overlay module.
$ sudo modproble overlay
$ cd sonic-buildimage/

Step3: Initialize the Build system to fetch all dependent component source and packages, recursively.
$ make init

Step4: Configure the Build system to VS platform
$ make configure PLATFORM=vs

Step5: Start the Build Process to generate Docker Virtual Switch Image
$ make target/docker-sonic-vs.gz
```
Option 2: Download the image directly from Community builds link.


**Steps for Docker Virtual Switch Image usage:**
1. Create a docker with two front panel ports

```
Expand All @@ -11,13 +34,17 @@ sw-srv1 (id: 6)
sw-srv0 (id: 5)
```

2. Start sonic virtual switch docker
2. Load the built/downloaded Docker Virtual Switch image in the Host machine
```
$ docker load -i docker-sonic-vs.gz
```

3. Start sonic virtual switch docker
```
$ docker run --privileged --network container:sw --name vs -d docker-sonic-vs
```

3. Setup IP in the virtual switch docker
4. Setup IP in the virtual switch docker

```
$ docker exec -it vs bash
Expand All @@ -27,7 +54,7 @@ root@2e9b5c2dc2a2:/# config interface startup Ethernet0
root@2e9b5c2dc2a2:/# config interface startup Ethernet4
```

4. Setup IP in the server network namespace
5. Setup IP in the server network namespace

```
$ sudo ip netns exec sw-srv0 ifconfig eth0 10.0.0.1/31
Expand All @@ -36,7 +63,7 @@ $ sudo ip netns exec sw-srv1 ifconfig eth0 10.0.0.3/31
$ sudo ip netns exec sw-srv1 ip route add default via 10.0.0.2
```

5. Ping from sw-srv0 to sw-srv1
6. Ping from sw-srv0 to sw-srv1

```
$ sudo ip netns exec sw-srv0 ping 10.0.0.3
Expand Down