Skip to content

Commit 079d768

Browse files
committed
Merge remote-tracking branch 'benma/rembase-bootloader'
2 parents 2e652d1 + d8d5128 commit 079d768

File tree

5 files changed

+0
-69
lines changed

5 files changed

+0
-69
lines changed

.ci/ci

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ make -j8 bootloader-btc
4040
make -j8 bootloader-btc-development
4141
make -j8 bootloader-btc-production
4242

43-
make -j8 bootloader-bitboxbase
44-
make -j8 bootloader-bitboxbase-development
45-
make -j8 bootloader-bitboxbase-production
46-
4743
# Firmware
4844
make -j8 firmware
4945
make -j8 firmware-btc

Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,6 @@ bootloader-btc-development: | build
8080
$(MAKE) -C build bootloader-btc-development.elf
8181
bootloader-btc-production: | build
8282
$(MAKE) -C build bootloader-btc-production.elf
83-
bootloader-bitboxbase: | build
84-
$(MAKE) -C build bootloader-bitboxbase.elf
85-
bootloader-bitboxbase-development: | build
86-
$(MAKE) -C build bootloader-bitboxbase-development.elf
87-
bootloader-bitboxbase-production: | build
88-
$(MAKE) -C build bootloader-bitboxbase-production.elf
8983
factory-setup: | build
9084
$(MAKE) -C build factory-setup.elf
9185
factory-setup-bitboxbase: | build

src/CMakeLists.txt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -495,14 +495,8 @@ set(BOOTLOADERS-BITBOX02
495495
bootloader-btc-development # Runs signed/unsigned firmware and has bootloader menu
496496
bootloader-btc-production # Runs signed (btc-only keys) firmware and bootloader is locked
497497
)
498-
set(BOOTLOADERS-BITBOXBASE
499-
bootloader-bitboxbase # Runs signed (base keys) firmware
500-
bootloader-bitboxbase-development # Runs signed/unsigned firmware and has bootloader menu
501-
bootloader-bitboxbase-production # Runs signed (base keys) firmware and bootloader is locked
502-
)
503498
set(BOOTLOADERS
504499
${BOOTLOADERS-BITBOX02}
505-
${BOOTLOADERS-BITBOXBASE}
506500
)
507501
set(BOOTLOADERS ${BOOTLOADERS} PARENT_SCOPE)
508502

@@ -619,10 +613,6 @@ if(CMAKE_CROSSCOMPILING)
619613
target_sources(${bootloader}.elf PRIVATE ${PLATFORM-BITBOX02-SOURCES})
620614
endforeach(bootloader)
621615

622-
foreach(bootloader ${BOOTLOADERS-BITBOXBASE})
623-
target_sources(${bootloader}.elf PRIVATE ${PLATFORM-BITBOXBASE-SOURCES})
624-
endforeach(bootloader)
625-
626616
target_compile_definitions(bootloader.elf PRIVATE PRODUCT_BITBOX_MULTI)
627617
target_compile_definitions(bootloader-development.elf PRIVATE PRODUCT_BITBOX_MULTI BOOTLOADER_DEVDEVICE)
628618
target_compile_definitions(bootloader-development-locked.elf PRIVATE PRODUCT_BITBOX_MULTI BOOTLOADER_DEVDEVICE BOOTLOADER_PRODUCTION)
@@ -637,11 +627,6 @@ if(CMAKE_CROSSCOMPILING)
637627
target_compile_definitions(bootloader-btc-production.elf PRIVATE PRODUCT_BITBOX_BTCONLY BOOTLOADER_PRODUCTION)
638628
set_property(TARGET bootloader-btc-production.elf PROPERTY EXCLUDE_FROM_ALL ON)
639629

