[U-Boot] [PATCH 3/5] arm: ti: boot: Extract PARTS_DEFAULT to boot.h

Andrew F. Davis afd at ti.com
Tue Apr 17 21:02:00 UTC 2018


On 04/16/2018 03:32 PM, Sam Protsenko wrote:
> Eliminate code duplication: the same PARTS_DEFAULT was defined in
> am57xx_evm.h and in dra7xx_evm.h. Extract it to environment/boot.h and
> use in all OMAP5-based boards.
> 
> Signed-off-by: Sam Protsenko <semen.protsenko at linaro.org>
> ---


This patch can be taken independent of my objections to the others in
this series.

Acked-by: Andrew F. Davis <afd at ti.com>


>  include/configs/am57xx_evm.h   | 25 -------------------------
>  include/configs/cl-som-am57x.h |  2 ++
>  include/configs/cm_t54.h       |  2 ++
>  include/configs/dra7xx_evm.h   | 25 -------------------------
>  include/environment/ti/boot.h  | 27 +++++++++++++++++++++++++--
>  5 files changed, 29 insertions(+), 52 deletions(-)
> 
> diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
> index d1f73f76a4..886a5696f5 100644
> --- a/include/configs/am57xx_evm.h
> +++ b/include/configs/am57xx_evm.h
> @@ -38,31 +38,6 @@
>  
>  #define CONFIG_SYS_OMAP_ABE_SYSCK
>  
> -/* Define the default GPT table for eMMC */
> -#define PARTS_DEFAULT \
> -	/* Linux partitions */ \
> -	"uuid_disk=${uuid_gpt_disk};" \
> -	"name=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};" \
> -	"name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}\0" \
> -	/* Android partitions */ \
> -	"partitions_android=" \
> -	"uuid_disk=${uuid_gpt_disk};" \
> -	"name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};" \
> -	"name=bootloader,size=1792K,uuid=${uuid_gpt_bootloader};" \
> -	"name=environment,size=128K,uuid=${uuid_gpt_environment};" \
> -	"name=misc,size=128K,uuid=${uuid_gpt_misc};" \
> -	"name=reserved,size=256K,uuid=${uuid_gpt_reserved};" \
> -	"name=efs,size=16M,uuid=${uuid_gpt_efs};" \
> -	"name=crypto,size=16K,uuid=${uuid_gpt_crypto};" \
> -	"name=recovery,size=40M,uuid=${uuid_gpt_recovery};" \
> -	"name=boot,size=10M,uuid=${uuid_gpt_boot};" \
> -	"name=system,size=768M,uuid=${uuid_gpt_system};" \
> -	"name=vendor,size=256M,uuid=${uuid_gpt_vendor};" \
> -	"name=cache,size=256M,uuid=${uuid_gpt_cache};" \
> -	"name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \
> -	"name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \
> -	"name=userdata,size=-,uuid=${uuid_gpt_userdata}"
> -
>  #define DFUARGS \
>  	"dfu_bufsiz=0x10000\0" \
>  	DFU_ALT_INFO_MMC \
> diff --git a/include/configs/cl-som-am57x.h b/include/configs/cl-som-am57x.h
> index 9c70cf0b37..709e0375b3 100644
> --- a/include/configs/cl-som-am57x.h
> +++ b/include/configs/cl-som-am57x.h
> @@ -18,6 +18,8 @@
>  
>  #define CONFIG_SYS_OMAP_ABE_SYSCK
>  
> +#define PARTS_DEFAULT
> +
>  #include <configs/ti_omap5_common.h>
>  
>  /* misc */
> diff --git a/include/configs/cm_t54.h b/include/configs/cm_t54.h
> index 6123cd374d..f0d76ed806 100644
> --- a/include/configs/cm_t54.h
> +++ b/include/configs/cm_t54.h
> @@ -14,6 +14,8 @@
>  #define CONFIG_CM_T54
>  #define CONFIG_DRAM_2G
>  
> +#define PARTS_DEFAULT
> +
>  #include <configs/ti_omap5_common.h>
>  
>  /* EEPROM related defines */
> diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
> index 917a05d701..9b3fb2c913 100644
> --- a/include/configs/dra7xx_evm.h
> +++ b/include/configs/dra7xx_evm.h
> @@ -45,31 +45,6 @@
>  #define CONFIG_SYS_OMAP_ABE_SYSCK
>  
>  #ifndef CONFIG_SPL_BUILD
> -/* Define the default GPT table for eMMC */
> -#define PARTS_DEFAULT \
> -	/* Linux partitions */ \
> -	"uuid_disk=${uuid_gpt_disk};" \
> -	"name=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};" \
> -	"name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}\0" \
> -	/* Android partitions */ \
> -	"partitions_android=" \
> -	"uuid_disk=${uuid_gpt_disk};" \
> -	"name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};" \
> -	"name=bootloader,size=1792K,uuid=${uuid_gpt_bootloader};" \
> -	"name=environment,size=128K,uuid=${uuid_gpt_environment};" \
> -	"name=misc,size=128K,uuid=${uuid_gpt_misc};" \
> -	"name=reserved,size=256K,uuid=${uuid_gpt_reserved};" \
> -	"name=efs,size=16M,uuid=${uuid_gpt_efs};" \
> -	"name=crypto,size=16K,uuid=${uuid_gpt_crypto};" \
> -	"name=recovery,size=40M,uuid=${uuid_gpt_recovery};" \
> -	"name=boot,size=10M,uuid=${uuid_gpt_boot};" \
> -	"name=system,size=768M,uuid=${uuid_gpt_system};" \
> -	"name=vendor,size=256M,uuid=${uuid_gpt_vendor};" \
> -	"name=cache,size=256M,uuid=${uuid_gpt_cache};" \
> -	"name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \
> -	"name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \
> -	"name=userdata,size=-,uuid=${uuid_gpt_userdata}"
> -
>  #define DFUARGS \
>  	"dfu_bufsiz=0x10000\0" \
>  	DFU_ALT_INFO_MMC \
> diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h
> index 24b7783f88..4f3d748b5c 100644
> --- a/include/environment/ti/boot.h
> +++ b/include/environment/ti/boot.h
> @@ -15,8 +15,31 @@
>  #endif
>  
>  #ifndef PARTS_DEFAULT
> -#define PARTS_DEFAULT
> -#endif
> +/* Define the default GPT table for eMMC */
> +#define PARTS_DEFAULT \
> +	/* Linux partitions */ \
> +	"uuid_disk=${uuid_gpt_disk};" \
> +	"name=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};" \
> +	"name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}\0" \
> +	/* Android partitions */ \
> +	"partitions_android=" \
> +	"uuid_disk=${uuid_gpt_disk};" \
> +	"name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};" \
> +	"name=bootloader,size=1792K,uuid=${uuid_gpt_bootloader};" \
> +	"name=environment,size=128K,uuid=${uuid_gpt_environment};" \
> +	"name=misc,size=128K,uuid=${uuid_gpt_misc};" \
> +	"name=reserved,size=256K,uuid=${uuid_gpt_reserved};" \
> +	"name=efs,size=16M,uuid=${uuid_gpt_efs};" \
> +	"name=crypto,size=16K,uuid=${uuid_gpt_crypto};" \
> +	"name=recovery,size=40M,uuid=${uuid_gpt_recovery};" \
> +	"name=boot,size=10M,uuid=${uuid_gpt_boot};" \
> +	"name=system,size=768M,uuid=${uuid_gpt_system};" \
> +	"name=vendor,size=256M,uuid=${uuid_gpt_vendor};" \
> +	"name=cache,size=256M,uuid=${uuid_gpt_cache};" \
> +	"name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \
> +	"name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \
> +	"name=userdata,size=-,uuid=${uuid_gpt_userdata}"
> +#endif /* PARTS_DEFAULT */
>  
>  #define DEFAULT_COMMON_BOOT_TI_ARGS \
>  	"console=" CONSOLEDEV ",115200n8\0" \
> 


More information about the U-Boot mailing list