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

Improve "Build Thin Ege for Yocto" tutorial #1564

Merged
merged 1 commit into from
Dec 1, 2022

Conversation

Bravo555
Copy link
Contributor

@Bravo555 Bravo555 commented Nov 7, 2022

The tutorial was expanded by adding explanations as to why to perform some steps and also by adding clarifications for which files should be edited and what the resulting directory structure should look like.

More precisely:

  • added missing "source the build environment" without which the tutorial is impossible to complete
  • clarified when editing local.conf we mean poky/build/conf/local.conf, the local configuration for the build
  • added a section in which the default package manager is changed to apt, to inform users about the possibility of using apt inside running Yocto distribtutions, and to use the same package manager used by thin-edge

Signed-off-by: Marcel Guzik marcel.guzik@inetum.com

Proposed changes

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Copy link
Contributor

@PradeepKiruvale PradeepKiruvale left a comment

Choose a reason for hiding this comment

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

One thing that needs to be added is when running the runqemu nographic it asks for credentials. So, mention what are the credentials. I did use login: root with no password. So, it's better to update the doc with this info.

@Bravo555
Copy link
Contributor Author

Added the missing IMAGE_FEATURES += "package-management" and specified the user and password (or lack thereof) to login.

Copy link
Contributor

@PradeepKiruvale PradeepKiruvale left a comment

Choose a reason for hiding this comment

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

I tried and worked well. Except that I was using the raspberrypi-64. Also, one more issue I had was using the minimal image did not work, I had to use core-base image.

@Bravo555
Copy link
Contributor Author

Bravo555 commented Dec 1, 2022

I tried and worked well. Except that I was using the raspberrypi-64. Also, one more issue I had was using the minimal image did not work, I had to use core-base image.

By "using the core-base image instead of minimal" do you mean that you had to change this line in the layer itself?

https://github.com/thin-edge/meta-tedge/blob/d8938ba7d95119cd765f6750473c946308fde28b/images/tedge-full-image.bb#L1

If so, that means we will have to either change this file to use the bigger image as you did, or we could just add the packages that were missing from the minimal image. User editing files of third-party layer directly is considered bad practice, so if a minimal image is not working, we have to fix it.

If you roughly remember the error you got, or saved it somewhere, then post it please. If not, then we will just change the image to use the base-core image as base, and if later we wanted to use the minimal image, we'll revisit it then.

The tutorial was expanded by adding explanations as to why to perform
some steps and also by adding clarifications for which files should be
edited and what the resulting directory structure should look like.

More precisely:
- added missing "source the build environment" without which the
tutorial is impossible to complete
- clarified when editing `local.conf` we mean
`poky/build/conf/local.conf`, the local configuration for the build
- added a section in which the default package manager is changed to
apt, to inform users about the possibility of using apt inside running
Yocto distribtutions, and to use the same package manager used by
thin-edge

Signed-off-by: Marcel Guzik <marcel.guzik@inetum.com>
@PradeepKiruvale
Copy link
Contributor

I tried and worked well. Except that I was using the raspberrypi-64. Also, one more issue I had was using the minimal image did not work, I had to use core-base image.

By "using the core-base image instead of minimal" do you mean that you had to change this line in the layer itself?

https://github.com/thin-edge/meta-tedge/blob/d8938ba7d95119cd765f6750473c946308fde28b/images/tedge-full-image.bb#L1

If so, that means we will have to either change this file to use the bigger image as you did, or we could just add the packages that were missing from the minimal image. User editing files of third-party layer directly is considered bad practice, so if a minimal image is not working, we have to fix it.

If you roughly remember the error you got, or saved it somewhere, then post it please. If not, then we will just change the image to use the base-core image as base, and if later we wanted to use the minimal image, we'll revisit it then.

I did not capture any error messages, It was not printing anything on the screen, maybe if I had used serial port it might have captured some logs, but I was using HDMI. Yes, it makes sense to use the base image if we need a smaller image we can revisit, debug and add the package that is missing to boot the thin-edge.io yocto image on Raspi.

@Bravo555
Copy link
Contributor Author

Bravo555 commented Dec 1, 2022

Okay then, I will change the images in our layer to use the base image. As for this one, I don't think there's anything more and it's ready to be merged.

@didier-wenzek didier-wenzek merged commit a054647 into thin-edge:main Dec 1, 2022
@Bravo555 Bravo555 deleted the yocto-docs branch December 1, 2022 14:45
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.

None yet

3 participants