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

[RFC] prepare migration of meta-qcom (and merge with meta-qcom-hwe) #92

Open
wants to merge 1,574 commits into
base: main
Choose a base branch
from

Conversation

ndechesne
Copy link
Contributor

Related to: Linaro/meta-qcom#680

This is probably impossible to properly review in Github. The key commits to review are the most recent commits in the PR branch.

First I am doing a 'non trivial' merge of meta-qcom (master) into meta-qcom-hwe (main) using "git merge --allow-unrelated-histories". Most of the merge is trivial with no conflicts, e.g. merging recipes, conf files, ... from both layers, just fine. The main conflicts were with README.md and conf/layer.conf. For both of these files, I have done a manual merge/edit so that they look right to me. These files need to be reviewed carefully.

The next 2 commits are changes in the Github workflows. What I am trying to do with the workflows is:

  • For all stable up to styhead, they predate the migration, so Linaro will continue to maintain them, and the CI should be based on existing Linaro CI
  • For master and all future stable branches, we are moving to Qualcomm CI

Note: the Linaro CI is not expected to work for now, since we will need to setup the secrets/token.

The result of the merge represents a very decent history of meta-qcom with ~1650 commits from ~50 developers over the last 10 years.

In terms of process, we eventually want to migrate meta-qcom into github.com/quic-yocto org. We can decide to merge this PR (when it's tested/ready) and continue the development of meta-qcom-hwe (main branch) here after the initial merge. When the repo is migrated, we will just need to do a final merge of the meta-qcom-hwe main branch into meta-qcom repo.

lumag and others added 30 commits May 25, 2024 09:19
Follow OE-Core changes and use UNPACKDIR where required.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Follow OE-Core changes and use UNPACKDIR where required.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Follow OE-Core changes and use UNPACKDIR where required.

Signed-off-by: Dmitry Baryshkov <[email protected]>
With the introduction of UNPACKDIR the files were moved from WORKDIR to
UNPACKDIR. Adjust the recipe accordingly.

Signed-off-by: Dmitry Baryshkov <[email protected]>
With the introduction of UNPACKDIR the files were moved from WORKDIR to
UNPACKDIR. Adjust the recipe accordingly.

Signed-off-by: Dmitry Baryshkov <[email protected]>
With the introduction of UNPACKDIR the files were moved from WORKDIR to
UNPACKDIR. Adjust the recipe accordingly.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Drop CONFIG_DRM_PANEL_NOVATEK_NT36672E assignment from
qcom-armv8a/qcom-extra.cfg to silence the warning:

[INFO]: the following symbols were not found in the active configuration:
     - CONFIG_DRM_PANEL_NOVATEK_NT36672E

Signed-off-by: Dmitry Baryshkov <[email protected]>
linux-yocto: drop CONFIG_DRM_PANEL_NOVATEK_NT36672E=m
WORKDIR -> UNPACKDIR migration
Build the current LTS release, scarthgap, on a daily basis.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Include scarthgap and kirkstone into the push-triggered builds. While we
are at it, drop the honister, which is EOL

Signed-off-by: Dmitry Baryshkov <[email protected]>
CI: include scarthgap into daily builds
Update to the latest upstream repository, which is now at
https://github.com/linux-msm/qdl.git.

Relevant changes from latest upstream:
- USBDEVFS interface replaced with libusb
- Add ramdump support
- New utility 'ks' which uses sahara to load images from host to a
  device (relevant for Qualcomm Cloud AI 100).

Drop 0001-Makefile-Use-pkg-config-for-libxml2-detection.patch as these
changes are now available upstream.

Signed-off-by: Ricardo Salveti <[email protected]>
qdl: update to the latest upstream
… non-existent

android-tools-conf-adbd-cmdline doesn't have any checked out source files, which
results in a warning regarding S not existing. Fix the warning by
pointing S to ${WORKDIR}/sources and UNPACKDIR to ${S}.

The warning text:

WARNING: android-tools-conf-conf-adbd-cmdline-1.0-r0 do_unpack:
android-tools-conf-conf-adbd-cmdline: the directory ${WORKDIR}/${BP} (<scrubbed>)
pointed to by the S variable doesn't exist - please set S within the
recipe to point to where the source has been unpacked to

Signed-off-by: Dmitry Baryshkov <[email protected]>
android-tools-conf-adbd-cmdline: Fix build-time warning about S being…
The WSA881x patch has been merged into the stable tree, drop it from the
BSP patchset.

Signed-off-by: Dmitry Baryshkov <[email protected]>
linux-yocto: drop the patch applied upstream
The recipe fell out of the WORKDIR -> UNPACKDIR conversion. Use
UNPACKDIR to reference provided scripts.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Bump SRCREV, dropping merged patches. This also brings up scripts to
support ath12k WiFi cards.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Bump SRCREV, dropping three patches that were merged upstream.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Add the Upstream-Status trailer to the patch to fix OE's issue.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Add the Upstream-Status trailer to the patch to fix OE's issue.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Add the Upstream-Status trailer to the patch to fix OE's issue.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Add the Upstream-Status trailer to the patch to fix OE's issue.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Add the Upstream-Status trailer to the patch to fix OE's issue.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Add Upstream-Status trailers to meta-qcom patches.
Add kernel configs to support sa8775 ride board on linux-yocto.
Add support for Qualcomm SA8775p ride board in yocto-linux.
Add support for SA8775P ride board on linux-yocto
ricardosalveti and others added 6 commits December 4, 2024 23:18
Default ESP partition size used for the targets depending on
esp-qcom-image is 512MB, align the vfat image size with the expected
partition size.

Signed-off-by: Ricardo Salveti <[email protected]>
LINGUAS_INSTALL gets set based on the values set in IMAGE_LINGUAS, but
the most common and documented variable for setting the image-based
locales is IMAGE_LINGUAS.

Signed-off-by: Ricardo Salveti <[email protected]>
Set IMAGE_FEATURES to empty as there is no need to include standard
IMAGE_FEATURES on the ESP image, since it should only contain UKI +
systemd-boot.

Signed-off-by: Ricardo Salveti <[email protected]>
systemd-bootconf is not required with type qualcomm-linux#2 boot loader entries
(UKIs), and it is currently not used at runtime.

Signed-off-by: Ricardo Salveti <[email protected]>
OE creates a set of directories and files which are desired on standard
images, but are not required for ESP as this is a minimal non-rootfs
standard image.

Remove everything but the 'EFI' folder from the ESP image via a custom
IMAGE_PREPROCESS_COMMAND command, as the base files and directories
are needed during the rootfs task.

Signed-off-by: Ricardo Salveti <[email protected]>
@EmbeddedAndroid EmbeddedAndroid added the enhancement New feature or request label Dec 9, 2024
@lumag
Copy link
Contributor

lumag commented Dec 9, 2024

@ndechesne are there any remaining blockers? It would be nice to sort it out and complete migration.

@ndechesne
Copy link
Contributor Author

@lumag I am traveling this week, and I don't have a lot of free cycles to finish. I am hoping we can make more progress next week..

I found some issues with the CI patches I made. I think we need more changes there. Since the 'master' branch is going to run on the QCOM CI, we need to move all Linaro CI outside of the master branch. So all branches up to styhead will be 'linaro' stuff, and master and future releases branches will be on QCOM CI. I think we should move all Linaro workflow either to styhead branch or perhaps scarthgap branch since it's the 'last' LTS branch on Linaro CI.

e.g. have all the workflow yaml files in scarthgap, and update all other branches to point to scarthgap workflows. Currently scarthgap and styhead have a copy of the workflows, kirkstone refers to workflow from 'master' branch (with: uses: Linaro/meta-qcom/.github/workflows/build-template.yml@master). and older branches (honister and before) are broken, as they refer to workflow in ndechesne/meta-qcom ( uses: ndechesne/meta-qcom/.github/workflows/build-template.yml@master)..

So do you want to get the Linaro CI updated/fixed in all branches other than master first?

I am planning to the Linaro CI workflow from this PR (when I get back to it)

@lumag
Copy link
Contributor

lumag commented Dec 9, 2024

I completely forgot about that. I will take a look at the CI for other branches

@koenkooi
Copy link
Contributor

FWIW, a kas based build for qcs6490-rb3gen2-core-kit using this PR builds without issues.

@lumag
Copy link
Contributor

lumag commented Dec 10, 2024

@ndechesne I think I've fixed all outstanding CI issues.

@igoropaniuk
Copy link
Contributor

igoropaniuk commented Dec 10, 2024

Taking into consideration that there are currently 113 commits in meta-qcom-hwe and it's not currently "used in production" (in the terms of maturity), is there any reasons why the decision was made to merge it this way and not the other way around: fork meta-qcom first and then merge meta-qcom-hwe into it? This would definitely have required less effort in merging and follow-up testing, and as a result we would end up with 1:1 replication of meta-qcom git history

Another concern is that as for meta-qcom-hwe "rebase and merge" strategy was chosen from the very beginning, and pulling all merge commits from meta-qcom IMO might "spoil" existing git history in meta-qcom-hwe (I know it's just a matter of preference, but anyway there will be some chaos). Have we considered getting rid of merge commits (I know that it's a huge amount work, but just curious if it's feasible)?

@ndechesne
Copy link
Contributor Author

Taking into consideration that there are currently 113 commits in meta-qcom-hwe and it's not currently used in production, is there any reasons why the decision was made to merge it this way and not the other way around: fork meta-qcom first and then merge meta-qcom-hwe into it? This would definitely have required less effort in merging and follow-up testing, and as a result we would end up with 1:1 replication of meta-qcom git history

git merge A from B, or git merge B from A. I don't see how it makes the merge any different. The same merge conflicts would exist. And in fact, there really was no difficult merge at all. It was fairly trivial to do the merge, the way I did it.

Since we are merging the 2 branches, we still keep the history of both branches, so the history of meta-qcom is replicated. Can you please elaborate? I am open to doing things in a different way if that makes anything simpler.

Another concern is that as for meta-qcom-hwe "rebase and merge" strategy was chosen from the very beginning, and pulling all merge commits from meta-qcom IMO might "spoil" existing git history in meta-qcom-hwe (I know it's just a matter of preference, but anyway there will be some chaos). Have we considered getting rid of merge commits (I know that it's a huge amount work, but just curious if it's feasible)?

That is correct. the history is going to be a bit of mess, but moving forward we will adopt rebase and merge again. As long as we kept the 2 branches history in the merge, I think it's fine.

@igoropaniuk
Copy link
Contributor

@ndechesne

Since we are merging the 2 branches, we still keep the history of both branches, so the history of meta-qcom is replicated. Can you please elaborate? I am open to doing things in a different way if that makes anything simpler.

I got confused as I was thinking about rebase for some reason when I wrote "1:1 replication of meta-qcom git history", however you explicitly mentioned "merge" in the PR description, so sorry for the nohistoryise.
My point was that having PR with 112 commits would look more lightweight and less scary :) , but I do agree that in the end we would get the same git tree and it's just a matter of preference

Dragonboard-APQ8060 has old uppercase-only names in the NHLOS image,
which breaks the rest of firmware-qcom-nhlos.inc. Split the
handle_nonhlos_image() function into unpack and handle parts to allow
individual recipes to extend either of those steps individually.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Add firmware recipe for the DragonBoard APQ8060. The board is old, but
it is still useful for testing.

Signed-off-by: Dmitry Baryshkov <[email protected]>
@koenkooi
Copy link
Contributor

When using 'kas build' for the rbd3, this doesn't seem to generate a qcomflash tarball anymore.

@igoropaniuk
Copy link
Contributor

@koenkooi I think that's because it doesn't include this commit:

commit d6358019cce14f21e95a6a31cec28b134e2fa0d7
Author: Ricardo Salveti <[email protected]>
Date:   Thu Nov 14 19:22:20 2024 -0300

    image_types_qcom: add support for qcomflash IMAGE_FSTYPE
    
    Add support for a new IMAGE_FSTYPE which creates a single tarball
    containing all the relevant files to perform a full clean flash,
    including partition metadata, boot firmware, ESP partition and the
    rootfs.
    
    Signed-off-by: Ricardo Salveti <[email protected]>

@ndechesne
Copy link
Contributor Author

I updated the PR. What's changed:

  1. I did the merge again with the most recent commits from meta-qcom and meta-qcom-hwe
  2. completely disabled (removed the workflow) the Linaro CI in main
  3. added meta-qcom generic machines in CI

@lumag
Copy link
Contributor

lumag commented Dec 13, 2024

Nice! Ack from my side.

lumag and others added 5 commits January 8, 2025 17:49
Firmware for Dragonboard APQ8060
We are merging meta-qcom-hwe (main branch) and meta-qcom (master
branch) inside a single branch to unify the development.

This is a non trivial merge that requires merging two BSP layer with
unrelated history. git merge was used with --allow-unrelated-histories
for that reason.

Most of the files are merged with no conflicts, except:

* README.md: I merged both README files into a new one, picking things
  from both versions, as needed.
* conf/layer.conf: combine both files.
* COPYING.md: trivial conflict, nothing changed.

When combining meta-qcom and meta-qcom-hwe, we inherit from both CI
workflows. Moving forward we want to run the following workflows:

* Linaro CI for all stable branch up until styhead
* Qualcomm CI for master/main and future stable branches

In this commit, we also removed all CI workflow files from the Linaro
meta-qcom, and kept all CI workflows from meta-qcom-hwe.

The trees used for this merge were at the following commit:

* meta-qcom: 08c56f5 (Merge pull request #701 from lumag/fw-8060)
* meta-qcom-hwe: d55004a (workflows: fix variable name in nightly
  build)

Signed-off-by: Nicolas Dechesne <[email protected]>
Now that we merged meta-qcom and meta-qcom-hwe, let's include
meta-qcom generic machines kas configuration to add them in CI.

Disable qcomflash feature, not supported on these machines.

Signed-off-by: Nicolas Dechesne <[email protected]>
@ndechesne
Copy link
Contributor Author

@ricardosalveti when we decide to merge this PR, we will need to do a merge commit, it's an exception to our process, but i believe that a rebase/squash will break everything..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.