640-
target_compile_definitions(bootloader-bitboxbase.elf PRIVATE PRODUCT_BITBOX_BASE)
641-
target_compile_definitions(bootloader-bitboxbase-development.elf PRIVATE BOOTLOADER_DEVDEVICE PRODUCT_BITBOX_BASE)
642-
target_compile_definitions(bootloader-bitboxbase-production.elf PRIVATE BOOTLOADER_PRODUCTION PRODUCT_BITBOX_BASE)
643-
set_property(TARGET bootloader-bitboxbase-production.elf PROPERTY EXCLUDE_FROM_ALL ON)
644-
645630
foreach(firmware ${FIRMWARES})
646631
set(elf ${firmware}.elf)
647632
add_executable(${elf} ${FIRMWARE-SOURCES})

src/bootloader/bootloader.c

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
#include "bootloader.h"
1616
#include "bootloader_version.h"
17-
#include "leds.h"
1817
#include "mpu_regions.h"
1918

2019
#include <driver_init.h>
@@ -31,13 +30,8 @@
3130
#include <ui/fonts/arial_fonts.h>
3231
#include <ui/oled/oled.h>
3332
#include <ui/ugui/ugui.h>
34-
#if PLATFORM_BITBOXBASE == 1
35-
#include <usart/usart.h>
36-
#include <usart/usart_frame.h>
37-
#elif PLATFORM_BITBOX02 == 1
3833
#include <usb/usb.h>
3934
#include <usb/usb_packet.h>
40-
#endif
4135
#include <usb/usb_processing.h>
4236
#include <util.h>
4337

@@ -223,27 +217,6 @@ static const uint8_t _root_pubkeys[BOOT_NUM_ROOT_SIGNING_KEYS][BOOT_PUBKEY_LEN]
223217
0x1b, 0xec, 0x2b, 0x99, 0x40, 0x61, 0x3e, 0xef, 0xe7, 0x9e, 0x6a, 0x2b, 0x10, 0xbe, 0xda, 0xc2,
224218
},
225219
};
226-
#elif PRODUCT_BITBOX_BASE == 1
227-
static const uint8_t _root_pubkeys[BOOT_NUM_ROOT_SIGNING_KEYS][BOOT_PUBKEY_LEN] = { // order is important
228-
{
229-
0x89, 0x61, 0xff, 0xaa, 0x89, 0x9b, 0x9d, 0x2d, 0x71, 0xee, 0x31, 0x62, 0xe2, 0x01, 0x20, 0xbe,
230-
0x63, 0x0a, 0xfb, 0x5d, 0xf3, 0x5c, 0x99, 0xbf, 0x10, 0xa9, 0x15, 0xbf, 0x48, 0xd2, 0xc6, 0xf6,
231-
0xa0, 0x83, 0xbe, 0x8b, 0xb5, 0x35, 0xf7, 0x69, 0x67, 0xc8, 0x2a, 0xa5, 0xdd, 0x5a, 0xe8, 0x7e,
232-
0x3e, 0xe6, 0xa0, 0x4d, 0x87, 0x9c, 0xba, 0x08, 0x3a, 0x46, 0x63, 0x62, 0xb7, 0xc1, 0x86, 0x35,
233-
},
234-
{
235-
0x3a, 0xb8, 0x77, 0x41, 0x6e, 0x4e, 0x1d, 0xfc, 0xcb, 0x5c, 0xec, 0xdd, 0xf5, 0xfb, 0x42, 0x18,
236-
0x51, 0x1b, 0xe3, 0x5e, 0x23, 0x06, 0x9e, 0x86, 0x20, 0x0c, 0x79, 0x7e, 0xc7, 0xc5, 0xd7, 0xe3,
237-
0x04, 0x1e, 0xc7, 0x23, 0xec, 0x1e, 0xae, 0xbe, 0xf2, 0x22, 0xad, 0x60, 0xda, 0x93, 0xea, 0xe7,
238-
0xf0, 0x60, 0x48, 0xd1, 0x66, 0x34, 0xf9, 0xf0, 0xcb, 0xa9, 0x7a, 0x26, 0x50, 0x2a, 0x01, 0xd1,
239-
},
240-
{
241-
0x03, 0xc9, 0xb2, 0xd1, 0xea, 0x13, 0x6a, 0x0c, 0x5f, 0xe5, 0x01, 0x91, 0x32, 0xe6, 0x57, 0xf4,
242-
0x2d, 0xfa, 0x75, 0x8f, 0x74, 0xb0, 0xb3, 0xe3, 0x74, 0x0e, 0x51, 0xdc, 0x5f, 0x7f, 0xd6, 0x0d,
243-
0xdb, 0x00, 0x94, 0x7a, 0xa3, 0x2a, 0xff, 0x05, 0x20, 0xa9, 0x66, 0xfc, 0xe7, 0xdd, 0x2a, 0x81,
244-
0x8e, 0x6c, 0xd1, 0x48, 0xc3, 0x54, 0x8a, 0x9d, 0xfb, 0x6b, 0xdf, 0x61, 0xd6, 0xc4, 0xf3, 0xee,
245-
},
246-
};
247220
#else
248221
#error "unknown product"
249222
#endif
@@ -831,16 +804,12 @@ static void _api_reboot(void)
831804

