Anyway I did the following steps.
As starting point I'd like to add a file (TEST) in /home/root on the target.
On the HOST
------------------
1. Create the script (build-swu) to generate a .swu (my-software.swu)
#! /bin/sh
CONTAINER_VER="1.0"
PRODUCT_NAME="my-software"
FILES="sw-description \
TEST"
for i in $FILES;do
echo $i;done | cpio -ov -H crc > ${PRODUCT_NAME}_${CONTAINER_VER}.swu
2. Create the description file (sw-description)
// sw-description
software =
{
version = "0.1.0";
hardware-compatibility: [ "1.0"];
files: (
{
filename = "TEST";
path = "/home/root/TEST";
device = "/dev/mmcblk0p2";
filesystem = "ext4";
}
);
}
3. Run the script (build-swu)
$ ./build-swu
sw-description
TEST
2 blocchi
On the TARGET
------------------
1. Run swupdate my-software.swu
# swupdate -v -w "-document_root /home/root"
root@beaglebone:~# swupdate -v -w "-document_root /home/root"
Swupdate v2016.10.0
Licensed under GPLv2. See source distribution for detailed copyright notices.
Searching for custom LUA handlers :[string "require ("swupdate_handlers")"]:1: module 'swupdate_handlers' not found:
no field package.preload['swupdate_handlers']
no file '/usr/share/lua/5.3/swupdate_handlers.lua'
no file '/usr/share/lua/5.3/swupdate_handlers/init.lua'
no file '/usr/lib/lua/5.3/swupdate_handlers.lua'
no file '/usr/lib/lua/5.3/swupdate_handlers/init.lua'
no file './swupdate_handlers.lua'
no file './swupdate_handlers/init.lua'
no file '/usr/lib/lua/5.3/swupdate_handlers.so'
no file '/usr/lib/lua/5.3/loadall.so'
no file './swupdate_handlers.so'
Custom handlers not found, no error, skipping...
Registered handlers:
flash
raw
rawfile
lua
shellscript
preinstall
postinstall
uboot
Main loop Daemon
Mongoose web server v. 3.8 started on port(s) 8080 with web root [/home/root]
...I can access to the TARGET http://192.168.0.184:8080/ from my broswer
Questions
------------------
*. What is the error : module 'swupdate_handlers' not found
*. Looks like the update hasn't run, what is expected?
*. Is it possible to copy one single file (my TEST file)?
*. What is the purpose of /etc/fw_env.config
*. What is the purpose of /etc/swversion
TIA
--
Marco