Wiki source code of Armbian OS instruction
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | **Table of Contents:** | ||
2 | |||
3 | {{toc/}} | ||
4 | |||
5 | |||
6 | |||
7 | |||
8 | = 1. Overview = | ||
9 | |||
10 | |||
11 | This is a general instruction for the use of Armbian base OS of Dragino devices. Current models include: | ||
12 | |||
13 | * HP0A | ||
14 | * HP0C | ||
15 | * LPS8v2 | ||
16 | |||
17 | |||
18 | |||
19 | |||
20 | = 2. Development Guide = | ||
21 | |||
22 | |||
23 | For advanced users to develop Driver/ Linux etc | ||
24 | |||
25 | |||
26 | |||
27 | == 2.1 How to recompile LoRaWAN Concentrator Driver ( dragino-fwd package). == | ||
28 | |||
29 | |||
30 | |||
31 | === (% style="color:blue" %)**Step 1. Clone dragino-fwd package**(%%) === | ||
32 | |||
33 | |||
34 | (% style="color:red" %)**Requirements:** | ||
35 | |||
36 | (% class="box infomessage" %) | ||
37 | ((( | ||
38 | sudo apt install -y libsqlite3-dev | ||
39 | sudo apt install -y libftdi1-dev | ||
40 | ))) | ||
41 | |||
42 | |||
43 | (% style="color:red" %)**Run command clone dragino-fwd package:** | ||
44 | |||
45 | (% class="box infomessage" %) | ||
46 | ((( | ||
47 | git clone https:~/~/github.com/dragino/dragino_fwd_src.git | ||
48 | ))) | ||
49 | |||
50 | [[image:image-20220527151010-1.png]] | ||
51 | |||
52 | |||
53 | |||
54 | === (% style="color:blue" %)**Step 2. Compile dragino_fwd**(%%) === | ||
55 | |||
56 | |||
57 | (% style="color:red" %)**After cloning is complete, Run the command starts compiling:** | ||
58 | |||
59 | (% class="box infomessage" %) | ||
60 | ((( | ||
61 | Compile HP0C/HP0A fwd: ./hp0z-make-deb.sh c | ||
62 | ))) | ||
63 | |||
64 | The following example compilers HP0C fwd. | ||
65 | |||
66 | [[image:image-20220527153913-3.png]] | ||
67 | |||
68 | |||
69 | **When the compilation is complete a draginofwd-*.deb package is generated.** | ||
70 | |||
71 | [[image:image-20220527154311-4.png||height="385" width="773"]] | ||
72 | |||
73 | |||
74 | |||
75 | === (% style="color:blue" %)**Step 3. Install the dragino_fwd**(%%) === | ||
76 | |||
77 | |||
78 | (% style="color:red" %)**Run command:** | ||
79 | |||
80 | (% class="box infomessage" %) | ||
81 | ((( | ||
82 | dpkg -i draginofwd-*.deb | ||
83 | ))) | ||
84 | |||
85 | [[image:image-20220527154811-5.png]] | ||
86 | |||
87 | |||
88 | |||
89 | === (% style="color:blue" %)**Step 4. Test**(%%) === | ||
90 | |||
91 | |||
92 | Check the dragino_fwd log: | ||
93 | |||
94 | (% class="box infomessage" %) | ||
95 | ((( | ||
96 | journalctl -u draginofwd -f | ||
97 | ))) | ||
98 | |||
99 | [[image:image-20220527165221-7.png||height="182" width="931"]] | ||
100 | |||
101 | |||
102 | Start/stop dragino_fwd via systemctl: | ||
103 | |||
104 | (% class="box infomessage" %) | ||
105 | ((( | ||
106 | systemctl start draginofwd | ||
107 | systemctl stop draginofwd | ||
108 | ))) | ||
109 | |||
110 | |||
111 | |||
112 | == 2.2 How to clone Complete OS on the EMMC to SD card == | ||
113 | |||
114 | |||
115 | |||
116 | == 2.3 How to flash SD card to eMMC == | ||
117 | |||
118 | |||
119 | //**Preparations:**// | ||
120 | |||
121 | ~1. Prepare an SD card and a// card reader device// | ||
122 | |||
123 | 2. Formatting the SD card (//Make sure the SD card is empty//) | ||
124 | |||
125 | 3. //Download the OS image~: ( Such as **[[dragino-lps8v2-1.5img>>url:http://repo.dragino.com/release/hp0c-image/dragino-lps8v2-1.5.img]]** )// | ||
126 | |||
127 | 4. //A Flash software tool ( Such as **[[balenaEtcher>>url:https://www.balena.io/etcher/]]** )// | ||
128 | |||
129 | 5. //Open the LPS8-V2 shell, and put the SD card into the card slot// | ||
130 | |||
131 | 6. Power on the device and access the gateway's CLI via the serial port. | ||
132 | |||
133 | 7. Login and run the below command to flash. | ||
134 | |||
135 | |||
136 | (% style="color:red" %)**Run command:** | ||
137 | |||
138 | (% class="box infomessage" %) | ||
139 | ((( | ||
140 | nand-sata-install | ||
141 | ))) | ||
142 | |||
143 | [[image:image-20220602112051-1.png]] | ||
144 | |||
145 | |||
146 | Select the "Boot from eMMC - system on eMMC" | ||
147 | |||
148 | [[image:image-20220602112058-2.png||height="292" width="646"]] | ||
149 | |||
150 | [[image:image-20220602112106-3.png||height="301" width="643"]] | ||
151 | |||
152 | |||
153 | Select the "1 ext4" | ||
154 | |||
155 | [[image:image-20220602112113-4.png||height="271" width="642"]] | ||
156 | |||
157 | |||
158 | It takes 4-5 minutes to burn from SD card to eMMC | ||
159 | |||
160 | [[image:image-20220602112119-5.png||height="309" width="641"]] | ||
161 | |||
162 | [[image:image-20220602112125-6.png||height="281" width="640"]] | ||
163 | |||
164 | [[image:image-20220602112131-7.png||height="241" width="638"]] | ||
165 | |||
166 | |||
167 | (% style="color:red" %)**Note: After the flash is complete, power off the device and then remove the SD card.** | ||
168 | |||
169 | |||
170 | Init the new Os | ||
171 | |||
172 | |||
173 | Run the command | ||
174 | |||
175 | |||
176 | wget -P /tmp/ http:~/~/repo.dragino.com/release/hp0c-image/lps8v2_init.sh && chmod +x /tmp/lps8v2_init.sh && /tmp/lps8v2_init.sh | ||
177 | |||
178 | |||
179 |