From a5ecd90543b0842555662ea92e129d78e6f8c08b Mon Sep 17 00:00:00 2001 From: Denys Dmytriyenko Date: Tue, 10 Jul 2018 07:06:01 +0000 Subject: 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 --- recipes-kernel/linux/cmem.inc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'recipes-kernel') 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() { # Initialize with empty string to simplify logic to append to SRC_URI cmem_dtsi = set(['']) - for cmem_machine in (d.getVar('CMEM_MACHINE', True) or '').split(): + for cmem_machine in (d.getVar('CMEM_MACHINE') or '').split(): # Create copy of data for additional override localdata = bb.data.createCopy(d) localdata.setVar('OVERRIDES', '%s:%s' % (cmem_machine, old_overrides)) bb.data.update_data(localdata) - cmem_dtsi.add(localdata.getVar('CMEM_DTSI', True)) + cmem_dtsi.add(localdata.getVar('CMEM_DTSI')) d.appendVar('SRC_URI', ' file://'.join(cmem_dtsi)) bb.build.exec_func('base_do_unpack', d) @@ -56,27 +56,27 @@ python do_setup_cmem() { old_overrides = d.getVar('OVERRIDES', False) - if d.getVar('RESERVE_CMEM', True) is '1': - for cmem_machine in (d.getVar('CMEM_MACHINE', True) or '').split(): + if d.getVar('RESERVE_CMEM') is '1': + for cmem_machine in (d.getVar('CMEM_MACHINE') or '').split(): # Create copy of data for additional override localdata = bb.data.createCopy(d) localdata.setVar('OVERRIDES', '%s:%s' % (cmem_machine, old_overrides)) bb.data.update_data(localdata) # Get source directory and dtsi filename - src_dir = localdata.getVar('WORKDIR', True) - src_dtsi = localdata.getVar('CMEM_DTSI', True) + src_dir = localdata.getVar('WORKDIR') + src_dtsi = localdata.getVar('CMEM_DTSI') # Get destination directory and destination dtsi filename which adds # the MACHINE prefix. - dst_dir = os.path.join(localdata.getVar('S', True), 'arch/arm/boot/dts') + dst_dir = os.path.join(localdata.getVar('S'), 'arch/arm/boot/dts') dst_dtsi = localdata.expand('${MACHINE}-${CMEM_DTSI}') # Copy cmem.dtsi into source tree shutil.copy(os.path.join(src_dir,src_dtsi), os.path.join(dst_dir,dst_dtsi)) # Inject dtsi into each dts in list - for dtb in (localdata.getVar('CMEM_DEVICETREE', True) or '').split(): + for dtb in (localdata.getVar('CMEM_DEVICETREE') or '').split(): dts = dtb[:-4] + '.dts' with open(os.path.join(dst_dir,dts), 'a') as dts_file: -- cgit v1.2.3-54-g00ecf