Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M4 firmware #3

Closed
modjo756 opened this issue Feb 11, 2016 · 6 comments
Closed

M4 firmware #3

modjo756 opened this issue Feb 11, 2016 · 6 comments
Assignees
Labels

Comments

@modjo756
Copy link
Contributor

The file m4last.fw is not created on the folder /var/opt/M4 (for neo) after the boot. Need to put it manually.

@graugans graugans added the bug label Feb 11, 2016
@graugans graugans self-assigned this Feb 11, 2016
@graugans
Copy link
Owner

Strange, for me it is working after a fresh build and uploading to UDOONeo

root@udooneo:~# ls /var/opt/m4/m4last.fw 
/var/opt/m4/m4last.fw

@modjo756
Copy link
Contributor Author

Ok, this week end i will try to re-build yocto and load the card another time.

@graugans
Copy link
Owner

Please do not reflash. You can check if in the init script (/etc/init.d/udoofota) there is the following line:

 mkdir -p /var/opt/m4/

In case it is still not working as expected you can run

$ /etc/init.d/udoofota stop
$ udooserver

And check the output

Related to swapping SD-Cards in and out I'll add support for swupdate. Feel free to comment on this in #4

@modjo756
Copy link
Contributor Author

Hi graugans, i rebuild a clean yocto for neo (i just saw your message this morning !) but same problem after a boot, see after a log under ssh(tty, eth not working, i will open an issue) :

root@udooneo:~# cat /etc/init.d/udoofota 
#!/bin/sh
#
#   UDOO Firmware Over The Air Server
#

# Script variables
PROG=udooserver
PID=/var/run/udoofota-server.pid
RETURN_VAL=0

start()
{
    # create m4 upload folder
    mkdir -p /var/opt/m4/
    echo "[`date -u '+%F %T %Z'`] (sys) Starting" >> /var/log/udoofota-server.log
    test -x /usr/bin/udooneo-m4uploader ||
    {
        stop
        echo "[`date -u '+%F %T %Z'`] (sys) Error: uploader not found" >> /var/log/udoofota-server.log
        exit 0
    }

    echo "Starting $PROG: "
    start-stop-daemon \
    --start \
    --pidfile $PID \
    -b --exec /usr/bin/udooserver >> /var/log/udoofota-server.log 2>&1
    return $?
}

stop()
{
    echo "[`date -u '+%Y-%m-%d %T %Z'`] (sys) Stopping" >> /var/log/udoofota-server.log
    start-stop-daemon --stop --quiet --pidfile $PID
    return $?
}

status() {
        if [ -s $PID ]; then
                echo "$PROG is running as pid `cat $PID`:"
        else
                echo "$PROG is not running."
        fi
}

restart()
{
    stop
    start
    return $?
}

case "$1" in
 start)
       start
    ;;
 stop)
       stop
    ;;
 status)
       status
    ;;
 restart|reload)
       restart
    ;;
 *)
    /bin/echo "Usage: $0 {start|stop|status|restart|reload}"
    RETURN_VAL=1
esac

exit $RETURN_VAL
root@udooneo:~# cat /var/opt/m4/
cat: /var/opt/m4/: Is a directory
root@udooneo:~# ls /var/opt/m4 
root@udooneo:~# /etc/init.d/udoofota stop
root@udooneo:~# udooserver
bind: Address already in use
root@udooneo:~# 

For info m4last.fw is not present on tmp/image/neo (yocto)

@modjo756
Copy link
Contributor Author

modjo756 commented Mar 6, 2016

Graugans, it seems that now it working correctly (perhaps i'm wrong before) i reload two times a sd card and i can load from arduino ide the board --> you can close the bug (m4last.fw is present on folder)

@graugans
Copy link
Owner

graugans commented Mar 7, 2016

I will close this after a reorganization. The details are described here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants