image: add magic number option for append-uImage-fakehdr
'append-uImage-fakehdr' can now accept magic number as a second, optional parameter (passed directly to 'mkimage' command with '-M' option). This enables construction of proper Netgear-specific fake rootfs images (required for flashing WNDR4300 for example). Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
This commit is contained in:
		
				
					committed by
					
						
						John Crispin
					
				
			
			
				
	
			
			
			
						parent
						
							380cf82f99
						
					
				
				
					commit
					f46a4a9293
				
			@@ -109,10 +109,13 @@ endef
 | 
				
			|||||||
# append a fake/empty uImage header, to fool bootloaders rootfs integrity check
 | 
					# append a fake/empty uImage header, to fool bootloaders rootfs integrity check
 | 
				
			||||||
# for example
 | 
					# for example
 | 
				
			||||||
define Build/append-uImage-fakehdr
 | 
					define Build/append-uImage-fakehdr
 | 
				
			||||||
 | 
						$(eval type=$(word 1,$(1)))
 | 
				
			||||||
 | 
						$(eval magic=$(word 2,$(1)))
 | 
				
			||||||
	touch $@.fakehdr
 | 
						touch $@.fakehdr
 | 
				
			||||||
	$(STAGING_DIR_HOST)/bin/mkimage \
 | 
						$(STAGING_DIR_HOST)/bin/mkimage \
 | 
				
			||||||
		-A $(LINUX_KARCH) -O linux -T $(1) -C none \
 | 
							-A $(LINUX_KARCH) -O linux -T $(type) -C none \
 | 
				
			||||||
		-n '$(VERSION_DIST) fake $(1)' \
 | 
							-n '$(VERSION_DIST) fake $(type)' \
 | 
				
			||||||
 | 
							$(if $(magic),-M $(magic)) \
 | 
				
			||||||
		-d $@.fakehdr \
 | 
							-d $@.fakehdr \
 | 
				
			||||||
		-s \
 | 
							-s \
 | 
				
			||||||
		$@.fakehdr
 | 
							$@.fakehdr
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user