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

[Common Torizon] Layer refactor to accommodate Common Torizon distro and 3rd-party machines #202

Draft
wants to merge 17 commits into
base: scarthgap-7.x.y
Choose a base branch
from

Conversation

EdTheBearded
Copy link
Collaborator

Initial refactor work of our layer to support the new common-torizon distro, and 2 new 3rd-party machine: x86 and NXP's iMX95, as well as a new Common Torizon distron for Xenomai, 3 and 4, on x86.

@EdTheBearded EdTheBearded self-assigned this Dec 30, 2024
@EdTheBearded
Copy link
Collaborator Author

Marking as draft as I'm still testing, but making the changes available for early review.

@EdTheBearded EdTheBearded requested a review from jsrc27 December 30, 2024 16:09
Copy link
Contributor

@rborn-tx rborn-tx left a comment

Choose a reason for hiding this comment

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

Awesome work!

I've raised a couple of questions just for clarification but I couldn't find any issues.


require torizon_base_image_type.inc

EXTRA_OSTREE_COMMIT:remove = "--add-metadata=oe.layers="${OSTREE_LAYER_REVISION_INFO}""
Copy link
Contributor

Choose a reason for hiding this comment

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

Clarification: why do we need to remove the layers information from the OSTree commit metadata?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, good catch!

In fact we needed to remove this for iMX95, since we were having some build issues where we were passing oe.layers=None. And since it wasn't necessary I removed it. But I guess with all those changes it got global!

Let me add this line again and rerun some tests here. Thanks!!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed this line and everything is working fine.


UBOOT_BINARY_OTA_IGNORE = "1"

do_deploy[postfuncs] += "gen_torizon_prov_data"
Copy link
Contributor

@rborn-tx rborn-tx Jan 2, 2025

Choose a reason for hiding this comment

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

Clarification: How is the provisioning-data tarball going to be installed in case of Common Torizon? IIRC, the provisioning feature relies on Toradex Easy Installer to unpack the files in the proper locations after the bulk of the OS installation is done.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

conf/layer.conf Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo on the commit message title: "torzon" -> "torizon"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@@ -1,13 +1,22 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
DESCRIPTION = "Boot script for launching images with U-Boot distro boot"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: The other commit messages have the "Related-to" field set to "TOR-3661" while this commit says "Tor-3661".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@@ -24,7 +24,6 @@ SPLASH = "plymouth"

# Base packages
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion for the commit message: "recipes" -> "packages"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@EdTheBearded EdTheBearded force-pushed the tor-3661 branch 3 times, most recently from 8eacc62 to 53a4eb8 Compare January 8, 2025 18:14
@EdTheBearded
Copy link
Collaborator Author

pushed some changes here:

PREFERRED_PROVIDER_virtual/dtb = ""
OSTREE_DEPLOY_DEVICETREE:forcevariable = "0"
  • rebased this PR

@jsrc27 this PR should be ready for review now. I'll keep it as a draft until the release is done and we're out of the freeze.

Copy link
Collaborator

@jsrc27 jsrc27 left a comment

Choose a reason for hiding this comment

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

Just gave some minor feedback nothing too important. Otherwise changes look okay overall.

Refactor 'image_type_torizon.bbclass' so that we have the common part
separated into 'torizon_base_image_type.inc', and the
particularities for Torizon OS and Common Torizon are each on its own
bbclass.

Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
Torizon OS depended on some Toradex BSP classes, and since Common
Torizon must be standalone, we brought those dependencies over.

Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
Refactor 'torizon.conf' so that we have the common part separated into
'base-distro.inc', and the particularities for Torizon OS and Common
Torizon are each on its own '.conf'.

Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
Torizon OS depended on Toradex BSP versioning.conf, and since Common
Torizon must be standalone, we brought it over.

Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
Since it is now possible to use this layer to build Common Torizon with
other BSP's, it makes no sense to have this layer dependent on Toradex
and freescale layers.
So the dependency was changed to reflect the layer that really need to
be present so that 'meta-toradex-torizon' can be built.

Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
Move all .bbappend recipes dependend on Toradex BSP's layers to the
dynamic-layers, so we don't have any issues building with other BSPs.

Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
This was an bbppend of a Toradex BSP recipe. Since we use this for our
u-boot scripts, we've incorporated the Toradex BSP portion of this
recipe, so that we have the full recipe in our layer.

Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
This recipe would need to be moved to dynamic-layers, but since it is
still empty, it is better if we simply remove it. If necessary in the
future, we can add it to the appropriate place.

Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
Only install Toradex related packages if we're building using Toradex
BSP.

Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
For Common Torizon builds, add the machine specific .cfg file, and the
torizon.scc.

Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
'python3-nacl' was a duplicate recipe of 'python3-pynacl', so it was
decided to drop it on upstream. [1]
'python3-pynacl' was modified to PROVIDE 'python3-nacl', so we're only
renaming the recipe.

[1] https://git.openembedded.org/meta-openembedded/commit/meta-python?id=a0d526bd7f489de9747be913af2e6b9821af2f61

Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
Port over the 'resize-helper' recipe so that Common Torizon builds can
expand and use the whole disk space present in the device.

Recipe only installed for Common Torizon builds.

Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
This supported was done porting the common-torizon recipes and machine
configurations over to meta-toradex-torizon layer.

Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
Corrected the comparison '"${upgrade_available}" = "1"', which was
missing an '=' sign.

Also changed the logic 'if [ "${bootcount}" == "${bootlimit}" ]' to
compare if greater than or equal, just to cover any possible corner
cases and guarantee we'll fallback.

Related-to: TOR-3661

Signed-off-by: Eduardo Ferreira <[email protected]>
Copy link
Collaborator

@jsrc27 jsrc27 left a comment

Choose a reason for hiding this comment

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

Just preemptively giving my approval here.

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.

3 participants