Skip to content
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

rpi-update-firmware.bbclass: refactor rpi_install_firmware_to_rootfs #2114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

liuming50
Copy link
Contributor

@liuming50 liuming50 commented May 14, 2024

The current rpi_install_firmware_to_rootfs has several problems:

  • it's installing duplicated devicetrees to /boot/firmware, because it is installing all dtb/dtbo links but they are duplicated, for instance: uart2.dtbo and uart2-raspberrypi4-64.dtbo are pointing to a same file.
  • While RPI bootfs contains all files listed in IMAGE_BOOT_FILES, a end user can customize that variable to install the files they want to be in boot partition, but rpi_install_firmware_to_rootfs does not handle it.

To fix the above, introduce a function mender_install_deployed_files which is implemented in the same way with how WIC handle IMAGE_BOOT_FILES, now the files in boot partition and the files in /boot/firmware of A/B partitions are consistent.

External Contributor Checklist

🚨 Please review the guidelines for contributing to this repository.

  • Make sure that all commits follow the conventional commit specification for the Mender project.

The majority of our contributions are fixes, which means your commit should have
the form below:

fix: <SHORT DESCRIPTION OF FIX>

<OPTIONAL LONGER DESCRIPTION>

Changelog: <USER-FRIENDLY-CHANGE-DESCRIPTION> or <None>
Ticket: <TICKET NUMBER> or <None>
  • Make sure that all commits are signed with git --signoff. Also note that the signoff author must match the author of the commit.

Description

Please describe your pull request.

Thank you!

The current rpi_install_firmware_to_rootfs has several problems:
- it's installing duplicated devicetrees to /boot/firmware, because it
  is installing all dtb/dtbo links but they are duplicated, for instance:
  uart2.dtbo and uart2-raspberrypi4-64.dtbo are pointing to a same file.
- While RPI bootfs contains all files listed in IMAGE_BOOT_FILES, a end user
  can customize that variable to install the files they want to be in boot
  partition, but rpi_install_firmware_to_rootfs does not handle it.

To fix the above, introduce a function mender_install_deployed_files which is
implemented in the same way with how WIC handle IMAGE_BOOT_FILES, now the files
in boot partition and the files in /boot/firmware of A/B partitions are
consistent.

Signed-off-by: Ming Liu <[email protected]>
@lluiscampos
Copy link
Contributor

lluiscampos commented Jun 24, 2024

Hello @liuming50 and thank you for your contribution! Sorry that we are a bit busy in our end and I haven't looked at this one yet 🙈

@TheYoctoJester can you please review this PR? 🙏

Copy link
Contributor

@TheYoctoJester TheYoctoJester left a comment

Choose a reason for hiding this comment

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

Build tested successfully.

@mender-test-bot
Copy link

@lluiscampos, Let me know if you want to start the integration pipeline by mentioning me and the command "start pipeline".


my commands and options

You can trigger a pipeline on multiple prs with:

  • mentioning me and start pipeline --pr mender/127 --pr mender-connect/255

You can start a fast pipeline, disabling full integration tests with:

  • mentioning me and start pipeline --fast

You can trigger GitHub->GitLab branch sync with:

  • mentioning me and sync

You can cherry pick to a given branch or branches with:

  • mentioning me and:
 cherry-pick to:
 * 1.0.x
 * 2.0.x

@TheYoctoJester
Copy link
Contributor

Hi @liuming50, care to resolve the conflict so we can merge this?

@lluiscampos
Copy link
Contributor

Hi @liuming50, care to resolve the conflict so we can merge this?

Actually, we have removed this layer from meta-mender repository and it has been moved to meta-mender-community

So we need to port this patch to https://github.com/mendersoftware/meta-mender-community/

@liuming50 I am sorry that we have not warned you about this before! scarthgap update has been worked in parallel and I failed to see that your PR won't apply anymore.

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.

4 participants