mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-30 01:52:51 +00:00 
			
		
		
		
	 258e484d5f
			
		
	
	258e484d5f
	
	
	
		
			
			ProblemStatement: On EAP104, "fw_setenv" fails with the error "MTD erase error on /dev/mtd10: Invalid argument" RootCause: uboot-envtools expects hex format for the number of sectors while the config file (/etc/fw_env.config) contains a decimal number format for the number of sectors. This leads to out-of-boundary size calculation within the function "environment_end()". Solution: Update the scripts to write a hex value instead of a decimal value in the config file. Reference for the expected format from the config file: Please check the function "get_config" in the file "fw_env.c", where the function uses sscanf to read the parameters from the config file. Fixes: WIFI-12189 Signed-off-by: Ravi Vaishnav <ravi.vaishnav@netexperience.com>
		
			
				
	
	
		
			27 lines
		
	
	
		
			869 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			869 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From 326075f4a7002886b2e3c0f19215f71e8e8d78dd Mon Sep 17 00:00:00 2001
 | |
| From: Ravi Vaishnav <ravi.vaishnav@netexperience.com>
 | |
| Date: Mon, 23 Jan 2023 13:49:57 -0500
 | |
| Subject: [PATCH] uboot-envtools. ipq807x. Fix syntax
 | |
| 
 | |
| Signed-off-by: Ravi Vaishnav <ravi.vaishnav@netexperience.com>
 | |
| ---
 | |
|  package/boot/uboot-envtools/files/ipq807x | 2 +-
 | |
|  1 file changed, 1 insertion(+), 1 deletion(-)
 | |
| 
 | |
| diff --git a/package/boot/uboot-envtools/files/ipq807x b/package/boot/uboot-envtools/files/ipq807x
 | |
| index 6c429f1852..37e06dca04 100644
 | |
| --- a/package/boot/uboot-envtools/files/ipq807x
 | |
| +++ b/package/boot/uboot-envtools/files/ipq807x
 | |
| @@ -21,7 +21,7 @@ ubootenv_mtdinfo () {
 | |
|  		ubootenv_size=0x40000
 | |
|  	fi
 | |
|  
 | |
| -	sectors=$(( $ubootenv_size / $mtd_erase ))
 | |
| +	sectors=$(printf '0x%x' $(( $ubootenv_size / $mtd_erase )))
 | |
|  	echo /dev/$mtd_dev 0x0 $ubootenv_size $mtd_erase $sectors
 | |
|  }
 | |
|  
 | |
| -- 
 | |
| 2.25.1
 | |
| 
 |