Skip to content

cli: add --force-reload option to override bitstream id check in all cases #275

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

Merged

Conversation

TomKeddie
Copy link
Contributor

No description provided.

@attie
Copy link
Member

attie commented Feb 15, 2021

Is this significantly different in use / operation to --rebuild?
What is the use case for --force-reload over --rebuild?

@TomKeddie
Copy link
Contributor Author

@attie thanks for your comments. In the mainstream case there is no difference. I'm using this where I supply the bitstream, built outside of glasgow, where the id is not valid and I want it to be reloaded. I guess I could overload --rebuild to reload in the cases where an image was supplied and avoid the extra option, would that be appropriate.

@attie
Copy link
Member

attie commented Feb 15, 2021

I'm using this where I supply the bitstream, built outside of glasgow, where the id is not valid and I want it to be reloaded.

Ah, I see.

I presume you're using this in conjunction with --prebuilt-at? If so, perhaps something else should be used in place of the bitstream's ID for external bitstreams (e.g: a hash of the binary file)? This way we could remove the extra flag, and it would always reload when required...?

@whitequark
Copy link
Member

Alternatively a bitstream ID of all ones could be used to indicate "always reload".

@TomKeddie
Copy link
Contributor Author

Alternatively a bitstream ID of all ones could be used to indicate "always reload".

I'll update the PR to do this, great idea.

@TomKeddie
Copy link
Contributor Author

Done. Please squash when merging to hide the mess.

@attie
Copy link
Member

attie commented Feb 15, 2021

@TomKeddie please could you rebase/squash and force-push when you're happy?

(It looks like software/glasgow/cli.py still need to be cleaned up)

attie
attie previously requested changes Feb 15, 2021
@TomKeddie TomKeddie force-pushed the tomk_20210214_reload_arg branch from b735f3f to 01891cf Compare February 15, 2021 16:40
@TomKeddie TomKeddie requested a review from attie February 15, 2021 16:40
@attie
Copy link
Member

attie commented Feb 15, 2021

Thanks @TomKeddie.

Not sure if there's a preference either way for bytearray('\xff' * 16, 'latin-1') vs b'\xff' * 16 - I'd pick the latter, but take @whitequark's lead.

LGTM.

@attie attie requested a review from whitequark February 15, 2021 17:00
@TomKeddie TomKeddie force-pushed the tomk_20210214_reload_arg branch from 01891cf to 943af06 Compare February 16, 2021 00:02
@whitequark whitequark dismissed attie’s stale review February 17, 2021 13:01

changes applied

@whitequark whitequark merged commit 2689761 into GlasgowEmbedded:master Feb 17, 2021
@whitequark
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants