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

[WIP] [TF:OTA] OTA updates common work branch #9969

Closed
wants to merge 41 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
f8fa196
REWORD ME riotboot: introduce riot-based minimal bootloader
kaspar030 Jun 15, 2017
37ff3d0
makefiles/riotboot: generate separate .signed.bin file
cladmi Jun 5, 2018
219701e
makefiles/riotboot: allow generating a combined binary
cladmi Jun 6, 2018
7c46949
EDIT/REWORD ME sys/firmware: initial import of firmware management fu…
kaspar030 Jun 16, 2017
9726a30
dist/tools/firmware: initial import of firmware metadata tools
kaspar030 Jun 16, 2017
a5ba1eb
cpu/cortexm_common: set MSP instead of PSP in cpu_jump_to_image()
kaspar030 Oct 5, 2017
8a884be
cpu/cortexm_common: initial multislot support
kaspar030 Jun 15, 2017
78d2b65
sys/ota: introduce CoAP OTA module
kaspar030 Mar 14, 2018
b721c08
examples/ota: initial commit of OTA example
kaspar030 Mar 14, 2018
666fd8f
Split update into firmware_simple and firmware_flashwrite
bergzand Apr 24, 2018
7d59ee4
firmware: remove metadata_type from struct
bergzand May 2, 2018
eccb8fd
suit: Initial include of SUIT manifest parser
bergzand May 23, 2018
1c4dd2d
Add conditional support
bergzand May 29, 2018
2797b25
ota_suit: Initial work
bergzand May 29, 2018
810834b
TODO BACKPORT IN INITIAL COMMITS firmware: fix support for bigger fla…
cladmi Jun 6, 2018
4c157f3
getters for the uuids
bergzand May 29, 2018
87591d4
Add simple url extraction
bergzand May 29, 2018
bb14500
url parsing
bergzand May 29, 2018
2383c60
Update
bergzand Jun 5, 2018
7a0406e
gen_manifest: add raw option
bergzand Jun 5, 2018
0687386
suit_updater: generate the keys.h from firmware.pub.key
cladmi Jun 5, 2018
517db38
DEBUG COMMIT REMOVE ME suit_updater: add ps debug output
cladmi Jun 5, 2018
be89133
DEBUG COMMIT sys/firmware: HACK disable _update_time as it is not wor…
cladmi Jun 5, 2018
964d531
ota_suit: increase STACKSIZE as it overflowed
cladmi Jun 5, 2018
8a64c07
DEBUG COMMIT: suit_updater: add global ipv6 addresses print
cladmi Jun 6, 2018
49585a0
firmware: add some debug information for flashwrite_putbytes
cladmi Jun 6, 2018
efdb9e1
fixup! ota_suit: Initial work
kYc0o Sep 14, 2018
cb0bf41
fixup! examples/ota: initial commit of OTA example
kYc0o Sep 14, 2018
957c40e
fixup! ota_suit: Initial work
kYc0o Sep 14, 2018
922ce91
fixup! sys/ota: introduce CoAP OTA module
kYc0o Sep 14, 2018
da1747b
fixup! fixup! sys/ota: introduce CoAP OTA module
kYc0o Sep 14, 2018
4ef8e7e
fixup! makefiles/riotboot: generate separate .signed.bin file
kYc0o Sep 14, 2018
12af153
fixup! ota_suit: Initial work
kYc0o Sep 14, 2018
dfb5bbc
fixup! ota_suit: Initial work
kYc0o Sep 14, 2018
ca8afb4
squash! REWORD ME riotboot: introduce riot-based minimal bootloader
cladmi Sep 17, 2018
0772c54
Fix FIRMWARE_METADATA_SIZE typo in riotboot.mk
fedepell Sep 17, 2018
373366c
squash! makefiles/riotboot: generate separate .signed.bin file
cladmi Sep 19, 2018
fc6ff36
fixup! makefiles/riotboot: allow generating a combined binary
cladmi Sep 19, 2018
4405b86
squash! squash! makefiles/riotboot: generate separate .signed.bin file
cladmi Sep 19, 2018
7004953
examples/ota: tiny documentation fix
fedepell Sep 20, 2018
359ee2e
makefiles/riotboot.mk: enforce rule precedence (signed.bin before .bin)
fedepell Sep 20, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DEBUG COMMIT: suit_updater: add global ipv6 addresses print
Adapt from shell/commands/sc_gnrc_netif
  • Loading branch information
cladmi authored and kYc0o committed Oct 30, 2018
commit 8a64c07b58fe55a94ed66b99d941096490c590c2
41 changes: 41 additions & 0 deletions examples/suit_updater/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,51 @@
#include "net/ota_suit.h"
#include "firmware/manifest.h"
#include "xtimer.h"

#include "net/ipv6/addr.h"

#include "ps.h"

#define MAIN_QUEUE_SIZE (4)
static msg_t _main_msg_queue[MAIN_QUEUE_SIZE];

static void print_iface_addresses(kernel_pid_t iface);

static void print_interfaces_addresses(void)
{
gnrc_netif_t *netif = NULL;
while ((netif = gnrc_netif_iter(netif))) {
print_iface_addresses(netif->pid);
}
}

static void print_iface_addresses(kernel_pid_t iface)
{
char addr_str[IPV6_ADDR_MAX_STR_LEN];
ipv6_addr_t ipv6_addrs[GNRC_NETIF_IPV6_ADDRS_NUMOF];
int res = gnrc_netapi_get(iface, NETOPT_IPV6_ADDR, 0, ipv6_addrs,
sizeof(ipv6_addrs));

if (res < 0) {
return;
}
uint8_t ipv6_addrs_flags[GNRC_NETIF_IPV6_ADDRS_NUMOF];

memset(ipv6_addrs_flags, 0, sizeof(ipv6_addrs_flags));
/* assume it to succeed (otherwise array will stay 0) */
gnrc_netapi_get(iface, NETOPT_IPV6_ADDR_FLAGS, 0, ipv6_addrs_flags,
sizeof(ipv6_addrs_flags));

for (unsigned i = 0; i < (res / sizeof(ipv6_addr_t)); i++) {
/* print only global addresses */
if (ipv6_addr_is_link_local(&ipv6_addrs[i])) {
continue;
}
ipv6_addr_to_str(addr_str, &ipv6_addrs[i], sizeof(addr_str));
printf("iface %u inet6 addr: %s\n", iface, addr_str);
}
}

int main(void)
{
/* we need a message queue for the thread running the shell in order to
Expand All @@ -49,6 +89,7 @@ int main(void)
while(1) {
xtimer_sleep(10);
ps();
print_interfaces_addresses();
}

/* should be never reached */
Expand Down