Skip to content

Commit 94fe74a

Browse files
DRracerD.R.racervintagepc
authored
prusa-mk4: set the OTP BOM ID so xBuddy machines boot (#188)
Every xBuddy machine here -- prusa-mk4-*, prusa-mk3-*, prusa-iX-* -- shares the one OTP_v4 initializer in mk4_init(), which left .bomID unset, i.e. 0. Recent firmware calls Configuration::check_bom_compatible() (src/hw/xbuddy/ hw_configuration.cpp) before USB is up, and 0 fails it: the machine dies on bsod("BOM ID not compatible") with a rendered screen but no cdc.log output at all, which reads as broken logging rather than a stopped firmware. 38 is a shipped customer board. The bound is >=37, plus the legacy 12/14 (not on MK3.5); iX needs >=1. Note this is not the "27"/"34" in the datamatrix -- that is the board revision, a different field. otp_get_bom_id() reads the dedicated byte. Co-authored-by: D.R.racer <drracer@drracer.eu> Co-authored-by: vintagepc <53943260+vintagepc@users.noreply.github.com>
1 parent f016e89 commit 94fe74a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

hw/arm/prusa/prusa-mk4.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,11 @@ static void mk4_init(MachineState *machine)
430430
Object* periphs = machine_get_container("peripheral");
431431
const mk4_cfg_t cfg = *mc->cfg;
432432

433-
OTP_v4 otp_data = { .version = 4, .size = sizeof(OTP_v4),
433+
// .bomID is the dedicated OTP byte read by otp_get_bom_id(), not the datamatrix
434+
// revision digits. Unset it is 0, which the firmware's check_bom_compatible()
435+
// rejects at boot with bsod("BOM ID not compatible") -- it needs >=37 (or the
436+
// legacy 12/14). 38 is a shipped customer board.
437+
OTP_v4 otp_data = { .version = 4, .size = sizeof(OTP_v4), .bomID = 38,
434438
.datamatrix = {'4', '5', '5', '8', '-', '2', '7', '0', '0', '0', '0', '1', '9', '0', '0', '5', '2', '5', '9', '9', '9', '9', 0, 0}
435439
};
436440
if (cfg.dm_ver == 34)

0 commit comments

Comments
 (0)