Skip to content

Commit b71d845

Browse files
committed
backend/bitbox02: update dev mcu and ble firmwares
Compiled from BitBoxSwiss/bitbox02-firmware@2544f08. BLE fw binary also taken from there. We only update the multi firmware as all our testing devies are multis. We upgrade ignoring errors as it is unsigned (we prepend the v9.22 sigs just to have the right format).
1 parent 9e42e21 commit b71d845

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed
Binary file not shown.

backend/devices/bitbox02bootloader/device.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"github.com/BitBoxSwiss/bitbox-wallet-app/util/observable"
2828
"github.com/BitBoxSwiss/bitbox-wallet-app/util/observable/action"
2929
"github.com/BitBoxSwiss/bitbox02-api-go/api/bootloader"
30+
"github.com/BitBoxSwiss/bitbox02-api-go/api/common"
3031
bitbox02common "github.com/BitBoxSwiss/bitbox02-api-go/api/common"
3132
"github.com/BitBoxSwiss/bitbox02-api-go/util/semver"
3233
"github.com/sirupsen/logrus"
@@ -196,7 +197,14 @@ func (device *Device) UpgradeFirmware() error {
196197
if err != nil {
197198
return err
198199
}
199-
return device.Device.UpgradeFirmware(signedBinary)
200+
if err := device.Device.UpgradeFirmware(signedBinary); err != nil {
201+
// Ignore sig errors for the Plus firmware while we are testing with unsigned firmwares.
202+
if plusIsPlaceholder && product == common.ProductBitBox02PlusMulti {
203+
return device.Reboot()
204+
}
205+
return err
206+
}
207+
return nil
200208
}
201209

202210
// VersionInfo contains version information about the upgrade.

backend/devices/bitbox02bootloader/firmware.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ var firmwareBB02PlusBinaryBTCOnly []byte
5151
var firmwareBB02PlusVersionBTCOnly = semver.NewSemVer(9, 22, 0)
5252
var firmwareBB02PlusMonotonicVersionBtcOnly uint32 = 42
5353

54+
// TODO: set to false / remove before production. This is only to allow upgrading unsigned firmware.
55+
const plusIsPlaceholder = true
56+
5457
//go:embed assets/firmware-bb02plus-multi.v9.22.0.signed.bin.gz
5558
var firmwareBB02PlusBinaryMulti []byte
5659
var firmwareBB02PlusVersionMulti = semver.NewSemVer(9, 22, 0)

0 commit comments

Comments
 (0)