build: make device tree arg really optional in mkits.sh
If no device tree is given there is no node generated, but
the configuration does still include the name of the missing node.
This will result in a successful build fit image, but bootm does
throw a error message if we want to boot the bad configuration.
Signed-off-by: Johann Neuhauser <jneuhauser@dh-electronics.com>
(cherry picked from commit 205e0939f0)
			
			
This commit is contained in:
		 Johann Neuhauser
					Johann Neuhauser
				
			
				
					committed by
					
						 Petr Štetiar
						Petr Štetiar
					
				
			
			
				
	
			
			
			 Petr Štetiar
						Petr Štetiar
					
				
			
						parent
						
							60ff8bf512
						
					
				
				
					commit
					830000855e
				
			| @@ -59,7 +59,7 @@ ARCH_UPPER=`echo $ARCH | tr '[:lower:]' '[:upper:]'` | |||||||
|  |  | ||||||
| # Conditionally create fdt information | # Conditionally create fdt information | ||||||
| if [ -n "${DTB}" ]; then | if [ -n "${DTB}" ]; then | ||||||
| 	FDT=" | 	FDT_NODE=" | ||||||
| 		fdt@1 { | 		fdt@1 { | ||||||
| 			description = \"${ARCH_UPPER} OpenWrt ${DEVICE} device tree blob\"; | 			description = \"${ARCH_UPPER} OpenWrt ${DEVICE} device tree blob\"; | ||||||
| 			data = /incbin/(\"${DTB}\"); | 			data = /incbin/(\"${DTB}\"); | ||||||
| @@ -74,6 +74,7 @@ if [ -n "${DTB}" ]; then | |||||||
| 			}; | 			}; | ||||||
| 		}; | 		}; | ||||||
| " | " | ||||||
|  | 	FDT_PROP="fdt = \"fdt@1\";" | ||||||
| fi | fi | ||||||
|  |  | ||||||
| # Create a default, fully populated DTS file | # Create a default, fully populated DTS file | ||||||
| @@ -100,9 +101,7 @@ DATA="/dts-v1/; | |||||||
| 				algo = \"sha1\"; | 				algo = \"sha1\"; | ||||||
| 			}; | 			}; | ||||||
| 		}; | 		}; | ||||||
|  | ${FDT_NODE} | ||||||
| ${FDT} |  | ||||||
|  |  | ||||||
| 	}; | 	}; | ||||||
|  |  | ||||||
| 	configurations { | 	configurations { | ||||||
| @@ -110,7 +109,7 @@ ${FDT} | |||||||
| 		${CONFIG} { | 		${CONFIG} { | ||||||
| 			description = \"OpenWrt\"; | 			description = \"OpenWrt\"; | ||||||
| 			kernel = \"kernel@1\"; | 			kernel = \"kernel@1\"; | ||||||
| 			fdt = \"fdt@1\"; | 			${FDT_PROP} | ||||||
| 		}; | 		}; | ||||||
| 	}; | 	}; | ||||||
| };" | };" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user