832805
static size_t _api_screen_rotate(uint8_t* output)
833806
{
834-
#if PLATFORM_BITBOX02 == 1
835807
if (_loading_ready) {
836808
return _report_status(OP_STATUS_ERR_LOAD_FLAG, output);
837809
}
838810
screen_rotate();
839811
_render_default_screen();
840812
return _report_status(OP_STATUS_OK, output);
841-
#elif PLATFORM_BITBOXBASE == 1
842-
return _report_status(OP_STATUS_ERR_INVALID_CMD, output);
843-
#endif
844813
}
845814

846815
static size_t _api_command(const uint8_t* input, uint8_t* output, const size_t max_out_len)
@@ -1026,15 +995,10 @@ void bootloader_jump(void)
1026995

1027996
if (shared_data.fields.auto_enter != sectrue_u8) {
1028997
#ifdef BOOTLOADER_DEVDEVICE
1029-
#if PLATFORM_BITBOXBASE == 1
1030-
// We don't have touch on base dev bootloader yet
1031-
_binary_exec();
1032-
#elif PLATFORM_BITBOX02 == 1
1033998
if (!_devdevice_enter(_firmware_verified_jump(&bootdata, secfalse_u32))) {
1034999
_binary_exec();
10351000
/* no return */
10361001
}
1037-
#endif
10381002
#else
10391003
_firmware_verified_jump(&bootdata, sectrue_u32); // no return if firmware is valid
10401004
_render_message("Firmware\ninvalid\n \nEntering bootloader", 3000);
@@ -1044,12 +1008,7 @@ void bootloader_jump(void)
10441008
// App not entered. Start USB API to receive boot commands
10451009
_compute_is_app_flash_empty();
10461010
_render_default_screen();
1047-
#if PLATFORM_BITBOX02 == 1
10481011
if (usb_start(_api_setup) != ERR_NONE) {
10491012
_render_message("Failed to initialize USB", 0);
10501013
}
1051-
#elif PLATFORM_BITBOXBASE == 1
1052-
usart_start();
1053-
_api_setup();
1054-
#endif
10551014
}

src/rust/bitbox02-rust-c/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ target-bootloader-production = ["bootloader", "platform-bitbox02"]
4040
target-bootloader-btc = ["bootloader", "platform-bitbox02"]
4141
target-bootloader-btc-development = ["bootloader", "platform-bitbox02"]
4242
target-bootloader-btc-production = ["bootloader", "platform-bitbox02"]
43-
target-bootloader-bitboxbase = ["bootloader", "platform-bitboxbase"]
44-
target-bootloader-bitboxbase-development = ["bootloader", "platform-bitboxbase"]
45-
target-bootloader-bitboxbase-production = ["bootloader", "platform-bitboxbase"]
4643
target-firmware = ["firmware", "platform-bitbox02", "app-bitcoin", "app-litecoin", "app-ethereum", "app-u2f"]
4744
target-firmware-btc = ["firmware", "platform-bitbox02", "app-bitcoin"]
4845
target-firmware-bitboxbase = ["firmware", "platform-bitboxbase"]

0 commit comments

Comments
 (0)