Skip to content

Commit 916270f

Browse files
authored
Merge branch 'OpenIPC:main' into main
2 parents 89c8c0e + 0fe1134 commit 916270f

File tree

3 files changed

+290
-49
lines changed

3 files changed

+290
-49
lines changed
Lines changed: 224 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
---
2+
title: "Sysupgrade"
3+
description: "What is and how to use sysupgrade."
4+
---
5+
6+
Once the initial installation of the OpenIPC software for your camera is complete it is possible to upgrade it either via the web interface or manually via a terminal window.
7+
8+
This article is about how to manually perform an update using a terminal window using the sysupgrade command.
9+
```bash
10+
root@openipc-${soc}:~# sysupgrade --help
11+
OpenIPC System Updater v1.0.48
12+
13+
Vendor sigmastar
14+
SoC ssc338q
15+
Kernel 04:02:47 2025-07-06
16+
RootFS master+3674581, 2025-07-06
17+
18+
Usage: /usr/sbin/sysupgrade [options]
19+
Where:
20+
-k Update kernel from online repository.
21+
-r Update rootfs from online repository.
22+
--url=[URL] Custom URL to update from (.tgz format).
23+
--archive=[FILE] Custom archive to update from (.tgz format).
24+
--kernel=[FILE] Update kernel from file (uImage format).
25+
--rootfs=[FILE] Update rootfs from file (squashfs format).
26+
-f, --force_all Do not validate anything.
27+
-n, --wipe_overlay Wipe overlay partition.
28+
-x, --no_reboot Do not reboot after updating.
29+
-z, --no_update Do not update self.
30+
-h, --help Display this help and exit.
31+
```
32+
33+
:::tip
34+
By default, sysupgrade will reboot the camera to complete the update. If you don't wish to do that then use the -x option.
35+
:::
36+
## Upgrading from the GitHub latest release.
37+
By default, running sysupgrade will attempt to download the latest software for your camera model from the github sources.
38+
39+
There are other options available so you can use a local copy of the Linux kernel (uImage) and camera software (rootfs.squashfs).
40+
41+
For old firmware running `sysupgrade` without parameters is enough. For newer firmware, run `sysupgrade -k -r` to update both kernel and rootfs is required.
42+
:::caution
43+
Upgrading firmware can lead to "bricking" your camera. Make sure you are prepared both morally and skill wise. Have your rescue SD card and/or UART adapter ready. Be prepared to de-solder and reprogram flash chip as the last resort. Do not upgrade production cameras unless you really have to!__
44+
:::
45+
### Using sysupgrade
46+
Typically running sysupgrade will give you the latest release for your camera, as described above, however if you wish to revert to a previous image, or load your own updates, then use any the options described below.
47+
48+
Remember once you are ready to run sysupgrade you must use the syntax
49+
```sysupgrade --kernel=/tmp/uImage.${soc} --rootfs=/tmp/rootfs.squashfs.${soc} -z``` where ```${soc}``` is your camera specific soc e.g. gk7205v300
50+
otherwise the latest release on Github will be downloaded.
51+
52+
## Using a TFTP server
53+
### On your host machine:
54+
If you haven't already got a TFTP server running on your host machine then take a look at the Wiki article [Set up a TFTP server](installation-tftpd.md).
55+
56+
If you don't already have the uImage and rootfs.squashfs images for your camera then go to [OpenIPC firmware latest}(https://github.com/OpenIPC/firmware/releases/tag/latest) and download the latest firmware bundle for your SoC and extract the content of the bundle into the root directory of your TFTP server.
57+
58+
```bash
59+
tar xvf <firmware.tgz>
60+
```
61+
62+
If you have built your own versions using a copy of the [firmware repository](https://github.com/OpenIPC/firmware) then your uImage and rootsfs.squashfs images will be in your _output/images_ folder. Copy these to the root of your tftp server.
63+
64+
### On the camera:
65+
You can either update the images from a Linux terminal session or from the U-Boot prompt, if you have a UART serial connection and interrupted Linux loading.
66+
67+
Check that your camera environment variable for the TFTP server is correct by looking for the _serverip_ entry when listing them with _fw_printenv_.
68+
69+
If it needs updating use ```fw_setenv serverip <your.tftp.ip.address>``` command.
70+
71+
#### From Linux
72+
```bash
73+
soc=$(fw_printenv -n soc)
74+
serverip=$(fw_printenv -n serverip)
75+
cd /tmp
76+
busybox tftp -r rootfs.squashfs.${soc} -g ${serverip}
77+
busybox tftp -r uImage.${soc} -g ${serverip}
78+
sysupgrade --kernel=/tmp/uImage.${soc} --rootfs=/tmp/rootfs.squashfs.${soc} -z
79+
```
80+
81+
#### From U-Boot
82+
83+
for 8MB image
84+
85+
```bash
86+
tftp ${baseaddr} uImage.${soc}
87+
sf probe 0; sf erase 0x50000 0x200000; sf write ${baseaddr} 0x50000 ${filesize}
88+
89+
tftp ${baseaddr} rootfs.squashfs.${soc}
90+
sf probe 0; sf erase 0x250000 0x500000; sf write ${baseaddr} 0x250000 ${filesize}
91+
```
92+
93+
for 16MB image
94+
95+
```bash
96+
tftp ${baseaddr} uImage.${soc}
97+
sf probe 0; sf erase 0x50000 0x200000; sf write ${baseaddr} 0x50000 ${filesize}
98+
99+
tftp ${baseaddr} rootfs.squashfs.${soc}
100+
sf probe 0; sf erase 0x250000 0xA00000; sf write ${baseaddr} 0x250000 ${filesize}
101+
```
102+
103+
Now restart the camera to load the new images.
104+
105+
## Using scp
106+
### On your host machine:
107+
If you don't already have the uImage and rootfs.squashfs images for your camera then go to [OpenIPC firmware latest](https://github.com/OpenIPC/firmware/releases/tag/latest) and download the latest firmware bundle for your SoC and extract the contents.
108+
109+
```bash
110+
tar xvf <firmware.tgz>
111+
```
112+
113+
If you have built your own versions using a copy of the [firmware repository](https://github.com/OpenIPC/firmware) then your uImage and rootsfs.squashfs images will be in your _output/images_ folder.
114+
115+
Now copy these to the camera using scp.
116+
117+
```bash
118+
scp uImage* rootfs* root@<yourcameraip>:/tmp/
119+
```
120+
121+
**Note:** If you get an error that '/usr/libexec/sftp-server could not be found' it is because in later versions of scp sftp is now used behind the scenes and this is not built into the busybox implementation currently. To force scp to use the legacy behavour use the -O option so
122+
```bash
123+
scp -O uImage* rootfs* root@<yourcameraip>:/tmp/
124+
```
125+
126+
### On the camera:
127+
Now create a terminal session with the camera e.g. ssh [email protected] and run the sysupgrade command pointing at your new images in /tmp.
128+
129+
```bash
130+
soc=$(fw_printenv -n soc)
131+
sysupgrade --kernel=/tmp/uImage.${soc} --rootfs=/tmp/rootfs.squashfs.${soc} -z
132+
```
133+
134+
## Upgrading from an SD card
135+
### On your host machine
136+
If you don't already have the uImage and rootfs.squashfs images for your camera then go to [OpenIPC firmware latest](https://github.com/OpenIPC/firmware/releases/tag/latest) and download the latest firmware bundle for your SoC and extract the contents
137+
138+
If you have built your own versions using a copy of the [firmware repository](https://github.com/OpenIPC/firmware) then your uImage and rootsfs.squashfs images will be in your _output/images_ folder.
139+
140+
Insert an SD card into your host machine and copy the uImage and squashfs files to the card e.g.
141+
142+
```bash
143+
cp uImage* rootfs* /media/<username>/<card-id>/
144+
```
145+
146+
### On your camera
147+
Insert the SD card into your camera.
148+
149+
Create a terminal session and run the following
150+
151+
```bash
152+
soc=$(fw_printenv -n soc)
153+
sysupgrade --kernel=/mnt/mmcblk0p1/uImage.${soc} --rootfs=/mnt/mmcblk0p1/rootfs.squashfs.${soc} --force_ver -z
154+
```
155+
156+
### SD Card: Alternatively, from U-Boot
157+
158+
for 8MB image
159+
160+
```bash
161+
mw.b ${baseaddr} 0xff 0x200000
162+
fatload mmc 0:1 ${baseaddr} uImage.${soc}
163+
sf probe 0; sf erase 0x50000 0x200000; sf write ${baseaddr} 0x50000 ${filesize}
164+
165+
mw.b ${baseaddr} 0xff 0x500000
166+
fatload mmc 0:1 ${baseaddr} rootfs.squashfs.${soc}
167+
sf probe 0; sf erase 0x250000 0x500000; sf write ${baseaddr} 0x250000 ${filesize}
168+
```
169+
170+
for 16MB image
171+
172+
```bash
173+
mw.b ${baseaddr} 0xff 0x300000
174+
fatload mmc 0:1 ${baseaddr} uImage.${soc}
175+
sf probe 0; sf erase 0x50000 0x300000; sf write ${baseaddr} 0x50000 ${filesize}
176+
177+
mw.b ${baseaddr} 0xff 0x500000
178+
fatload mmc 0:1 ${baseaddr} rootfs.squashfs.${soc}
179+
sf probe 0; sf erase 0x350000 0xa00000; sf write ${baseaddr} 0x350000 ${filesize}
180+
```
181+
182+
## Flashing U-Boot via ymodem
183+
184+
Clean 320K of RAM and load bootloader file into it:
185+
186+
```bash
187+
mw.b ${baseaddr} 0xff 0x50000
188+
loady
189+
```
190+
191+
> _(press "Ctrl-a" followed by ":", then type)_
192+
193+
```bash
194+
exec !! sz --ymodem u-boot.bin
195+
```
196+
197+
After the file if uploaded, write it into ROM:
198+
199+
```bash
200+
sf probe 0
201+
sf erase 0x0 0x50000
202+
sf write ${baseaddr} 0x0 ${filesize}
203+
```
204+
205+
## Troubleshooting
206+
207+
If you got this error:
208+
209+
```console
210+
losetup: /tmp/rootfs.squashfs.${soc}: No such file or directory
211+
Rootfs: Unable to get hostname, execution was interrupted...
212+
```
213+
214+
then try to update only kernel first:
215+
`sysupgrade -k`
216+
217+
If it doesn't help, use `--force` option:
218+
`sysupgrade -r --force`
219+
220+
If you caught a glitch, retrieve the most recent version of the utility:
221+
222+
```bash
223+
curl -k -L -o /usr/sbin/sysupgrade "https://raw.githubusercontent.com/OpenIPC/firmware/master/general/overlay/usr/sbin/sysupgrade"
224+
```

src/content/docs/use-cases/fpv/APFPV.md

Lines changed: 59 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -389,58 +389,69 @@ nmcli device disconnect wlan0
389389

390390
Thats all, now put the SD card in your vrx and turn it ON, you will get 2 wifi interfaces connected to APFPV credentials, and with ip route it will pick the best wifi card every time, the range should increase significantly.
391391

392-
### Using APAlink
393-
APAlink will modify the bitrate on the fly to keep link alive, it still on exprimental stage, use on your own risk!
394-
1. Download it from [GitHub](https://github.com/carabidulebabat/CaraSandbox/blob/main/ap_alink.sh).
395-
2. Modify rc.local in /etc/ folder and add before exit 0 and save the file.
396-
```bash
397-
/etc/ap_alink.sh &
398-
````
399-
400-
3. SSH into it(putty can be used) and type:
392+
## Using APALink
401393

402-
```bash
403-
chmod +x /etc/ap_alink.sh
404-
```
394+
APALINK is a C program designed to keep your video link alive. It uses fallback logic to switch to a lower bitrate (e.g., 2 Mbps) when the signal is weak.
405395

406-
Now lets see the different setting, cause its experimental we can play with various parametrer
396+
### Installation
407397

408-
bitrate=30 is the default bitrate, when its boot it will start at 30mbps
409-
bitratemax is the max bitrate allowed, majestic will not go higher than this value
410-
default value is bitrate 30 and max 40, its good if you have a radxa gs with good wifi card, if your on android try lower value like
398+
To install it is easy as:
411399

412-
```bash
413-
bitrate=4
414-
bitratemax=10
415-
````
400+
1. Go to https://github.com/carabidulebabat/CaraSandbox
401+
2. Follow the steps in the README.md.
416402

417-
Power output is not adaptive yet.
418-
```bash
419-
get_dynamic_interval() {
420-
dbm=$(get_dbm)
421-
echo $(awk -v d="$dbm" 'BEGIN {
422-
if (d > -40) print 8;
423-
else if (d > -65) print 6;
424-
else if (d > -75) print 4;
425-
else if (d > -85) print 2;
426-
else print 1;
427-
}')
428-
}
429-
```
430-
This function allows to increase the bitrate faster or lower depends on link quality in dbm. You can modify the d value to set the sensitivity of APAlink.
431-
```bash
432-
get_dynamic_decrease() {
433-
dbm=$(get_dbm)
434-
echo $(awk -v d="$dbm" 'BEGIN {
435-
if (d > -60) print 2;
436-
else if (d > -75) print 5;
437-
else if (d > -85) print 15;
438-
else print 20;
439-
}')
440-
}
441-
```
442-
Same thing as get dynamic interval, but it will lower bitrate faster or lower depends of link quality.
403+
3. Copy the ap_alink binary to /usr/bin:
404+
405+
'''bash
406+
chmod 777 +x /usr/bin
407+
'''
408+
409+
4. Copy the ap_alink.conf file to the /etc/ folder.
410+
411+
5. (Optional) Copy vtxmenu.ini to /etc/ as well to enable the APFPV menu.
412+
413+
6. Go fly!
414+
415+
### Settings
416+
417+
You can edit the ap_alink.conf file:
418+
419+
'''bash
420+
bitrate_max=22 ## its the bitrate when good signal
421+
bitrate_min=2 ## its the fallback bitrate
422+
dbm_threshold=-47 ## this value is the threshold of when fallback mode needs to kick in. WARNING: set this value as your Wi-Fi RF sensitivity
423+
'''
424+
425+
- A lower threshold = better image quality for longer, but video may lag or freeze under weak signal.
426+
- A higher threshold = fallback triggers faster, possibly reducing lag but also image quality.
427+
428+
### Recommended Settings
429+
430+
BL-M8812EU2:
431+
'''bash
432+
bitrate_max=12
433+
bitrate_min=2
434+
dbm_threshold=-52
435+
'''
436+
437+
BL-R8812AF1:
438+
'''bash
439+
bitrate_max=10
440+
bitrate_min=2
441+
dbm_threshold=-48
442+
'''
443+
444+
### VTXMENU
445+
446+
Navigate to the MSP menu just like in HDZero or WFB-NG.
447+
448+
Inside the "BASIC SETTING" submenu, you have:
449+
450+
- Tx Power: 1500 or 2000 (representing MIN/MAX power). 25mw or 100mw.
451+
- Channel: Every 5GHz Wi-Fi channel is listed.
452+
- AutoPower 0 or 1 enable set tx power auto of iw
453+
454+
That’s All
443455

444-
I suggest to try different value for d > dbm and see in flight.
445-
You can killall ap_alink.sh and type sh /etc/ap_alink.sh to execute script with log, log will show current bitrate, interval and dbm. Thats all for APAlink at the moment
456+
Straightforward, easy to understand — just plug and fly without overthinking.
446457

src/content/docs/use-cases/fpv/groundstation-radxa-zero-3w.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,14 @@ version: 1.9.9
3737
## STEP 1: Flashing
3838

3939
### SD Card
40+
(Note please use a Good quality Class 10 SD card Capacity more than 16 GB )
4041
* See [getting started](https://wiki.radxa.com/Zero/getting_started)
41-
- Tools like [balenaEtcher](https://etcher.balena.io/) or [rufus](https://rufus.ie/en/) can write an image an sd card.
42+
* Extract the radxa_x.x.x_.img.xz using [7Zip](https://www.7-zip.org/) to get radxa_x.x.x_.img .
43+
* Use tools like [balenaEtcher](https://etcher.balena.io/) or [rufus](https://rufus.ie/en/) to flash it to your SD card .
44+
* After flashing unplug and plug you SD card you will see 2 partition .
45+
* Config Partition (which will have all the configuration files inside)
46+
* (IMG 2.0.0) A normal FAT32 partition (which will have all the DVR recordings for easy extraction )
47+
4248
- Radxa provided [tools](https://dl.radxa.com/tools/)
4349

4450
### EMMC

0 commit comments

Comments
 (0)