@@ -42,99 +42,16 @@ are: `busybox`, `openssl`, `curl` and `azure_sdk`.
42
42
[ Here] ( https://github.com/phoenix-rtos/phoenix-rtos-doc/blob/master/building/script.md ) you can find more about
43
43
building scripts.
44
44
45
- Next, you will need an internet connection. Here is an example of how to set up a network connection on
46
- ` ia32-generic-qemu ` :
45
+ Next, you will need an internet connection.
46
+ [ Here] ( ../quickstart/ia32-generic-qemu.md#network-setup-on-ia32-generic-qemu )
47
+ is an example of how to set up a network connection on ` ia32-generic-qemu ` .
47
48
48
- ## Network setup on ia32-generic-qemu
49
+ - To complete the configuration please set the current date using ` date ` applet, like below:
49
50
50
- - Note: This guide was tested on ` Ubuntu 20.04 LTS ` host OS.
51
+ ![ Image ] ( _images/azure_date.png )
51
52
52
- There are few steps to follow:
53
-
54
- 1 . Create and set up ` vibr0 ` bridge on a host using ` qemu-bridge-helper ` :
55
-
56
- - Install the required package and ensure that ` libvirtd ` is running:
57
-
58
- ``` bash
59
- sudo apt-get update
60
- sudo apt-get install qemu-system-common
61
- systemctl enable libvirtd.service
62
- systemctl start libvirtd.service
63
- ```
64
-
65
- - Start the default network bridge, and configure it to run on startup.
66
-
67
- ` ` ` bash
68
- sudo virsh net-autostart --network default
69
- sudo virsh net-start --network default
70
- ` ` `
71
-
72
- - After that verify that the IP range ` 192.168.122.1/24` is reported by the ` vibr0` bridge:
73
-
74
- ` ` ` bash
75
- ip addr show virbr0
76
- ` ` `
77
-
78
- - The expected output:
79
-
80
- ` ` ` bash
81
- virbr0: < NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
82
- link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
83
- inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
84
- valid_lft forever preferred_lft forever
85
- ` ` `
86
-
87
- - Set up ` qemu-bridge-helper` (` chmod` is used here to allow running QEMU without root privileges)
88
-
89
- ` ` ` bash
90
- echo " allow virbr0" > /etc/qemu/bridge.conf
91
- sudo chmod a+rw /etc/qemu/bridge.conf
92
- ` ` `
93
-
94
- - If ` /etc/qemu` directory does not exist, create it and provide required privileges:
95
-
96
- ` ` ` bash
97
- sudo mkdir /etc/qemu
98
- sudo chmod a+rw /etc/qemu
99
- echo " allow virbr0" > /etc/qemu/bridge.conf
100
- sudo chmod a+rw /etc/qemu/bridge.conf
101
- ` ` `
102
-
103
- ! [Image](_images/azure_sdk_vibr_setup.png)
104
-
105
- - Sources: < https://apiraino.github.io/qemu-bridge-networking/> ,
106
- < https://mike42.me/blog/2019-08-how-to-use-the-qemu-bridge-helper-on-debian-10>
107
-
108
- 2. Launch ` qemu` using a starting script with ` net` suffix:
109
-
110
- ` ` ` bash
111
- ./scripts/ia32-generic-qemu-net.sh
112
- ` ` `
113
-
114
- 3. Configure network and run ` ash` (Busybox applet) using ` rc` script:
115
-
116
- - Note: By default ` IP` is assigned using ` DHCP` . For other possibilities please check the configuration file
117
- located in ` _projects/ia32-generic-qemu/rootfs-overlay/etc/rc.conf.d/network`
118
-
119
- - Note: There are other programs executed by the script. For more information please check the content of the ` rc`
120
- file for `ia32-generic-qemu` in ` _projects/ia32-generic-qemu/rootfs-overlay/etc/rc`
121
-
122
- ` ` ` bash
123
- /linuxrc
124
- ` ` `
125
-
126
- - As you can see, the advanced version of ` Phoenix-RTOS` with ` POSIX` shell has been started:
127
-
128
- ! [Image](_images/azure_linuxrc.png)
129
-
130
- - Now you can check the internet connection using the ` ping` applet.
131
-
132
- - To complete the configuration please set the current date using ` date` applet, like below:
133
-
134
- ! [Image](_images/azure_date.png)
135
-
136
- - Note: The required argument entered after ` @` is EPOCH (POSIX time format) - you can gt it for example from
137
- [here](https://www.epochconverter.com/).
53
+ - Note: The required argument entered after ` @ ` is EPOCH (POSIX time format) - you can gt it for example from
54
+ [ here] ( https://www.epochconverter.com/ ) .
138
55
139
56
## Running the IoThub Client sample
140
57
0 commit comments