Skip to content

Loading builds...

Changes

#157 (Apr 2, 2026, 10:03:16 AM)

contrib/jenkins: add SKIP_FIRMWARE_CLEAN argument

If this is set, then don't clean the firmware at the end. This is needed
to store the built firmware as artifact in jenkins, for passing it along
to another job.

Related: SYS#7963
Change-Id: I9e2342b8111645ef5d3b7bf4ac364ca592aa600b
Oliver Smith at

#156 (Mar 30, 2026, 2:09:47 PM)

firmware: werror on missing return

Silently ignoring a missing return just broke all timers,
so prevent similar mistakes in the future.

Change-Id: I2e25884077af6334c9e9ddace3900b04061fae04
ewild at

#155 (Mar 30, 2026, 2:02:44 PM)

firmware: fix timers, add missing return

Change-Id: I5b12284c88d8fe6e4fe55cc4cd2aad550d276af4
ewild at

#154 (Mar 27, 2026, 7:55:07 PM)

firmware: replace libosmocore fsm timers

Concurrent access from main loop and the different uart irqs was not
going well and caused crashes. The libosmocore fsm does still allocate
one internal timer, but it is not used by the firmware, so libosmocore
will not touch the rbtree.

Additionally ignore checkpatch jiffies complaints because we're trying
to do firmware here.

Closes: SYS#7877
Change-Id: Id2bd67b3946bb451008965f0b68b4a919f4d10bd
ewild at

#153 (Mar 27, 2026, 6:15:19 PM)

firmware: replace libosmocore fsm timers

Concurrent access from main loop and the different uart irqs was not
going well and caused crashes. The libosmocore fsm does still allocate
one internal timer, but it is not used by the firmware, so libosmocore
will not touch the rbtree.

Additionally ignore checkpatch jiffies complaints because we're trying
to do firmware here.

Closes: SYS#7877
Change-Id: Id2bd67b3946bb451008965f0b68b4a919f4d10bd
ewild at

#152 (Mar 26, 2026, 5:35:28 PM)

firmware: add tear-free 64bit load/store helpers for jiffies

On Cortex-M4 a 64bit load may compile to two separate LDR
instructions which can lead to torn reads due to interrupts.
LDRD/STRD are restartable, they either complete or restart from
scratch, so the result is always consistent. The only "downside" is the
required alignment, which is fine.

Change-Id: I729c0fdfb5b228b03c2df1cf098743100b1ea625
ewild at

#151 (Mar 26, 2026, 5:35:28 PM)

firmware: replace libosmocore fsm timers

Concurrent access from main loop and the different uart irqs was not
going well and caused crashes. The libosmocore fsm does still allocate
one internal timer, but it is not used by the firmware, so libosmocore
will not touch the rbtree.

Additionally ignore checkpatch jiffies complaints because we're trying
to do firmware here.

Closes: SYS#7877
Change-Id: Id2bd67b3946bb451008965f0b68b4a919f4d10bd
ewild at

#150 (Mar 26, 2026, 3:57:44 PM)

firmware: replace libosmocore fsm timers

Concurrent access from main loop and the different uart irqs was not
going well and caused crashes. The libosmocore fsm does still allocate
one internal timer, but it is not used by the firmware, so libosmocore
will not touch the rbtree.

Additionally ignore checkpatch jiffies complaints because we're trying
to do firmware here.

Closes: SYS#7877
Change-Id: Id2bd67b3946bb451008965f0b68b4a919f4d10bd
ewild at

#149 (Mar 26, 2026, 3:57:44 PM)

firmware: add tear-free 64bit load/store helpers for jiffies

On Cortex-M4 a 64bit load may compile to two separate LDR
instructions which can lead to torn reads due to interrupts.
LDRD/STRD are restartable, they either complete or restart from
scratch, so the result is always consistent. The only "downside" is the
required alignment, which is fine.

Change-Id: I729c0fdfb5b228b03c2df1cf098743100b1ea625
ewild at

#148 (Mar 26, 2026, 12:42:11 PM)

