summaryrefslogtreecommitdiffstats
path: root/recipes-kernel
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel')
-rw-r--r--recipes-kernel/linux/cmem.inc16
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: