Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building firmware with just sign 2.0.4 color command results in ERROR #334

Open
hugoender opened this issue Jun 15, 2023 · 7 comments
Open

Comments

@hugoender
Copy link
Contributor

I went through the DEVELOPMENT.md procedure and even did the (code-signing)[https://github.com/Foundation-Devices/passport2/blob/main/DEVELOPMENT.md#code-signing] section to generate developer pubkey. When I went to build the firmware using the just sign 2.0.4 color command, the result was two ERROR messages as pictured below:

INFO: Key /home/billybob/bin/keys/user.pem not a supported public key.  Assuming user key.
Wrote signed firmware to: build-Passport/v2.0.4-beta-passport.bin
ERROR: Failed to open 'build-Passport/v2.0.4-passport-key-user.bin'.
ERROR: File 'build-Passport/v2.0.4-passport-key-user.bin' has no data.

Screenshot from 2023-06-14 22-24-03

Not sure what this means or if this is an error that can be ignored. Further clarification in the DEVELOPMENT.md documentation would be greatly appreciated. I will also be submitting a PR for some edits to the documentation that I made during my build process.

@hugoender
Copy link
Contributor Author

Any help with this would be greatly appreciated. Building firmware and bootloader from source are the two remaining obstacles preventing me from ordering a Passport.

@sethforprivacy
Copy link
Collaborator

Any help with this would be greatly appreciated. Building firmware and bootloader from source are the two remaining obstacles preventing me from ordering a Passport.

Hey Hugo, apologies for the delays getting back to you on this one! I've reached out to some more knowledgeable members of my team on the signing process and asked them to jump in here.

In the meantime, you may be interested in reading and following our new reproducibility guide here as well, seems up your alley!

https://github.com/Foundation-Devices/passport2/blob/e6e435a2331dc3b276f882413c319917b15e20e9/REPRODUCIBILITY.md

@mjg-foundation
Copy link
Collaborator

Hugo, could you double check that ~/bin/keys/user.pem exists, and is the correct file? To be sure, I recommend repeating the step in DEVELOPMENT.md that involves copying the keys to this location, to be sure that the right files were copied to the right destinations.

@hugoender
Copy link
Contributor Author

hugoender commented Jun 22, 2023

Hugo, could you double check that ~/bin/keys/user.pem exists, and is the correct file? To be sure, I recommend repeating the step in DEVELOPMENT.md that involves copying the keys to this location, to be sure that the right files were copied to the right destinations.

In doing this I ran into some new issues and in doing so, realized that the DEVELOPMENT.md documentation has more errors than I had initially caught. Will submit a new PR as soon as I fix them.

That said, not sure what's going on now but I get an error when I run the following command:
cosign -f build-Passport/firmware-COLOR.bin -k mykeys/user-pub.pem -t color -v 2.0.3.

This command shows mykeys/user-pub.pem but I'm not sure where the mykeys directory is. This is the error I get:
Selection_016

I then tried replacing mykeys/user-pub.pem with ~/bin/keys/user-pub.pem and got the following error:
Selection_018

Not sure how to proceed from here or how i even got it to build last time.

@hugoender
Copy link
Contributor Author

Hey Hugo, apologies for the delays getting back to you on this one! I've reached out to some more knowledgeable members of my team on the signing process and asked them to jump in here.

In the meantime, you may be interested in reading and following our new reproducibility guide here as well, seems up your alley!

https://github.com/Foundation-Devices/passport2/blob/e6e435a2331dc3b276f882413c319917b15e20e9/REPRODUCIBILITY.md

Appreciate it. I've looked at the documentation and noticed it differs slightly from DEVELOPMENT.md. It seems like your REPRODUCIBILITY.md document is more dependent on using docker which, while I understand why you did it, I'm not a huge fan of. I will go through that procedure at some point but for now want to focus on DEVELOPMENT.md.

@mjg-foundation
Copy link
Collaborator

@hugoender could you take another look at DEVELOPMENT.md and see if you can build now? We've updated it with your changes and some of our own. Thanks!

@mjg-foundation
Copy link
Collaborator

@hugoender were you able to get this working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants