-
Notifications
You must be signed in to change notification settings - Fork 24
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
Introduce CDT support #112
base: main
Are you sure you want to change the base?
Changes from all commits
57254d0
9fd45bc
94e0c04
1275cd5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,15 @@ PARTCONF ?= "" | |
PARTCONF:qcm6490 ?= "qcm6490-partitions.conf" | ||
PARTCONF:qcs9100 ?= "qcs9100-partitions.conf" | ||
|
||
# For machines with a published cdt file, let's make sure we flash it | ||
fixup_cdt() { | ||
sed -i '/name=cdt/ s/$/ --filename=cdt.bin/' ${S}/${PARTCONF} | ||
} | ||
|
||
do_compile:prepend:qcs6490-rb3gen2-core-kit() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on the information from https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-254/how_to.html, CDTs for core and vision kits differ (I've compared hashes). Could we also introduce the one for Vision Kit? This probably will also require a new machine file for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, they are different. This is why I prepared the recipe so that we can add more MACHINES in here. There will be a -vision .conf file, we just haven't added it yet (see how it is in the 1.x / legacy branch, https://github.com/quic-yocto/meta-qcom-hwe/tree/kirkstone/conf/machine) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As we currently use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm. interesting.. we are shipping only 1 DTB, and I would expect the CDT to basically assist in the DTB selection process, nothing else. So I am pretty sure that you can use either one of the 2 CDT , and it will work. Do you want to try? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've tested both CDTs no my Vision KIt and confirm Linux boots in both cases There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to note: I still consider that changing CDT for the mezzanines is a mistake. What if the user adds industrial mezz on top of the Vision Kit? Which CDT should be flashed in such a case? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are only using one DTB in the end via the dtb fat image, since we don't have the extra device-id logic in upstream, that is why the generated image is working fine on both. We will have to create another machine conf for vision kit as well, which will have its own CDT. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, I also don't agree on using CDT here, as this is just a mezzanine in the end, but I don't think there is another mechanism to identify if the mezzanine is available at runtime atm. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My point is that even with CDT we can not identify the mezzanine (and we have no guarantee that there is just a single mezz). The updated boot-selection mechanism should account for that by e.g. allowing a user to manually name attached mezzanines. |
||
fixup_cdt | ||
} | ||
|
||
do_compile() { | ||
gen_partition.py -i ${S}/${PARTCONF} -o ${B}/${MACHINE}-partition.xml | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please also expand on what CDT is and what is contains in the `qcom-partition-confs: add support for CDT" commit message. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I can add more information. I will update the PR.
CDT is Configuration Data Table. It contains the platform and subtype IDs, the same explained here https://android.googlesource.com/kernel/msm.git/+/android-msm-bullhead-3.10-n-preview-1/Documentation/devicetree/bindings/arm/msm/board-id.txt.
The IDs are 'flashed', at runtime they are read by the bootloader, and it will search through all the DTBs on the system for the one that 'matches' looking at the board-id in the DTB.
That solution was never accepted upstream, and used mostly in Android. We are working on a 'new' solution for qualcomm linux.