Skip to content

Commit 86c8296

Browse files
authored
Use partitions configuration from the qcom-ptool repo (#949)
We currently have two sources of partition information: qcom-ptool repo and a set of partition.conf files in meta-qcom. Remove the duplication by using the data from the qcom-ptool repo. Closes #714
2 parents 0c47db4 + 514ce17 commit 86c8296

26 files changed

+61
-2918
lines changed

classes-recipe/image_types_qcom.bbclass

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ inherit image_types
55

66
IMAGE_TYPES += "qcomflash"
77

8+
QCOM_BOOT_FIRMWARE ?= ""
9+
810
QCOM_ESP_IMAGE ?= "esp-qcom-image"
911
QCOM_ESP_FILE ?= "${@'efi.bin' if d.getVar('QCOM_ESP_IMAGE') else ''}"
1012

@@ -19,8 +21,9 @@ QCOM_DTB_DEFAULT ?= "${@os.path.basename(d.getVar('KERNEL_DEVICETREE').split()[0
1921
QCOM_DTB_FILE ?= "dtb.bin"
2022

2123
QCOM_BOOT_FILES_SUBDIR ?= ""
24+
QCOM_PARTITION_FILES_SUBDIR ?= "${QCOM_BOOT_FILES_SUBDIR}"
2225

23-
QCOM_PARTITION_CONF ?= ""
26+
QCOM_PARTITION_CONF ?= "qcom-partition-conf"
2427

2528
QCOM_ROOTFS_FILE ?= "rootfs.img"
2629
IMAGE_QCOMFLASH_FS_TYPE ??= "ext4"
@@ -30,6 +33,7 @@ IMAGE_CMD:qcomflash = "create_qcomflash_pkg"
3033
do_image_qcomflash[dirs] = "${QCOMFLASH_DIR}"
3134
do_image_qcomflash[cleandirs] = "${QCOMFLASH_DIR}"
3235
do_image_qcomflash[depends] += "${@ ['', '${QCOM_PARTITION_CONF}:do_deploy'][d.getVar('QCOM_PARTITION_CONF') != '']} \
36+
${@ ['', '${QCOM_BOOT_FIRMWARE}:do_deploy'][d.getVar('QCOM_BOOT_FIRMWARE') != '']} \
3337
virtual/kernel:do_deploy \
3438
${@'virtual/bootloader:do_deploy' if d.getVar('PREFERRED_PROVIDER_virtual/bootloader') else ''} \
3539
${@'${QCOM_ESP_IMAGE}:do_image_complete' if d.getVar('QCOM_ESP_IMAGE') != '' else ''}"
@@ -74,13 +78,13 @@ create_qcomflash_pkg() {
7478
install -m 0644 ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${IMAGE_QCOMFLASH_FS_TYPE} ${QCOM_ROOTFS_FILE}
7579

7680
# partition bins
77-
for pbin in `find ${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR} -maxdepth 1 -type f -name 'gpt_main*.bin' \
81+
for pbin in `find ${DEPLOY_DIR_IMAGE}/${QCOM_PARTITION_FILES_SUBDIR} -maxdepth 1 -type f -name 'gpt_main*.bin' \
7882
-o -name 'gpt_backup*.bin' -o -name 'patch*.xml'`; do
7983
install -m 0644 ${pbin} .
8084
done
8185

8286
# skip BLANK_GPT and WIPE_PARTITIONS for rawprogram xml files
83-
for rawpg in `find ${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR} -maxdepth 1 -type f -name 'rawprogram*.xml' \
87+
for rawpg in `find ${DEPLOY_DIR_IMAGE}/${QCOM_PARTITION_FILES_SUBDIR} -maxdepth 1 -type f -name 'rawprogram*.xml' \
8488
! -name 'rawprogram*_BLANK_GPT.xml' ! -name 'rawprogram*_WIPE_PARTITIONS.xml'`; do
8589
install -m 0644 ${rawpg} .
8690
done
@@ -94,7 +98,7 @@ create_qcomflash_pkg() {
9498
for logfs in `find ${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR} -maxdepth 1 -type f -name 'logfs_*.bin'`; do
9599
install -m 0644 ${logfs} .
96100
done
97-
for zeros in `find ${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR} -maxdepth 1 -type f -name 'zeros_*.bin'`; do
101+
for zeros in `find ${DEPLOY_DIR_IMAGE}/${QCOM_PARTITION_FILES_SUBDIR} -maxdepth 1 -type f -name 'zeros_*.bin'`; do
98102
install -m 0644 ${zeros} .
99103
done
100104

conf/machine/include/qcom-qcm2290.inc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,3 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
1818
MACHINE_EXTRA_RRECOMMENDS += " \
1919
packagegroup-qcom-boot-additional \
2020
"
21-
22-
EXTRA_IMAGEDEPENDS += "firmware-qcom-boot-qrb2210-rb1"

conf/machine/include/qcom-qcs6490.inc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,3 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
1515
MACHINE_EXTRA_RRECOMMENDS += " \
1616
packagegroup-qcom-boot-additional \
1717
"
18-
19-
EXTRA_IMAGEDEPENDS += "firmware-qcom-boot-qcs6490"

conf/machine/include/qcom-qcs8300.inc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,3 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
1515
MACHINE_EXTRA_RRECOMMENDS += " \
1616
packagegroup-qcom-boot-additional \
1717
"
18-
19-
EXTRA_IMAGEDEPENDS += "firmware-qcom-boot-qcs8300"

conf/machine/include/qcom-qcs9100.inc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,3 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
1515
MACHINE_EXTRA_RRECOMMENDS += " \
1616
packagegroup-qcom-boot-additional \
1717
"
18-
19-
EXTRA_IMAGEDEPENDS += "firmware-qcom-boot-qcs9100"

conf/machine/qcm6490-idp.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
1515
packagegroup-rb3gen2-hexagon-dsp-binaries \
1616
"
1717

18+
QCOM_BOOT_FILES_SUBDIR = "qcm6490"
19+
20+
QCOM_BOOT_FIRMWARE = "firmware-qcom-boot-qcs6490"
21+
QCOM_PARTITION_FILES_SUBDIR = "partitions/qcm6490-idp"
22+
1823
#
1924
# Configuration variables for linux-qcom-staging kernel
2025
#

conf/machine/qcs615-adp-air.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ KERNEL_DEVICETREE ?= " \
1313
"
1414

1515
QCOM_BOOT_FILES_SUBDIR = "qcs615"
16-
QCOM_PARTITION_CONF = "qcom-partition-conf-qcs615-adp-air"
16+
QCOM_PARTITION_FILES_SUBDIR = "partitions/qcs615-adp-air"

conf/machine/qcs6490-rb3gen2-core-kit.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
2020

2121
QCOM_CDT_FILE = "cdt_core_kit"
2222
QCOM_BOOT_FILES_SUBDIR = "qcm6490"
23-
QCOM_PARTITION_CONF = "qcom-partition-conf-qcs6490-rb3gen2"
23+
QCOM_PARTITION_FILES_SUBDIR = "partitions/qcs6490-rb3gen2"
24+
25+
QCOM_BOOT_FIRMWARE = "firmware-qcom-boot-qcs6490"
2426

2527
#
2628
# Configuration variables for linux-qcom-staging kernel

conf/machine/qcs8300-ride-sx.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
1919

2020
QCOM_CDT_FILE = "cdt_ride_sx"
2121
QCOM_BOOT_FILES_SUBDIR = "qcs8300"
22-
QCOM_PARTITION_CONF = "qcom-partition-conf-qcs8300-ride-sx"
22+
QCOM_PARTITION_FILES_SUBDIR = "partitions/qcs8300-ride-sx"
23+
24+
QCOM_BOOT_FIRMWARE = "firmware-qcom-boot-qcs8300"
2325

2426
#
2527
# Configuration variables for linux-qcom-staging kernel

conf/machine/qcs9075-iq-9075-evk.conf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
1919

2020
QCOM_CDT_FILE = "cdt_rb8_core_kit"
2121
QCOM_BOOT_FILES_SUBDIR = "qcs9100"
22-
QCOM_PARTITION_CONF = "qcom-partition-conf-qcs9100-ride-sx"
22+
23+
# FIXME provide device-specific table
24+
QCOM_PARTITION_FILES_SUBDIR = "partitions/qcs9100-ride-sx"
25+
26+
QCOM_BOOT_FIRMWARE = "firmware-qcom-boot-qcs9100"
2327

2428
#
2529
# Configuration variables for linux-qcom-staging kernel

0 commit comments

Comments
 (0)