Skip to content

Commit ba269e0

Browse files
committed
bump Golioth SDK to tip of main
This comes with new Zephyr (v4.3.0) and NCS (v3.1.1) versions. Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
1 parent 9008762 commit ba269e0

14 files changed

Lines changed: 85 additions & 47 deletions

lib/cert.c

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,52 @@ void pouch_gateway_device_cert_abort(struct pouch_gateway_device_cert_context *c
7575
free(context);
7676
}
7777

78+
struct device_cert_set_ctx
79+
{
80+
struct k_sem sem;
81+
enum golioth_status status;
82+
};
83+
84+
static void device_cert_set_callback(struct golioth_client *client,
85+
enum golioth_status status,
86+
const struct golioth_coap_rsp_code *coap_rsp_code,
87+
const char *path,
88+
void *arg)
89+
{
90+
struct device_cert_set_ctx *ctx = arg;
91+
92+
ctx->status = status;
93+
k_sem_give(&ctx->sem);
94+
}
95+
7896
int pouch_gateway_device_cert_finish(struct pouch_gateway_device_cert_context *context)
7997
{
98+
struct device_cert_set_ctx ctx = {};
8099
enum golioth_status status;
81100

101+
k_sem_init(&ctx.sem, 0, 1);
102+
82103
if (IS_ENABLED(CONFIG_POUCH_GATEWAY_CLOUD))
83104
{
84-
status = golioth_gateway_device_cert_set(_client, context->buf, context->len, 5);
105+
status = golioth_gateway_device_cert_set(_client,
106+
context->buf,
107+
context->len,
108+
device_cert_set_callback,
109+
&ctx,
110+
5);
85111
if (status != GOLIOTH_OK)
86112
{
87113
LOG_ERR("Failed to finish device cert: %d", status);
88114
return -EIO;
89115
}
116+
117+
k_sem_take(&ctx.sem, K_FOREVER);
118+
119+
if (ctx.status != GOLIOTH_OK)
120+
{
121+
LOG_ERR("Failed to set cert: %d", ctx.status);
122+
return -EIO;
123+
}
90124
}
91125

92126
pouch_gateway_device_cert_abort(context);

scripts/runners/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
from .bsim_device import BsimDeviceBinaryRunner
2-
from .bsim_phy import BsimPhyBinaryRunner
3-
from .bsim_zephyr import BsimZephyrBinaryRunner
1+
import os
2+
import sys
3+
4+
sys.path.insert(0, os.path.dirname(__file__))
5+
from bsim_device import BsimDeviceBinaryRunner
6+
from bsim_phy import BsimPhyBinaryRunner
7+
from bsim_zephyr import BsimZephyrBinaryRunner

scripts/runners/bsim_device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from pathlib import Path
88

9-
from .bsim_base import BsimBinaryRunnerBase
9+
from bsim_base import BsimBinaryRunnerBase
1010

1111
class BsimDeviceBinaryRunner(BsimBinaryRunnerBase):
1212
"""Runs the BabbleSim arbitrary application."""

scripts/runners/bsim_phy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from pathlib import Path
88

9-
from .bsim_base import BsimBinaryRunnerBase
9+
from bsim_base import BsimBinaryRunnerBase
1010

1111
class BsimPhyBinaryRunner(BsimBinaryRunnerBase):
1212
"""Runs the BabbleSim 2G4 Phy binary."""

scripts/runners/bsim_zephyr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""This file provides a ZephyrBinaryRunner that enables
55
flashing (running) a BabbleSim Zephyr application."""
66

7-
from .bsim_base import BsimBinaryRunnerBase
7+
from bsim_base import BsimBinaryRunnerBase
88

99
class BsimZephyrBinaryRunner(BsimBinaryRunnerBase):
1010
"""Runs the BabbleSim Zephyr application."""

west-ncs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ manifest:
44
projects:
55
- name: golioth
66
path: modules/lib/golioth-firmware-sdk
7-
revision: 60f0e8ab323b6a812fd68759817bc1e27f3258e5
7+
revision: b1747a974e4fea00bc9d706ea9c9909efcdb0c8b
88
url: https://github.com/golioth/golioth-firmware-sdk.git
99
import:
1010
file: west-ncs.yml

west-zephyr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ manifest:
44
projects:
55
- name: golioth
66
path: modules/lib/golioth-firmware-sdk
7-
revision: 60f0e8ab323b6a812fd68759817bc1e27f3258e5
7+
revision: b1747a974e4fea00bc9d706ea9c9909efcdb0c8b
88
url: https://github.com/golioth/golioth-firmware-sdk.git
99
import:
1010
file: west-zephyr.yml

zephyr/patches.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
patches:
22
- path: zephyr/zephyr/0001-drivers-net-nsos-support-nrf_bsim.patch
3-
sha256sum: 25ce052740bb44d2d575a7f3187817cf1f22aa41c6328982f0f1b3c4f8ad7593
3+
sha256sum: 76ee96ad695aba17be8a96d8fe908eec937238fbd9e21be09b8ad9a524b8b90b
44
module: zephyr
55
author: Marcin Niestroj
66
email: m.niestroj@emb.dev
77
date: 2025-01-14
88
apply-command: >-
99
bash -c 'if [ $(west config manifest.file) = "west-zephyr.yml" ]; then git am $@; fi' --
1010
- path: zephyr/zephyr/0002-boards-nrf_bsim-define-NSOS_IRQ-for-offloaded-socket.patch
11-
sha256sum: 13916913dc7f11cd4d5d3ef875da739818e90fac8847f2ce244f3f6705c03149
11+
sha256sum: 7841eab516807fdff2bfbdf5a263c3a4c6b3573ce2a7d7df7522a21749aef32a
1212
module: zephyr
1313
author: Marcin Niestroj
1414
email: m.niestroj@emb.dev
1515
date: 2025-01-14
1616
apply-command: >-
1717
bash -c 'if [ $(west config manifest.file) = "west-zephyr.yml" ]; then git am $@; fi' --
1818
- path: zephyr/zephyr/0003-nsi-move-nsos_fcntl-to-more-generic-nsi_fcntl.patch
19-
sha256sum: 0830899d226a3b7cd1f7b002b8cd746857a41f2a19ee899bfc5cf15773f296c5
19+
sha256sum: 88930ff7892bdb51d01a9416306eb972bec92c08e6bd4f96611450664bdfc3ae
2020
module: zephyr
2121
author: Marcin Niestroj
2222
email: m.niestroj@emb.dev
2323
date: 2025-08-05
2424
apply-command: >-
2525
bash -c 'if [ $(west config manifest.file) = "west-zephyr.yml" ]; then git am $@; fi' --
2626
- path: zephyr/zephyr/0004-nsi-fcntl-add-O_CREAT-and-O_TRUNC.patch
27-
sha256sum: dd53fd69065fa432a38a53176778a529ec7cf89b5823c42fd7fa1fcedfb1fd23
27+
sha256sum: 2839473d364cb08110ed0b825bd5099541540739c186dae7bdaf8d975c78132b
2828
module: zephyr
2929
author: Marcin Niestroj
3030
email: m.niestroj@emb.dev
3131
date: 2025-08-14
3232
apply-command: >-
3333
bash -c 'if [ $(west config manifest.file) = "west-zephyr.yml" ]; then git am $@; fi' --
3434
- path: zephyr/zephyr/0005-subsys-fs-nsim_mount-new-FS-for-mounting-host-filesy.patch
35-
sha256sum: 7380f056216807ca15d220233e38b3b407c0b1fb825e5b4794ae6c926b13e4f0
35+
sha256sum: 38a053f49ab2c109347bfde5a1c4d0c163ff2e5859adc1c50a52b04976733229
3636
module: zephyr
3737
author: Marcin Niestroj
3838
email: m.niestroj@emb.dev
3939
date: 2025-08-14
4040
apply-command: >-
4141
bash -c 'if [ $(west config manifest.file) = "west-zephyr.yml" ]; then git am $@; fi' --
4242
- path: zephyr/zephyr/0006-tests-fs-nsim_mount-add-basic-tests-for-implemented-.patch
43-
sha256sum: 5117af152443b7d703e7c8b0fafa76a1d3cf34e5077b1587fbe09583129bbaad
43+
sha256sum: 1a1973a8682684cbe241c873d4f381b9df52bbba47e82a927e71b3cdce58b2e1
4444
module: zephyr
4545
author: Marcin Niestroj
4646
email: m.niestroj@emb.dev

zephyr/patches/zephyr/zephyr/0001-drivers-net-nsos-support-nrf_bsim.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 073a10f50ff7275970471af29f27b6ba5c4b17b5 Mon Sep 17 00:00:00 2001
1+
From 8d013089772fd106241a90255c5b12ed40d1fddd Mon Sep 17 00:00:00 2001
22
From: Marcin Niestroj <m.niestroj@emb.dev>
33
Date: Tue, 14 Jan 2025 16:53:03 +0100
44
Subject: [PATCH] drivers: net: nsos: support nrf_bsim
@@ -14,7 +14,7 @@ Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
1414
1 file changed, 4 insertions(+)
1515

1616
diff --git a/drivers/net/nsos_adapt.c b/drivers/net/nsos_adapt.c
17-
index d1631efc651..9e908982e38 100644
17+
index 377649cdd1f..5e2976e49f0 100644
1818
--- a/drivers/net/nsos_adapt.c
1919
+++ b/drivers/net/nsos_adapt.c
2020
@@ -1164,7 +1164,11 @@ static void nsos_adapt_poll_triggered(void)
@@ -30,5 +30,5 @@ index d1631efc651..9e908982e38 100644
3030
} else {
3131
nsos_adapt_poll_time = nsi_hws_get_time() + NSOS_EPOLL_WAIT_INTERVAL;
3232
--
33-
2.51.0
33+
2.52.0
3434

zephyr/patches/zephyr/zephyr/0002-boards-nrf_bsim-define-NSOS_IRQ-for-offloaded-socket.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From dacb35a6427d1f177bada3e10cea8162af5c0757 Mon Sep 17 00:00:00 2001
1+
From 3d2a38e73f028b1c1333331e9250f280efbb8e10 Mon Sep 17 00:00:00 2001
22
From: Marcin Niestroj <m.niestroj@emb.dev>
33
Date: Tue, 14 Jan 2025 17:02:25 +0100
44
Subject: [PATCH] boards: nrf_bsim: define NSOS_IRQ for offloaded sockets
@@ -18,7 +18,7 @@ Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
1818
1 file changed, 6 insertions(+), 1 deletion(-)
1919

2020
diff --git a/boards/native/nrf_bsim/board_soc.h b/boards/native/nrf_bsim/board_soc.h
21-
index e0b1cb60a59..a99916ec2cf 100644
21+
index ee77478caab..609038feee1 100644
2222
--- a/boards/native/nrf_bsim/board_soc.h
2323
+++ b/boards/native/nrf_bsim/board_soc.h
2424
@@ -19,6 +19,7 @@
@@ -52,5 +52,5 @@ index e0b1cb60a59..a99916ec2cf 100644
5252
#define FLASH_PAGE_MAX_CNT 256UL
5353

5454
--
55-
2.51.0
55+
2.52.0
5656

0 commit comments

Comments
 (0)