main/dtbtool: add patch for providing alternative dt tag (!641)
Add the equivalent of the --dt-tag option found in dtbToolCM or dtbToolLineage, needed on htc-memul.
This commit is contained in:
parent
6dd9e47ba9
commit
c6e3000931
4 changed files with 51 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
diff --git a/dtbTool b/dtbTool
|
||||
index 2dcdd87..0c14a94 100644
|
||||
index 2dcdd87..0c14a94 100755
|
||||
--- a/dtbTool
|
||||
+++ b/dtbTool
|
||||
@@ -408,6 +408,16 @@ def write_padding(f, pagesize):
|
43
main/dtbtool/0003-alternate-dt-tag.patch
Normal file
43
main/dtbtool/0003-alternate-dt-tag.patch
Normal file
|
@ -0,0 +1,43 @@
|
|||
diff --git a/dtbTool b/dtbTool
|
||||
index 0c14a94..ce7844c 100755
|
||||
--- a/dtbTool
|
||||
+++ b/dtbTool
|
||||
@@ -333,7 +333,7 @@ class DTRecord:
|
||||
return True
|
||||
return False
|
||||
|
||||
-def generate_records(f, pagesize):
|
||||
+def generate_records(f, pagesize, dt_tag):
|
||||
version = None
|
||||
size = os.stat(f).st_size
|
||||
mod = size % pagesize
|
||||
@@ -344,7 +344,11 @@ def generate_records(f, pagesize):
|
||||
s = ctypes.create_string_buffer(fi.read())
|
||||
blob = ctypes.byref(s)
|
||||
|
||||
- msm_id = fdt_get_property_int(blob, 0, "qcom,msm-id")
|
||||
+ # Use a different dt tag if requested
|
||||
+ if dt_tag is None:
|
||||
+ dt_tag = "qcom,msm-id"
|
||||
+
|
||||
+ msm_id = fdt_get_property_int(blob, 0, dt_tag)
|
||||
if msm_id is None:
|
||||
compats = fdt_get_property_string(blob, 0, "compatible")
|
||||
if len(compats) == 0:
|
||||
@@ -434,6 +438,7 @@ if __name__ == "__main__":
|
||||
# New options
|
||||
parser.add_option("--version", dest="version", type="int",
|
||||
help="Force version")
|
||||
+ parser.add_option("--dt-tag", help="alternate dt tag")
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
@@ -448,7 +453,7 @@ if __name__ == "__main__":
|
||||
|
||||
records = []
|
||||
for f in flist:
|
||||
- records += generate_records(f, pagesize)
|
||||
+ records += generate_records(f, pagesize, options.dt_tag)
|
||||
|
||||
if len(records) == 0:
|
||||
sys.exit("No valid dtbs found")
|
|
@ -1,14 +1,15 @@
|
|||
pkgname=dtbtool
|
||||
pkgver=1.6.0
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="skales dtbtool"
|
||||
url="https://source.codeaurora.org/quic/kernel/skales/plain/dtbTool"
|
||||
arch="all"
|
||||
license="BSD-2"
|
||||
source="
|
||||
dtbTool::https://source.codeaurora.org/quic/kernel/skales/plain/dtbTool?id=${pkgver}
|
||||
00_fix_version_detection.patch
|
||||
01_find_dtb_in_subfolders.patch
|
||||
0001-fix-version-detection.patch
|
||||
0002-find-dtb-in-subfolders.patch
|
||||
0003-alternate-dt-tag.patch
|
||||
"
|
||||
options="!check"
|
||||
depends="dtc-dev python"
|
||||
|
@ -25,5 +26,6 @@ package() {
|
|||
"$pkgdir"/usr/bin/dtbTool
|
||||
}
|
||||
sha512sums="77ad411ff482896919d971c5ef15817a5bee837d5a8827fd4a0449e7a99b8759e3ca2fe3f233b4a3a92c8e386e0457191d8d18755dba842224f5cc64ddb89024 dtbTool
|
||||
3ad31e31a883a1773652149e6e2a7d0225422b3c7576ec58d6bb2db28187096712d24684b3e58f26dec72889c0200d60b763e985a1f6ff60edcb1fe05ab58353 00_fix_version_detection.patch
|
||||
5d88faa1b714d6c0facb959c85fe639a82debd178f127d83f339b5feffd5925498c06fe5247d1ff6280582498bd83ddc0564d4d64c365e39b83fbaa5d19b0b41 01_find_dtb_in_subfolders.patch"
|
||||
3ad31e31a883a1773652149e6e2a7d0225422b3c7576ec58d6bb2db28187096712d24684b3e58f26dec72889c0200d60b763e985a1f6ff60edcb1fe05ab58353 0001-fix-version-detection.patch
|
||||
a4da4436c9d95d7c3a1980353cea46bf00e1a0e50f4b1e4151db57595dc6cff94d521b468ca463388406b8dc33ac574237a170315ec01a8c240294b052561044 0002-find-dtb-in-subfolders.patch
|
||||
c179aac2b401159e744d493068083af8de7f713bc1e121f201c99a7a03a916cb1c9602aeded3eb2505e46126fce40b37c98c3ed110c90c26908f23bfb4385b0e 0003-alternate-dt-tag.patch"
|
||||
|
|
Loading…
Reference in a new issue