firmware: replace libosmocore fsm timers

Concurrent access from main loop and the different uart irqs was not
going well and caused crashes. The libosmocore fsm does still allocate
one internal timer, but it is not used by the firmware, so libosmocore
will not touch the rbtree.

Additionally ignore checkpatch jiffies complaints because we're trying
to do firmware here.

Closes: SYS#7877
Change-Id: Id2bd67b3946bb451008965f0b68b4a919f4d10bd
ewild at

#147 (Mar 26, 2026, 12:37:16 PM)

firmware: add tear-free 64bit load/store helpers for jiffies

On Cortex-M4 a 64bit load may compile to two separate LDR
instructions which can lead to torn reads due to interrupts.
LDRD/STRD are restartable, they either complete or restart from
scratch, so the result is always consistent. The only "downside" is the
required alignment, which is fine.

Change-Id: I729c0fdfb5b228b03c2df1cf098743100b1ea625
ewild at

#146 (Mar 26, 2026, 12:37:16 PM)

firmware: replace libosmocore fsm timers

Concurrent access from main loop and the different uart irqs was not
going well and caused crashes. The libosmocore fsm does still allocate
one internal timer, but it is not used by the firmware, so libosmocore
will not touch the rbtree.

Additionally ignore checkpatch jiffies complaints because we're trying
to do firmware here.

Closes: SYS#7877
Change-Id: Id2bd67b3946bb451008965f0b68b4a919f4d10bd
ewild at

#145 (Mar 24, 2026, 4:42:52 PM)

firmware: replace libosmocore fsm timers

Concurrent access from main loop and the different uart irqs was not
going well and caused crashes. The libosmocore fsm does still allocate
one internal timer, but it is not used by the firmware, so libosmocore
will not touch the rbtree.

This clashes with the host build which does not have jiffies, and
is pretty much a burden because it requires special casing code due to
the completely different targets even though it was last used many years
ago and might not even work, so disable it.

Additionally ignore checkpatch jiffies complaints because we're trying
to do firmware here.

Closes: SYS#7877
Change-Id: Id2bd67b3946bb451008965f0b68b4a919f4d10bd
ewild at

#144 (Mar 24, 2026, 3:52:23 PM)

firmware: replace libosmocore fsm timers

Concurrent access from main loop and the different uart irqs was not
going well and caused crashes. The libosmocore fsm does still allocate
one internal timer, but it is not used by the firmware, so libosmocore
will not touch the rbtree.

This clashes with the host build which does not have jiffies, and
is pretty much a burden because it requires special casing code due to
the completely different targets even though it was last used many years
ago and might not even work, so disable it.

Additionally ignore checkpatch jiffies complaints because we're trying
to do firmware here.

Closes: SYS#7877
Change-Id: Id2bd67b3946bb451008965f0b68b4a919f4d10bd
ewild at

#143 (Mar 24, 2026, 3:43:49 PM)

firmware: replace libosmocore fsm timers

Concurrent access from main loop and the different uart irqs was not
going well and caused crashes. The libosmocore fsm does still allocate
one internal timer, but it is not used by the firmware, so libosmocore
will not touch the rbtree.

This clashes with the host build which does not have jiffies, and
is pretty much a burden because it requires special casing code due to
the completely different targets even though it was last used many years
ago and might not even work, so disable it.

Closes: SYS#7877
Change-Id: Id2bd67b3946bb451008965f0b68b4a919f4d10bd
ewild at

#142 (Mar 24, 2026, 3:12:14 PM)

firmware: replace libosmocore fsm timers

Concurrent access from main loop and the different uart irqs was not
going well and caused crashes. The libosmocore fsm does still allocate
one internal timer, but it is not used by the firmware, so libosmocore
will not touch the rbtree.

Closes: SYS#7877
Change-Id: Id2bd67b3946bb451008965f0b68b4a919f4d10bd
ewild at

#141 (Mar 13, 2026, 7:24:55 PM)

fw source: force reformat once and for all

