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

examples/ota: add documentation on how to deliver update via ethos #12

Conversation

fedepell
Copy link

@fedepell fedepell commented Oct 5, 2018

Contribution description

Add documentation on how the OTA procedure can be tested delivering the update via serial interface using the ethos driver

Issues/PRs references

See comments in RIOT-OS#9969

cladmi and others added 30 commits September 19, 2018 15:18
Allow handling full dependencies in cpu
Prepare to move some dependencies out of Makefile.include
It allows module (not in the application) which require the periph_flashpage
feature to correctly also require periph_flash_common

TODO: fix this, it should not be a dependency on FEATURES but USEMODULE.
TODO Rebase message edit at the end.

 * updated to edbg/openocd new variables
 * Use RIOTBOOT_FW_SLOT_SIZE: upcomming PRs should remove
   RIOTBOOT_SLOT1_SIZE and RIOTBOOT_SLOT2_SIZE
 * Use ROM_START_ADDR for 'firmware' to handle iotlab-m3
 * Use ROM_OFFSET and FW_ROM_LEN
 * Info on non supported existing bootloader for the moment in dist/riotboot
 * dist/riotboot: allow running different targets and not only flash
 * RIOTBOOT_HDR_LEN as hexadecimal and can be overwritten
It creates a binary with

    bootloader + slot1-signature + slot1
…nctions

* Except the bootloader, only one slot size is supported
* export RIOTBOOT_ variables
* Set the header length to FIRMWARE_METADATA_SIZE
* Add a warning that 'dist/tools/firmware' should be compiled with the same
  options as the current board
Calculate RIOTBOOT_FW_SLOT_SIZE is calculated as an hexadecimal value and
handles ROM_LEN defined as kilobytes like '512K'
…sh pages

Fix support when FIRMWARE_METADATA_SIZE < FLASHPAGE_SIZE.
On `samr21-xpro` it used 1040 for previously 1024 bytes.
Now it has 2048 bytes.
Adapt from shell/commands/sc_gnrc_netif
kYc0o and others added 18 commits September 19, 2018 15:19
`RIOTBOOT_FW_SLOT_SIZE` contains both the metadata and the firmware.
TODO describe somewhere.
Variables must be exported for `openocd.sh` on `iotlab-m3`.
Variables must be exported for `openocd.sh` on `iotlab-m3`.
As it us using 'export' to the shell for openocd, it does not work properly.
Replace it with calculating the value in a subshell.
make is a bit strange sometimes and considers various factors to decide
the precedence of the rule to be applied: definition order is one (and
the %.signed.bin is after %.bin, and would be also if we put it at the
end of Makefile.include), but also if a rule is implicit is then
preferred no matter the order.

A quite complete and coincise overview of the topic can be found here:
https://stackoverflow.com/questions/28842851/force-make-to-use-a-more-specific-rule

Given the inclusion mechanism used in RIOT it should be safer to
explicitly state things, although may seem ugly sometimes.
makefiles/riotboot.mk: enforce rule precedence (first signed.bin over .bin) for gnu make
@kYc0o
Copy link
Owner

kYc0o commented Oct 5, 2018

Excellent! Thank you so much for the information. I'll test it asap and merge it.

@kYc0o kYc0o self-requested a review October 5, 2018 12:00
@kYc0o kYc0o self-assigned this Oct 5, 2018
@kYc0o kYc0o force-pushed the wip/rebase/ota_work_branch branch from 314a05f to 359ee2e Compare October 30, 2018 16:25
@kYc0o
Copy link
Owner

kYc0o commented Oct 30, 2018

I was trying without success, I have the following output when I try to ping the node:

vagrant@vagrant:~$ ping6 fe80::22e:ceff:fe65:942%tap0
PING fe80::22e:ceff:fe65:942%tap0(fe80::22e:ceff:fe65:942) 56 data bytes
From fe80::70bc:3cff:fe39:e4f3 icmp_seq=1 Destination unreachable: Address unreachable
From fe80::70bc:3cff:fe39:e4f3 icmp_seq=2 Destination unreachable: Address unreachable
From fe80::70bc:3cff:fe39:e4f3 icmp_seq=3 Destination unreachable: Address unreachable

Did you configure the network somehow before running the test?

@kYc0o
Copy link
Owner

kYc0o commented Oct 30, 2018

BTW sorry for the rebase! I think the best is to remove all commits, rebase on the wip branch and then apply your commit.

@fedepell
Copy link
Author

I'm closing this and opening #15 since with rebasing it became quite messy

@kYc0o
Copy link
Owner

kYc0o commented Oct 31, 2018

Great! And sorry again for the mess!

@kYc0o kYc0o closed this Oct 31, 2018
@fedepell
Copy link
Author

As for your question: hmm no I didn't do anything particular except what written in the readme. I see you run in a vagrant box, I wonder if that has some networking limitations. Can you in case send me the "ifconfig tap0" and "route -n" output to see how things look?

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

Successfully merging this pull request may close these issues.

5 participants