how to make full image of omega
-
Hello,
I am a beginner onion.
I would like to develop in small series an application based onion-omega2. I would like to be able to make a complete image of the system to directly program other onion-omega.
is this possible with the linux dd command?
if you have examples. thank you in advance.
-
@Jean-Marc-FAGES It's easier to TFTP function to load the image onto the device. The use of dd on NAND is not recommended.
For my devices I install a customised image using TFTP which includes a hotplug script that runs the first time wifi connects, downloads any updates software etc from my private repo. I've deployed maybe 200 devices using this method.
-
@crispyoz Hello, thank you for your answer. It is possible. However, I have no experience with package repositories and bootloader changes after first wifi connection.
Do you have any information, tutorials or information in this area?
thanks for advances
-
@Jean-Marc-FAGES no bootloader changes are required. This is how you do it.
Make your own version of the firmware which will include some customised files, specifically you create a hotplug script (google openwrt hotplug) it is well documented.
Here is one of mine that lives in /etc/hotplug.d/iface/40-setup:
WIFI_INTERFACE="wwan"
echo "Starting interace hotplug ${DEVICE} Action: ${ACTION} Interface: ${INTERFACE}" >> /tmp/cblog
if [ "$ACTION" = "ifup" -a "$INTERFACE" = "wwan" ]; then
echo "IFUP ${DEVICE}" >> /tmp/cblog
rm -f /etc/hotplug.d/iface/40-setup
echo "Run script for device: ${DEVICE}" >> /tmp/cblog
echo "nameserver $(ip -o -4 a s apcli0 | awk '{ print $4 }' | cut -d/ -f1)" >> /etc/resolv.conf
/etc/init.d/myservice enable
/etc/myapp/setup.sh
rm -f /etc/myapp/setup.sh
fi
This script is run when the WWAN interface come up (connected to wifi) and among other things calls a setup script that pulls some files down from my setup repository, enables some services and configures some crontab stuff.
Hope that gives you some direction.
-
@crispyoz hello, indeed, I start to be oriented, but the way will be long. I'll write all this. My project also involves a lot of other things to validate.
I know now that it is possible.
As I understand it, there is still for each Onion a configuration to do. The main interest is that there is a possible update after IOTs are deployed?
I will dig your tracks, thank you again. Jean Marc
-
@Jean-Marc-FAGES if you look at the "UCI" tool, you can see that it is easy to include configuration commands in your setup script.