diff options
author | Denys Dmytriyenko <denys@ti.com> | 2018-07-10 07:06:01 +0000 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2018-07-10 18:39:09 +0000 |
commit | a5ecd90543b0842555662ea92e129d78e6f8c08b (patch) | |
tree | e78c524c27bd0922dbe64879c84fa2405dd6e30e /recipes-kernel | |
parent | f64a19d3e99027030decbf4ae9760f3a22a4e584 (diff) | |
download | meta-ti-a5ecd90543b0842555662ea92e129d78e6f8c08b.tar.gz |
meta-ti: cleanup use of d.getVar()
1. drop use of True as second parameter, which is default, to align with master
2. there were instances of incorrectly passing 'd' as second parameter from
previous conversion from bb.data.getVar() usage
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-kernel')
-rw-r--r-- | recipes-kernel/linux/cmem.inc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/recipes-kernel/linux/cmem.inc b/recipes-kernel/linux/cmem.inc index ad122799..8325c00f 100644 --- a/recipes-kernel/linux/cmem.inc +++ b/recipes-kernel/linux/cmem.inc | |||
@@ -39,13 +39,13 @@ python do_unpack() { | |||
39 | # Initialize with empty string to simplify logic to append to SRC_URI | 39 | # Initialize with empty string to simplify logic to append to SRC_URI |
40 | cmem_dtsi = set(['']) | 40 | cmem_dtsi = set(['']) |
41 | 41 | ||
42 | for cmem_machine in (d.getVar('CMEM_MACHINE', True) or '').split(): | 42 | for cmem_machine in (d.getVar('CMEM_MACHINE') or '').split(): |
43 | # Create copy of data for additional override | 43 | # Create copy of data for additional override |
44 | localdata = bb.data.createCopy(d) | 44 | localdata = bb.data.createCopy(d) |
45 | localdata.setVar('OVERRIDES', '%s:%s' % (cmem_machine, old_overrides)) | 45 | localdata.setVar('OVERRIDES', '%s:%s' % (cmem_machine, old_overrides)) |
46 | bb.data.update_data(localdata) | 46 | bb.data.update_data(localdata) |
47 | 47 | ||
48 | cmem_dtsi.add(localdata.getVar('CMEM_DTSI', True)) | 48 | cmem_dtsi.add(localdata.getVar('CMEM_DTSI')) |
49 | 49 | ||
50 | d.appendVar('SRC_URI', ' file://'.join(cmem_dtsi)) | 50 | d.appendVar('SRC_URI', ' file://'.join(cmem_dtsi)) |
51 | bb.build.exec_func('base_do_unpack', d) | 51 | bb.build.exec_func('base_do_unpack', d) |
@@ -56,27 +56,27 @@ python do_setup_cmem() { | |||
56 | 56 | ||
57 | old_overrides = d.getVar('OVERRIDES', False) | 57 | old_overrides = d.getVar('OVERRIDES', False) |
58 | 58 | ||
59 | if d.getVar('RESERVE_CMEM', True) is '1': | 59 | if d.getVar('RESERVE_CMEM') is '1': |
60 | for cmem_machine in (d.getVar('CMEM_MACHINE', True) or '').split(): | 60 | for cmem_machine in (d.getVar('CMEM_MACHINE') or '').split(): |
61 | # Create copy of data for additional override | 61 | # Create copy of data for additional override |
62 | localdata = bb.data.createCopy(d) | 62 | localdata = bb.data.createCopy(d) |
63 | localdata.setVar('OVERRIDES', '%s:%s' % (cmem_machine, old_overrides)) | 63 | localdata.setVar('OVERRIDES', '%s:%s' % (cmem_machine, old_overrides)) |
64 | bb.data.update_data(localdata) | 64 | bb.data.update_data(localdata) |
65 | 65 | ||
66 | # Get source directory and dtsi filename | 66 | # Get source directory and dtsi filename |
67 | src_dir = localdata.getVar('WORKDIR', True) | 67 | src_dir = localdata.getVar('WORKDIR') |
68 | src_dtsi = localdata.getVar('CMEM_DTSI', True) | 68 | src_dtsi = localdata.getVar('CMEM_DTSI') |
69 | 69 | ||
70 | # Get destination directory and destination dtsi filename which adds | 70 | # Get destination directory and destination dtsi filename which adds |
71 | # the MACHINE prefix. | 71 | # the MACHINE prefix. |
72 | dst_dir = os.path.join(localdata.getVar('S', True), 'arch/arm/boot/dts') | 72 | dst_dir = os.path.join(localdata.getVar('S'), 'arch/arm/boot/dts') |
73 | dst_dtsi = localdata.expand('${MACHINE}-${CMEM_DTSI}') | 73 | dst_dtsi = localdata.expand('${MACHINE}-${CMEM_DTSI}') |
74 | 74 | ||
75 | # Copy cmem.dtsi into source tree | 75 | # Copy cmem.dtsi into source tree |
76 | shutil.copy(os.path.join(src_dir,src_dtsi), os.path.join(dst_dir,dst_dtsi)) | 76 | shutil.copy(os.path.join(src_dir,src_dtsi), os.path.join(dst_dir,dst_dtsi)) |
77 | 77 | ||
78 | # Inject dtsi into each dts in list | 78 | # Inject dtsi into each dts in list |
79 | for dtb in (localdata.getVar('CMEM_DEVICETREE', True) or '').split(): | 79 | for dtb in (localdata.getVar('CMEM_DEVICETREE') or '').split(): |
80 | dts = dtb[:-4] + '.dts' | 80 | dts = dtb[:-4] + '.dts' |
81 | 81 | ||
82 | with open(os.path.join(dst_dir,dts), 'a') as dts_file: | 82 | with open(os.path.join(dst_dir,dts), 'a') as dts_file: |