thanks for your answer and tips how to continue in my blind route I will look at it.
I'm creating embedded device based on Onion Omega 2+. There are some python scripts to control GPIO's and some PHP and HTML as User Interface. It works well.
Now i'm looking for solution how to make remote upgrade. User will download a file, upload it via PHP to Onion and some python script will start upgrading system. And i need to keep user files (saved gpio data, logs, passwords, settings...).
I've tried some ways how do to it but without finish success.
Choice 1: (rewrite application data)
Working on some local Onion Omega. Creating my application (php, html, python, ...) in one folder (for exmaple
/app-data). Then backup this folder and send it to user. On remote device script will rewrite this folder.
This is possible but i'm worry about new installed packages and changes out of app-data. And i don't want to check all dependencies.
Choice 2: (dd and mtd -r write)
Working on some local Onion Omega, then make backup with
dd if=/dev/mtd3 of=/mnt/backup/firmware.bin and on remote device do
mtd -r write /tmp/upload/firmware.bin firmware. That works fine but i'm not able to save somewhere user's data. Is it possible to keep somewhere user's files?
Choice 3: (rewrite /overlay)
Working on some local Onion Omega, backup
firmware.tgz. On remote device save user files to
firmware.tgz, copy back user files. I don't know if this way is possible. I make some tries, but with no success. After reboot Onion restore factory settings.
Choice 4: (Compile own firmware)
Compile my own firmware and on remote device just do sysupgrade. I've successfully compile original firmware (https://docs.onion.io/omega2-docs/cross-compiling.html), but i don't know how to add there new packages and files.
Is there any another possibility how to do it better?
Is any of my choice good and i'm just missing some detail?
/etc/opkg/distfeeds.conf remove all
# from all lines.
opkg update opkg install mpc
I'm working on same project and have another problem. I can not play radio stream. MPC says
ERROR: Failed to decode http://icecast6.play.cz/radio1-128.mp3.m3u. I can play single mp3 file from URL but not mp3.m3u file. Can you do that?
I have not found how to disable it so I try to compile firmware but after reflashing i have some errors and Omega not booting.
So i'm still searching how to disable it without compiling.
Is any way how to change booting process where i can disable failsafe mode?
I have found that booting process is saved in read-only partition squashfs and i don't know if is possible to change something there.
I would like to use Onion Omega 2 for commercial use and i need to disable access to file system. Problem is that via failsafe mode and mount_root anybody can read and edit any content in device without password.
i'm running official firmware and I install sudo
opkg install sudo and create user alice.
i'm trying to run python gpio script (with pyOnionGpio library) as another user than root.
There is problem with privileges on directory
I've tried change owner of that folder with
chown -R alice:alice /sys/class/gpio/ and run script
sudo -u alice ./script.py
Script throw exception IOError: [Errno 13] Permission denied: '/sys/class/gpio/gpio18/direction'. New created link /sys/class/gpio/gpio18/ is created by root.
Do you now some way how to run python gpio script as another user than root?
Thank you, Radim
i'm trying to enable https on Onion Omega 2.
I have found some threads here about it but with no result. I'm not able to install openssl. I have tried
opkg update and:
opkg install openssl
opkg install openssl-util
Both with same response: Unknown package
In /etc/opkg/distfeeds.conf i have:
#src/gz reboot_core http://downloads.lede-project.org/snapshots/targets/ramips/mt7688/packages #src/gz reboot_base http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/base #src/gz reboot_onion http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/onion ## src/gz reboot_luci http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/luci ## src/gz reboot_packages http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/packages ## src/gz reboot_routing http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/routing ## src/gz reboot_telephony http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/telephony src/gz omega2_core http://repo.onion.io/omega2/packages/core src/gz omega2_base http://repo.onion.io/omega2/packages/base src/gz omega2_packages http://repo.onion.io/omega2/packages/packages src/gz omega2_onion http://repo.onion.io/omega2/packages/onion
opkg list *ssl*:
libmosquitto-nossl libmosquitto-ssl libopenssl libwebsockets-openssl mailsend-nossl mosquitto-client-nossl mosquitto-client-ssl mosquitto-nossl mosquitto-ssl php7-mod-openssl python-openssl python3-openssl ruby-openssl shairport-sync-openssl transmission-cli-openssl transmission-daemon-openssl transmission-remote-openssl
Any idea how to install it? Thank you.
Looks like your connection to Community was lost, please wait while we try to reconnect.