-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme-RK3328
217 lines (163 loc) · 6.21 KB
/
readme-RK3328
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
NanoPi NEO3
Rockchip RK3328
- Multi-media processor
- Mali-T764
High performance OpenGL ES1.1/2.0/3.0, OpenCL 1.1, DirectX 11(W version only
- 2160p Video decoder
- 1080p Video encoder (H264)
- HEVC (H.265)
----------------------------------------------------------------------------------------------
DOCKER INSTALL
--------------
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
sudo systemctl start docker
sudo systemctl status docker
sudo usermod -aG docker ${USER}
su - ${USER}
groups
(sudo usermod -aG docker username)
----------------------------------------------------------------------------------------------
ARMBIAN COMPILE
---------------
git clone --depth=1 --branch=main https://github.com/armbian/build
cd build
vi config/kernel/linux-rockchip64-current.config
"
CONFIG_88XXAU=m
to
# CONFIG_88XXAU is not set
"
./compile.sh BOARD=nanopineo3 BRANCH=current RELEASE=jammy BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_CONFIGURE=no INSTALL_HEADERS=yes ALLOW_ROOT=yes
=>
[🐳|🌱] Preparing bare kernel git tree [ this might take a long time ]
[🐳|🌿] Done building image [ nanopineo3 ]
[🐳|🌱] Runtime [ 60:00 min ]
-rw-rw-r-- 1 pprz pprz 1463812096 nov. 27 15:29 Armbian-unofficial_23.11.0-trunk_Nanopineo3_jammy_current_6.1.63_minimal.img
----------------------------------------------------------------------------------------------
NANOPINEO BOOT SETUP
----------------
sudo dd if=Armbian-unofficial_23.11.0-trunk_Nanopineo3_jammy_current_6.1.63_minimal.img of=/dev/mmcblkX bs=1M status=progress
sync
sudo dmesg -w
=>
[9926.446443] GPT:Primary header thinks Alt. header is not at the end of the disk.
[19926.446445] GPT:3694591 != 61951999
[19926.446446] GPT:Alternate GPT header not at the end of the disk.
[19926.446447] GPT:3694591 != 61951999
[19926.446448] GPT: Use GNU Parted to correct GPT errors.
sudo gparted
FIX
cd /media/pprz/armbi_boot/
sudo cp armbian_first_run.txt.template armbian_first_run.txt
sudo vi armbian_first_run.txt
"
FR_net_change_defaults=1
FR_net_ethernet_enabled=1
FR_net_use_static=1
FR_net_static_ip='192.168.3.2'
FR_net_static_mask='255.255.255.0'
FR_net_static_gateway='192.168.3.1'
FR_net_static_dns='8.8.8.8 8.8.4.4' #2 entries max, seperated by a space.
1234
create user pprz
....
Generating locales: fr_FR.UTF-8
root@rnanopineo:~# reboot
----------------------------------------------------------------------------------------------
NANOPINEO RUN SETUP
--------------------
ip route
default via 192.168.3.1 dev enxe4b97ab11842 proto static metric 100
default via 192.168.92.126 dev wlp59s0 proto dhcp metric 600
sudo iptables -t nat -A POSTROUTING -o wlp59s0 -j MASQUERADE
sudo iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i enxe4b97ab11842 -o wlp59s0 -j ACCEPT
sudo sysctl net.ipv4.ip_forward=1
sudo route del default
ip route
default via 192.168.92.126 dev wlp59s0 proto dhcp metric 600
----------------------------------------------------------------------------------------------
WIFIRAW SETUP
-------------
pprz
uname -a
=>
Linux nanopineo3 6.1.56-current-rockchip64 #1 SMP PREEMPT Fri Oct 6 12:57:07 UTC 2023 aarch64 GNU/Linux
Plug usb wifi dongle asus AC 56 and check detection without driver loaded.
sudo dmesg -w
=>
[ 297.956711] usb 2-1: new high-speed USB device number 2 using ehci-platform
[ 298.105787] usb 2-1: New USB device found, idVendor=0b05, idProduct=17d2, bcdDevice= 0.00
[ 298.105814] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 298.105837] usb 2-1: Product: 802.11n NIC
[ 298.105858] usb 2-1: Manufacturer: Realtek
[ 298.105876] usb 2-1: SerialNumber: 123456
sudo apt-get update
sudo apt-get install vim git
mkdir Projects
cd Projects
git clone --recurse-submodules http://github.com/enacuavlab/vto-wifiraw-dev.git
cd vto-wifiraw-dev
./install.sh
Plug usb wifi dongle asus AC 56 and check detection with custom driver loaded.
sudo dmesg -w
=>
...
[ 298.576740] usb 2-1: 88XXau 3c:7c:3f:a9:bf:bb hw_info[d7]
[ 298.596601] usbcore: registered new interface driver rtl88XXau
[ 298.612102] rtl88XXau 2-1:1.0 wlx3c7c3fa9bfbb: renamed from wlan0
----------------------------------------------------------------------------------------------
VIDEO HARDWARE CODECS SETUP (only jammy)
----------------------------------------
sudo apt install gstreamer1.0-tools
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:liujianfeng1994/rockchip-multimedia
sudo apt dist-upgrade
sudo apt install rockchip-multimedia-config
sudo apt-get install gstreamer1.0-rockchip
gst-inspect-1.0 rockchipmpp
????
----------------------------------------------------------------------------------------------
ON/OFF BUTTON AND USB SETUP
----------------------------
rockchip-usb-powerbutton.dts
"
/dts-v1/;
/plugin/;
/ {
compatible = "rockchip,rk3328-usb\0rockchip,rk3066-usb\0snps,dwc2";
fragment@0 {
target-path = "/usb@ff580000";
__overlay__ {
dr_mode = "host";
};
};
fragment@1 {
target-path = "/";
__overlay__ {
gpio-keys {
button@0 {
label = "k1_button";
linux,code = <0x74>; //0x198 = KEY_RESTART, 0x74 = KEY_POWER
};
};
};
};
};
"
dtc -@ -I dts -O dtb -o rockchip-usb-powerbutton.dtbo rockchip-usb-powerbutton.dts
sudo mkdir /boot/overlay-user
sudo cp rockchip-usb-powerbutton.dtbo /boot/overlay-user/
sudo vi /boot/armbianEnv.txt
"
user_overlays=rockchip-usb-powerbutton
"
----------------------------------------------------------------------------------------------