build: kernel2minor: work around path length limit
When building for MikroTik devices the kernel2minor tool will sometimes
fail with:
  Can't get lstat from kernel file!: No such file or directory.
This is because kernel2minor expects paths no longer than 250 chars.
To work around this the include/image-commands.mk has been modified
to copy the kernel to a temporary file (/tmp/tmp.XXXXXXXXXX) before
calling kernel2minor.
Signed-off-by: François Chavant <francois@chavant.info>
(cherry picked from commit 5a9608102b)
			
			
This commit is contained in:
		
				
					committed by
					
						
						Baptiste Jonglez
					
				
			
			
				
	
			
			
			
						parent
						
							d484366a9e
						
					
				
				
					commit
					1a41b88803
				
			@@ -240,8 +240,11 @@ define Build/jffs2
 | 
				
			|||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Build/kernel2minor
 | 
					define Build/kernel2minor
 | 
				
			||||||
	kernel2minor -k $@ -r $@.new $(1)
 | 
						$(eval temp_file := $(shell mktemp))
 | 
				
			||||||
	mv $@.new $@
 | 
						cp $@ $(temp_file)
 | 
				
			||||||
 | 
						kernel2minor -k $(temp_file) -r $(temp_file).new $(1)
 | 
				
			||||||
 | 
						mv $(temp_file).new $@
 | 
				
			||||||
 | 
						rm -f $(temp_file)
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Build/kernel-bin
 | 
					define Build/kernel-bin
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user