X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fenvironment.h;h=bb109649f6bab7492ba9242d64fc43784c8ed2ab;hb=cacfab588a897c369a4906818c5ed4bc40a450c5;hp=fe8465b9606e589f7c129a56c99292a5c1ffed01;hpb=c609719b8d1b2dca590e0ed499016d041203e403;p=oweals%2Fu-boot.git diff --git a/include/environment.h b/include/environment.h index fe8465b960..bb109649f6 100644 --- a/include/environment.h +++ b/include/environment.h @@ -47,8 +47,15 @@ # if !defined(CFG_ENV_ADDR_REDUND) && defined(CFG_ENV_OFFSET_REDUND) # define CFG_ENV_ADDR_REDUND (CFG_FLASH_BASE + CFG_ENV_OFFSET_REDUND) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# if defined(CFG_ENV_SECT_SIZE) || defined(CFG_ENV_SIZE) +# ifndef CFG_ENV_SECT_SIZE +# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# endif +# ifndef CFG_ENV_SIZE +# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# endif +# else +# error "Both CFG_ENV_SECT_SIZE and CFG_ENV_SIZE undefined" # endif # if defined(CFG_ENV_ADDR_REDUND) && !defined(CFG_ENV_SIZE_REDUND) # define CFG_ENV_SIZE_REDUND CFG_ENV_SIZE