X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=board%2Fti%2Fam335x%2Fboard.c;h=b56a801a4d040965e0aa682dc314dcd2a87e2a08;hb=6acc7c3cbc05873d62118640cf964e9c9665804c;hp=e5ad76e9a05b6a379ce7543e34e879476438ac88;hpb=a42c87f9d831c4eb36104255766cc7897876867c;p=platform%2Fkernel%2Fu-boot.git diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index e5ad76e..b56a801 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -321,6 +321,26 @@ int board_init(void) return 0; } +#ifdef CONFIG_BOARD_LATE_INIT +int board_late_init(void) +{ +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG + char safe_string[HDR_NAME_LEN + 1]; + + /* Now set variables based on the header. */ + strncpy(safe_string, (char *)header.name, sizeof(header.name)); + safe_string[sizeof(header.name)] = 0; + setenv("board_name", safe_string); + + strncpy(safe_string, (char *)header.version, sizeof(header.version)); + safe_string[sizeof(header.version)] = 0; + setenv("board_rev", safe_string); +#endif + + return 0; +} +#endif + #ifdef CONFIG_DRIVER_TI_CPSW static void cpsw_control(int enabled) {