This commit applies the rules to all files that matter
(obv excluding asf4 code) since it is impossible to modify code
because the code never used the code style enforced by the
linter/clang-format and
1) changing code
2) reformatting code
3) extracting the reformatting changes for the modified lines as a
separate commit
4) commiting standalone reformatting changes
4) commiting the actual code change on top
is a workflow that takes forever and is completely ridiculous because
the whole point of formatter rules is to apply them.

This needs a second commit with .git-blame-ignore-revs to not pollute blame.

Change-Id: Iacc086bb566551225e7a21b639a1ad2ec257484f
ewild at

#140 (Mar 13, 2026, 7:24:55 PM)

formatting: update .clang-format

Updates the formatting rules derived from linux kernel
098b6e44cbaa2d526d06af90c862d13fb414a0ec

At the same time tell clang-format to keep the bespoke formatting
used for the fsm and usb descs.

Change-Id: I1fd4d38897946693b5495fa4d0b61925eb9d07f7
ewild at

#139 (Mar 13, 2026, 7:24:55 PM)

fw: add git blame ignore file

Reformatting should not pollute blame, so ignore those revs.

Change-Id: I35b86f52d491c9e28ab0af9e3e3d4fd5f6dbd119
ewild at

#138 (Mar 12, 2026, 11:32:18 PM)

Revert "clang-format: set ColumnLimit: 0"

This reverts commit 97caf6244398760ed8b0c5c045867b4bea36f0a0.

Reason for revert: we don't want clang-format to actively generate arbitrarily long line lengths.

Change-Id: I49111af334e6967a9c3a63ccb9d179df444d63bb
gerrit at

#137 (Mar 12, 2026, 5:53:38 PM)

ensure libosmocore logging is properly disabled for builds

Change-Id: I169a059d8daff0a3993318a4ea3ab7adcb05fee3
ewild at

#136 (Mar 12, 2026, 4:21:36 PM)

fw source: force reformat once and for all

This commit applies the rules to all files that matter
(obv excluding asf4 code) since it is impossible to modify code
because the code never used the code style enforced by the
linter/clang-format and
1) changing code
2) reformatting code
3) extracting the reformatting changes for the modified lines as a
separate commit
4) commiting standalone reformatting changes
4) commiting the actual code change on top
is a workflow that takes forever and is completely ridiculous because
the whole point of formatter rules is to apply them.

This needs a second commit with .git-blame-ignore-revs to not pollute blame.

Change-Id: Iacc086bb566551225e7a21b639a1ad2ec257484f
ewild at

#135 (Mar 12, 2026, 4:21:36 PM)

fw: add git blame ignore file

Reformatting should not pollute blame, so ignore those revs.

Change-Id: I35b86f52d491c9e28ab0af9e3e3d4fd5f6dbd119
ewild at

#134 (Mar 11, 2026, 12:18:45 AM)

ccid: properly emit wait time ext messages

The CCID message that tells the host that the card
asked for a wait time extension was missing.

This is a bit weird, because it breaks the 1:1
relationship between messages and responses that
usually exists, nor does it consume a bSeq,
so we just emit WT msgs as appropriate.

It is bounded to prevent msgb exhaustion issues.

Closes: OS#6458
Change-Id: Ib69483d453a0e5ebb1bc1885a8f78790a0f10d70
ewild at

#133 (Mar 10, 2026, 11:41:28 PM)

firmware: fix msgb/list mixed irq access handling

This fixes the mishandling of in_progress and the queues in the submit
functions that are in part irq driven, too, and ensures nothing breaks
by preventing concurrent access from irqs to the queues. Applying the
same pattern to all functions/cases is fine either way.

On top of all of tha the out ep was irq driven, so if submit_next_out
fails it was stuck, now fixed by attempted submit from main loop, and of
course the queue manipulation should be irq safe here as well.

Change-Id: I9212bfa7688cb4d3161ba963b854225744128632
ewild at

#132 (Mar 10, 2026, 11:41:25 PM)

ccid: generate proper error for short messages

