util/amdfwtool: Update config parser to accept full paths
This allows individual components to be placed in a location other than what is specified by the FIRMWARE_LOCATION line. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I3a83e52d081a5909d54eacc575dd2b40b09e4038 Reviewed-on: https://review.coreboot.org/c/coreboot/+/73656 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
This commit is contained in:
		
				
					committed by
					
						 Martin L Roth
						Martin L Roth
					
				
			
			
				
	
			
			
			
						parent
						
							a18b8b44d7
						
					
				
				
					commit
					6bb6ed9467
				
			| @@ -655,8 +655,12 @@ static uint8_t process_one_line(char *oneline, regmatch_t *match, char *dir, | ||||
| 	ch_lvl = get_level_from_config(oneline, ch_lvl_index, cb_config); | ||||
|  | ||||
| 	path_filename = malloc(MAX_LINE_SIZE * 2 + 2); | ||||
| 	snprintf(path_filename, MAX_LINE_SIZE * 2 + 2, "%.*s/%.*s", | ||||
| 		MAX_LINE_SIZE, dir, MAX_LINE_SIZE, fn); | ||||
| 	if (strchr(fn, '/')) | ||||
| 		snprintf(path_filename, MAX_LINE_SIZE * 2 + 2, "%.*s", | ||||
| 				MAX_LINE_SIZE, fn); | ||||
| 	else | ||||
| 		snprintf(path_filename, MAX_LINE_SIZE * 2 + 2, "%.*s/%.*s", | ||||
| 				MAX_LINE_SIZE, dir, MAX_LINE_SIZE, fn); | ||||
|  | ||||
| 	if (find_register_fw_filename_psp_dir( | ||||
| 			fw_type_str, path_filename, ch_lvl, cb_config) == 0) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user