[PATCH 1/2] fw_env: make flash_io() take buffer as an argument

Rafał Miłecki zajec5 at gmail.com
Tue Jan 11 15:10:46 CET 2022


On 10.01.2022 21:19, Rafał Miłecki wrote:
> @@ -516,7 +516,7 @@ int fw_env_flush(struct env_opts *opts)
>   	*environment.crc = crc32(0, (uint8_t *) environment.data, ENV_SIZE);
>   
>   	/* write environment back to flash */
> -	if (flash_io(O_RDWR)) {
> +	if (flash_io(O_RDWR, environment.data, ENV_SIZE)) {
>   		fprintf(stderr, "Error: can't write fw_env to flash\n");
>   		return -1;
>   	}

Oops, this should probably be environment.image (not .data). I'll sent V2 later.



More information about the U-Boot mailing list