Change-Id: I3bf0bebd361666a2f3d0341444415a6f25d2b4bf
ewild at

#131 (Mar 10, 2026, 7:28:15 PM)

ccid: Handle the TPDU-length = 4 case according to CCID spec

While ISO7816-3 forbids any TPDU shorter from 5 bytes, the CCID spec
begs to differ and actually permits a host to send us 4-byte TPDUs of
Form 1, giving the responsibility of adding the P3=00h octet to the CCID
implementation.

Let's implement this accordingly.  While at it, also reject TPDUs of
lengths 1, 2 and 3 bytes - just like zero-length TPDUs.

Change-Id: Ia27962bda526af3373b36d637e2b548aa01a3346
Closes: OS#6973
laforge at

#130 (Mar 10, 2026, 4:03:00 PM)

ccid: properly reject PC_to_RDR_{ResetParameters,SetParameters}

As per CCID 1.1 ch 6.2.3 a reader that does not support
these commands can reject them, which we now do, instead of
pretending to accept the params.

This requires https://gitlab.com/wireshark/wireshark/-/issues/20107 to
be properly decoded in wireshark >= 4.4.8 .

As a bonus this fixes the error response in gen_err_resp which so far had superfluous param data attached to it.

Closes: OS#5380
Change-Id: I4d0671c160e9028097397ec47982bafbfdc24f24
ewild at

#129 (Mar 10, 2026, 3:59:44 PM)

ccid: properly reject PC_to_RDR_{ResetParameters,SetParameters}

As per CCID 1.1 ch 6.2.3 a reader that does not support
these commands can reject them, which we now do, instead of
pretending to accept the params.

This requires https://gitlab.com/wireshark/wireshark/-/issues/20107 to
be properly decoded in wireshark >= 4.4.8 .

Closes: OS#5380
Change-Id: I4d0671c160e9028097397ec47982bafbfdc24f24
ewild at

#128 (Mar 10, 2026, 1:34:16 PM)

ccid: properly emit wait time ext messages

The CCID message that tells the host that the card
asked for a wait time extension was missing.

This is a bit weird, because it breaks the 1:1
relationship between messages and responses that
usually exists, nor does it consume a bSeq,
so we just count and emit WT msgs as appropriate.

Closes: OS#6458
Change-Id: Ib69483d453a0e5ebb1bc1885a8f78790a0f10d70
ewild at

#127 (Mar 10, 2026, 1:22:03 PM)

firmware: enable watchdog timer

2s is plenty, and while not perfect it should at
least ensure that hangs that require manual
intervention happen rarely if at all.

At least from a custimer POV having resets in case
something breaks is better than ending up with non
working devices that are stuck.

Change-Id: I1ef1fc70d33492efe0171a7879c1a23f16957195
ewild at

#126 (Mar 10, 2026, 1:22:02 PM)

ccid: properly emit wait time ext messages

The CCID message that tells the host that the card
asked for a wait time extension was missing.

This is a bit weird, because it breaks the 1:1
relationship between messages and responses that
usually exists, nor does it consume a bSeq,
so we just count and emit WT msgs as appropriate.

Closes: OS#6458
Change-Id: Ib69483d453a0e5ebb1bc1885a8f78790a0f10d70
ewild at

#125 (Mar 10, 2026, 10:34:08 AM)

ccid: Fix CCID RDR_to_PC_Parameters (missing bProtocolNum)

Our RDR_to_PC_Parameters message was broken, as it was missing
the bProtocolNum value after the header.  Let's fix that.

Change-Id: I67d5cb876d20b29f4759d5b194606f34b8b966c4
laforge at

#124 (Mar 10, 2026, 10:34:07 AM)

ccid: Fix [unused] RDR_to_PC_Hardware_Error struct definition

Our definition of the message was wrong; it is an interrupt endpoint
message without the full header of the bulk-in endpoint. Luckily the
definition was not used in the code base, so this is not fixing any
problem visible on the protocol level.

Change-Id: Ieb756c37402c4ebea32cc3cd23ba3842f4c0df3e
laforge at