-
Notifications
You must be signed in to change notification settings - Fork 299
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
Barebox support #395
Barebox support #395
Conversation
Allow to skip check_ack since there are use cases where this generates false positives. One use-case would be: 1st) loading a small binary capable to handle USB transfers 2nd) loading a larger binary by this command. The larger binary is started immediatly after all blocks are received on the device side. Barebox does have such an behaviour and loading the BL33 binary triggers an false positiv. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Add a command line option to handle barebox bl33 loading. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
|
||
if (!(rom->flags & ROM_INFO_NEED_BAREBOX_FULL_IMAGE)) | ||
return 0; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why need check ROM_INFO_NEED_BAREBOX_FULL_IMAGE? you already have option -barebox-bl33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for making it more straight forward for the users. The user only need to:
SDP: boot -barebox -f <barebox.img>
instead of:
SDP: boot -f <barebox.img>
SDP: write -ivt 0 -barebox-bl33 -f <barebox.img>
The 2nd form is far more complex to me since the user need to know the internals of uuu
else no one would specify -ivt 0
which is required to take the correct uuu
code path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Furthermore the ROM_INFO_NEED_BAREBOX_FULL_IMAGE
is only required for i.MX8M devices. Loading i.MX6 images is not that complex since it requires only one file transfer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Furthermore the
ROM_INFO_NEED_BAREBOX_FULL_IMAGE
is only required for i.MX8M devices. Loading i.MX6 images is not that complex since it requires only one file transfer.
Can you add comments about ROM_INFO_NEED_BAREBOX_FULL_IMAGE in code? And explain why only i.MX8M need, i.MX6 needn't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course I can do that. By code you mean this function here, right? Not the rominfo.cpp
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can add comments at define ROM_INFO_NEED_BAREBOX_FULL_IMAGE place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kept here in this function, since IMHO this is more useful for code readers. I hope this is okay for you.
Add '-barebox' command line parameter to load a i.MX8MM barebox image with a single: 'SDP: boot -barebox -f barebox.img' command. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Currently write() always sends buffers of 'm_size_out' size in case of report_id != 1. This may cause an issue for the last buffer if not aligned to 'm_size_out'. Fix this by send only the required size of bytes by using 's'. This also simplifies the call a lot. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
7bd4b37
to
4b4bcc8
Compare
This adds the initial support for loading barebox i.MX8M images.