mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-04 07:51:21 +00:00 
			
		
		
		
	target: Fix fallback path for kernel config loading
The main path is reading /proc/config.gz. If it does not exists, the following paths are tested: '/boot/config', '/boot/config-$(uname -r)' Since the 2nd path contains a command to be executed, remove quoting of the path when using "cat".
This commit is contained in:
		
				
					committed by
					
						
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							d6a2ed8247
						
					
				
				
					commit
					528d3d4e0f
				
			@@ -249,9 +249,9 @@ class Target(object):
 | 
				
			|||||||
        try:
 | 
					        try:
 | 
				
			||||||
            return KernelConfig(self.execute('zcat /proc/config.gz'))
 | 
					            return KernelConfig(self.execute('zcat /proc/config.gz'))
 | 
				
			||||||
        except TargetStableError:
 | 
					        except TargetStableError:
 | 
				
			||||||
            for path in ['/boot/config', '/boot/config-$(uname -r)']:
 | 
					            for path in ['/boot/config-$({} uname -r)'.format(self.busybox), '/boot/config']:
 | 
				
			||||||
                try:
 | 
					                try:
 | 
				
			||||||
                    return KernelConfig(self.execute('cat {}'.format(quote(path))))
 | 
					                    return KernelConfig(self.execute('cat {}'.format(path)))
 | 
				
			||||||
                except TargetStableError:
 | 
					                except TargetStableError:
 | 
				
			||||||
                    pass
 | 
					                    pass
 | 
				
			||||||
        return KernelConfig('')
 | 
					        return KernelConfig('')
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user