-
Notifications
You must be signed in to change notification settings - Fork 182
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
Add USB loaders for sunxi, tegra, samsung #1482
base: master
Are you sure you want to change the base?
Conversation
Some SoCs need multiple USB-loading steps to function. For example, Samsung devices require BL1, then SPL then U-Boot. Add a new parameter to the protocol to support this. Signed-off-by: Simon Glass <[email protected]>
- loadaddr (int): address to use when loading U-Boot. This depends on the | ||
SoC being used. The easiest way to find this value is to check the | ||
*CONFIG_TEXT_BASE* value in U-Boot | ||
- bct (str): path to the BCT (configuration file) |
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.
Similar to the image
argument, this should refer to a key in the images:
part of the target config in the environment. See IMXUSBDriver
, RKUSBDriver
or UUUDriver
.
This also applies to the actual image
key here (where it's actually supported in the code).
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 actually different for each board, so we cannot have a single bct file.
if filename is None and phase == 'bl1': | ||
filename = self.bl1 | ||
if filename is None and self.image is not None: | ||
filename = self.target.env.config.get_image_path(self.image) | ||
mf = ManagedFile(filename, self.loader) | ||
mf.sync_to_resource() |
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.
Shouldn't bl1, spl and the main image be handle consistently, so with get_image_path() for defaults and a way to select the image key name in the driver arguments?
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 information is provided by the caller, since it differs depending on the board being used
Add a USB loader for sunxi, supporting SPL and U-Boot. Signed-off-by: Simon Glass <[email protected]>
Add a USB loader for tegra, supporting BCT and U-Boot. Signed-off-by: Simon Glass <[email protected]>
Add a USB loader for samsung, supporting BL1, SPL and U-Boot. Signed-off-by: Simon Glass <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1482 +/- ##
========================================
- Coverage 61.8% 56.6% -5.2%
========================================
Files 166 168 +2
Lines 12305 13129 +824
========================================
- Hits 7605 7440 -165
- Misses 4700 5689 +989 ☔ View full report in Codecov by Sentry. |
This adds USB loaders for three different SoCs. The Tegra loader is fairly straightfoward and similar to iMX, so it can use the same protocol.
For Allwinner (sunxi) and Samsung, the loading happens in 2-3 phases, so a new 'phase' parameter is added to the protocol. This allows USB loading to work correctly on these boards, sending an initial BL1 image (in the case of Samsung), then U-Boot SPL and U-Boot proper.
This has been tested on:
snow (exynos5250)
Linksprite_pcDuino3 (sunxi)
nyan-big (Tegra124-based Chromebook)
Documentation for the feature
Tests for the feature
The arguments and description in doc/configuration.rst have been updated
PR has been tested