Skip to content

UZ secondary boot boot.cmd adjustments#441

Merged
ricardosalveti merged 3 commits intofoundriesio:masterfrom
igoropaniuk:uz_secondary_boot
Oct 25, 2021
Merged

UZ secondary boot boot.cmd adjustments#441
ricardosalveti merged 3 commits intofoundriesio:masterfrom
igoropaniuk:uz_secondary_boot

Conversation

@igoropaniuk
Copy link
Copy Markdown
Contributor

No description provided.

@igoropaniuk igoropaniuk changed the title UZ secondary boot UZ secondary boot boot.cmd adjustments Oct 6, 2021
Copy link
Copy Markdown
Contributor

@MrCry0 MrCry0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

if test -z "${check_secondary_boot}"; then setenv check_secondary_boot "imx_secondary_boot"; fi;
if test -z "${set_primary_boot}"; then setenv set_primary_boot "imx_secondary_boot 0"; fi;
if test -z "${set_secondary_boot}"; then setenv set_secondary_boot "imx_secondary_boot 1"; fi;
setenv update_image 'echo "${fio_msg} writing ${image_path} ..."; run set_blkcnt && mmc dev ${devnum} ${uboot_hwpart} && mmc write ${loadaddr} ${start_blk} ${blkcnt}'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think moving the update_image definition to here, makes this a bit harder to read. It was previously defined next to the other update helpers. Was there another reason to move?

Copy link
Copy Markdown
Contributor Author

@igoropaniuk igoropaniuk Oct 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved all env var definitions that can be redefined in the board specific boot.cmd to the beginning of the file

Copy link
Copy Markdown
Contributor

@Tim-Anderson Tim-Anderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added some comments

Comment thread meta-lmp-base/recipes-bsp/u-boot/u-boot-ostree-scr-fit/boot-common.cmd.in Outdated
Copy link
Copy Markdown
Contributor

@mike-scott mike-scott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mike-scott
Copy link
Copy Markdown
Contributor

@igoropaniuk Have we re-tested this with IMX targets?

Copy link
Copy Markdown
Contributor

@Tim-Anderson Tim-Anderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@igoropaniuk igoropaniuk force-pushed the uz_secondary_boot branch 2 times, most recently from af139ea to cb48071 Compare October 12, 2021 16:25
Copy link
Copy Markdown
Contributor

@angolini angolini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit bsp: u-boot-ostree-scr-fit: imx: introduce common imx include

includes 2 files .boot-common-imx.cmd.in.swp and .boot-common.cmd.in.swp, I think it is temp file, could you, please, double check?

Comment thread meta-lmp-base/recipes-bsp/u-boot/u-boot-ostree-scr-fit.bb
Copy link
Copy Markdown
Contributor

@angolini angolini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the minor comments, LGTM

@igoropaniuk igoropaniuk reopened this Oct 13, 2021
@igoropaniuk
Copy link
Copy Markdown
Contributor Author

@angolini thanks for catching that, Ive included them accidentally, it's just vim cache(I should have added them to my .gitignore)

Will delete them

Copy link
Copy Markdown
Contributor

@MrCry0 MrCry0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With removed vim .swp files, LGTM.

@igoropaniuk
Copy link
Copy Markdown
Contributor Author

removed .swp files

@igoropaniuk
Copy link
Copy Markdown
Contributor Author

Tested on iMX targets, fixed one type in boot-common-imx.cmd.in

@ricardosalveti this PR ready for final testing

@MrCry0 MrCry0 self-requested a review October 20, 2021 13:38
Copy link
Copy Markdown
Contributor

@MrCry0 MrCry0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

do_compile() {
sed -e '/@@INCLUDE_COMMON@@/ {' -e 'r ${S}/boot-common.cmd.in' -e 'd' -e '}' \
sed -e '/@@INCLUDE_COMMON_IMX@@/ {' -e 'r ${S}/boot-common-imx.cmd.in' -e 'd' -e '}' \
"${S}/boot.cmd" > boot.cmd.in
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine for now, but later on we can probably change this to INCLUDE_COMMON_BSP and have the boot-common-bsp.cmd.in file to be provided under a bsp specific folder (e.g. imx here), as then we would have a more generic way of adding stuff that is specific to the bsp.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree

@ricardosalveti
Copy link
Copy Markdown
Member

LGTM but was unable to test this yet, hope to do that tomorrow.

One minor comment, please avoid patches with no body in the commit message, add at least one short line explaining the reasoning behind your patch.

Introduce common include for i.MX-based boards.

Signed-off-by: Igor Opaniuk <[email protected]>
Add SoC manufacture agnostic wrappers for checking board secure state,
getting/setting primary/secondary boot and updating images.
Move imx-specific defines to the boot-common-imx.cmd.in include.

Signed-off-by: Igor Opaniuk <[email protected]>
Add support for Boot Firmware updates on Ultrazed board.
Currently only eMMC/SD is supported.

Signed-off-by: Igor Opaniuk <[email protected]>
@igoropaniuk
Copy link
Copy Markdown
Contributor Author

@rsalveti

One minor comment, please avoid patches with no body in the commit message, add at least one short line explaining the reasoning behind your patch.

Fixed

Copy link
Copy Markdown
Member

@ricardosalveti ricardosalveti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ricardosalveti ricardosalveti merged commit ba1648c into foundriesio:master Oct 25, 2021
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.

6 participants