bitcoin-tools / diyjade

Securely custody your bitcoin with Open Source software and generic hardware.
MIT No Attribution
4 stars 1 forks source link

feat: enable secure-boot for ttgo tdisplay #13

Open 1-21gigasats opened 6 months ago

1-21gigasats commented 6 months ago

Here is my draft based on the discussions in https://github.com/epiccurious/jade-diy/issues/76 for a ttgo to enable secure-boot via user menu including the mentioned python script to detect the device status.

The python script can detect the status:

I tested them all but did not test a full secure boot installation as this would waste another device reserved for the workshops. maybe you can test one full installation with enabling secure boot

1-21gigasats commented 5 months ago

Thanks for your review and for inviting me to this project. I will come back to this soon but our workshop session starts at the end of this week so i dont want to introduce new changes now. So my plan is to collect users feedback for both versions (with and without secure-boot) and improve the code based on the users feedback

1-21gigasats commented 5 months ago

Note: Some devices only support secure boot version 1. There should be a variable added to optionally set to sb version 1.

Additional infos for how to enable secure boot: https://hideyourkeys.io/cheap-hardware-wallet-below-diy-guide/

bitcoin-tools commented 5 months ago

@1-21gigasats thanks for proposing this change. Can you please rebase the PR for review and testing?

1-21gigasats commented 5 months ago

Note: Some devices only support secure boot version 1. There should be a variable added to optionally set to sb version 1.

I am currently refraining from adapting secure boot version 1, as the only hardware that is unable to do v2 is the M5Stack M5StickC PLUS according to https://github.com/Blockstream/Jade/tree/master/diy .

If there are specific versions per device in the future it is maybe the best to adapt v1 for this version only as it needs different build config and openssl key.

If you try to flash SB v2 on an v1 only device, boot loader flash should fail with an appropriate message.

1-21gigasats commented 5 months ago

@ Can you please rebase the PR for review and testing?

Yes sure but actually i am unfamiliar with the rebasing process. Could you explain me what to do or do it for me one time and show me the commands you used afterwards?

But if the only goal is to keep a clean commit history, is a squash and merge after review not more appropriate? In my understanding rebasing requires to force push which feels unsafe