-
Notifications
You must be signed in to change notification settings - Fork 259
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
Restore default bootloader to untagged version #1791
Conversation
Hi @hiagofranco, this PR does revert the addition of |
conf/machine/include/imx-base.inc
Outdated
SOC_DEFAULT_WKS_FILE:mx9-generic-bsp ?= "imx-imx-boot-bootpart.wks.in" | ||
|
||
WIC_BOOTLOADER = " \ | ||
${@bb.utils.contains('IMX_DEFAULT_BOOTLOADER', 'imx-boot', 'imx-boot-tagged', \ | ||
bb.utils.contains('IMX_DEFAULT_BOOTLOADER', 'u-boot-imx', '${WIC_BOOTLOADER_32BIT}', \ |
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.
I realize that PREFERRED_PROVIDER_u-boot
and PREFERRED_PROVIDER_virtual/bootloader
can be overridden, so should I use one of these here instead of IMX_DEFAULT_BOOTLOADER
?
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.
I think it must use an imx-boot
prefix to decide what to use. Users might use different IMX_DEFAULT_BOOTLOADER
, and we should respect that.
I am wondering how to do this in a generic way...
Hi @thochstein, thanks for letting me know, this will break our one of our layers where we are using |
Hi @thochstein and @otavio, sorry for the delay here, I was out last week. So, the whole issue happens when we are using UUU to download the binary directly into RAM, as we do here at Toradex with Tezi. We put the SoC into recovery mode and then download the boot container and jump to it. UUU sends 40 bytes size packages if I am not wrong, therefore if we are unlucky enough (which happened to us) to have the binary size at an specific value (more info below), the last package will contain only the TAG and, because of that, U-Boot will start before the last package is transmitted, causing UUU to hang forever. Here is the full issue we described to mfgtool repo: nxp-imx/mfgtools#416 NXP reported they opened a ticket internally, but I am not sure what it is the status here. Anyway, if we are going to do changes, we need to make sure the untagged binary is deployed, and we can choose between them, because this tag will cause issues. And about upstream/downstream, actually this tag is only add here at Thanks! |
This is the result of that ticket ;-)
I believe this PR satisfies this by restoring the default binary to be the untagged one. Will the user wonder though which version to use and perhaps still make a mistake by selecting the tagged one? I wonder if uuu can detect the trailing UUUBURN tag and handle the potential problem better? |
Ah cool, thanks =)
All right, with the untagged binary being deployed, we can simply use it, so no problems for us.
Hmmm, what happens if there is no tag and you want to flash this binary? IOW, is this tag really needed by UUU? Or is this something the boot ROM needs? |
Okay, I clarified with Frank Li, the tag is only need by UUU when it is operating on the wic image file. I guess in the boot ROM it has no effect. I tweaked the bbclass comment and the commit message, but otherwise the content of the PR is as before. |
I want you guys to take a look at the branch below. https://github.com/Freescale/meta-freescale/tree/uuu This is mostly inspired by Tom's work; however, I simplified it a little bit. More importantly, I reduced the places where we need to set the variables and the differences from the current metadata. Tom, I rewrote your commit and added myself as a co-author to indicate that we worked together on this. I didn't take over the commit because you did most of the hard work of finding the inner details. If you agree with the new approach, please update this pull request with those commits. Otherwise, you can explain to me what you disagree with, and we can try to adjust that accordingly. |
Looks good to me, thanks Otavio. |
The variable suggests the ability to override when there is no reason to override. Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Using the UUU-tagged bootloader image directly with UUU can cause UUU to hang. The bootloader image is split on a certain transmit size, and the hang occurs if the tag does not fit with the final bytes of the bootloader image and must be split into a new transmit package. The UUU tag is needed by UUU only in the SD Card image file itself so that UUU can find the end of the boot partition. Rework the design so the default bootloader and the default imx-boot binaries are not tagged. Also, extend the UUU tagging to fslc so it can gain the same benefit. Fixes: Freescale#1762 Fixes: nxp-imx/mfgtools#416 Co-authored-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
@hiagofranco Is it possible for you to review the changes? |
LGTM, thanks! |
Successfully created backport PR #1945 for |
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io>
Fix: | wic.filemap.Error: cannot open image file '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged': [Errno 2] No such file or directory: '/lmp/build-lmp-base-imx6ullevk-scarthgap-next/deploy/images/imx6ullevk/u-boot.bin.tagged' | WARNING: exit code 1 from a shell command. References: Freescale/meta-freescale#1791 Freescale/meta-freescale#1945 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io>
The introduction of the UUU-tagged bootloader causes problems for the non-wic case, as reported here [1] and here [2].
[1] #1762
[2] nxp-imx/mfgtools#416
This PR is an attempt to improve the original feature by limiting the use of the tagged file to the wic case, while restoring the default file back to the untagged version. This does effectively revert [1] as no longer needed.