mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-31 02:15:45 +01:00 
			
		
		
		
	This commit adds a simple wget command that can download files
from http server.
The command syntax is
wget ${loadaddr} <path of the file from server>
Signed-off-by: Duncan Hare <DuncanCHare@yahoo.com>
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			384 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			384 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /* SPDX-License-Identifier: GPL-2.0 */
 | |
| /*
 | |
|  * Duncan Hare Copyright 2017
 | |
|  */
 | |
| 
 | |
| /**
 | |
|  * wget_start() - begin wget
 | |
|  */
 | |
| void wget_start(void);
 | |
| 
 | |
| enum wget_state {
 | |
| 	WGET_CLOSED,
 | |
| 	WGET_CONNECTING,
 | |
| 	WGET_CONNECTED,
 | |
| 	WGET_TRANSFERRING,
 | |
| 	WGET_TRANSFERRED
 | |
| };
 | |
| 
 | |
| #define DEBUG_WGET		0	/* Set to 1 for debug messages */
 | |
| #define SERVER_PORT		80
 | |
| #define WGET_RETRY_COUNT	30
 | |
| #define WGET_TIMEOUT		2000UL
 |