Add support for Tegra210
v2 cover Add support for Tegra210
Four t210 specific supporting files are added under src/t210 diretory. Comparing T210 bct to T132 bct, the main changes include the size increased to 10240 from 8704. The number of boot devices that can be specified in bct is reduced from 4 to 1. And many new fileds are added to nvboot_sdram_params.
v1: Initial changes
v2: Fix some minor issues found in v1
Removed files src/t210/nvboot_config.h and src/t210/sdram_param.h
that were added unintentionally in v1.
Jimmy Zhang (2):
Add support for Tegra210
Bump to version 1.5
configure.ac | 2 +- src/Makefile.am | 12 +- src/bct_dump.c | 1 + src/cbootimage.c | 6 +- src/cbootimage.h | 6 +- src/data_layout.c | 2 + src/parse.c | 1 + src/parse.h | 390 ++++++ src/set.c | 6 + src/t210/nvbctlib_t210.c | 2314 ++++++++++++++++++++++++++++++++++++ src/t210/nvboot_bct_t210.h | 406 +++++++ src/t210/nvboot_sdram_param_t210.h | 953 +++++++++++++++ src/t210/parse_t210.c | 741 ++++++++++++ 13 files changed, 4833 insertions(+), 7 deletions(-) create mode 100644 src/t210/nvbctlib_t210.c create mode 100644 src/t210/nvboot_bct_t210.h create mode 100644 src/t210/nvboot_sdram_param_t210.h create mode 100644 src/t210/parse_t210.c
Signature · 1 line
1.8.1.5
PATCH v2 1/2 Add support for Tegra210
In reply to a message not in the archiveThis patch adds support for Tegra210. The command option is
--soc tegra210 or -s tegra210
T210 specific files are added under src/t210 directory.
Main changes from earlier soc are many new fileds are added to structure nvboot_sdram_params and the number of boot devices that can be defined within bct is reduced from 4 to 1.
--- src/Makefile.am | 12 +- src/bct_dump.c | 1 + src/cbootimage.c | 6 +- src/cbootimage.h | 6 +- src/data_layout.c | 2 + src/parse.c | 1 + src/parse.h | 390 ++++++ src/set.c | 6 + src/t210/nvbctlib_t210.c | 2314 ++++++++++++++++++++++++++++++++++++ src/t210/nvboot_bct_t210.h | 406 +++++++ src/t210/nvboot_sdram_param_t210.h | 953 +++++++++++++++ src/t210/parse_t210.c | 741 ++++++++++++ 12 files changed, 4832 insertions(+), 6 deletions(-) create mode 100644 src/t210/nvbctlib_t210.c create mode 100644 src/t210/nvboot_bct_t210.h create mode 100644 src/t210/nvboot_sdram_param_t210.h create mode 100644 src/t210/parse_t210.c
src/Makefile.am +10 -2
@@ -11,11 +11,13 @@ cbootimage_SOURCES = \ aes_ref.c \ context.c \ parse.c \ + t210/parse_t210.c \ t132/parse_t132.c \ t124/parse_t124.c \ t114/parse_t114.c \ t30/parse_t30.c \ t20/parse_t20.c \ + t210/nvbctlib_t210.c \ t132/nvbctlib_t132.c \ t124/nvbctlib_t124.c \ t114/nvbctlib_t114.c \
@@ -37,7 +39,9 @@ cbootimage_SOURCES = \ t124/nvboot_bct_t124.h \ t124/nvboot_sdram_param_t124.h \ t132/nvboot_bct_t132.h \ - t132/nvboot_sdram_param_t132.h + t132/nvboot_sdram_param_t132.h \ + t210/nvboot_bct_t210.h \ + t210/nvboot_sdram_param_t210.h cbootimage_LDADD = -lm
@@ -49,11 +53,13 @@ bct_dump_SOURCES = \ aes_ref.c \ context.c \ parse.c \ + t210/parse_t210.c \ t132/parse_t132.c \ t124/parse_t124.c \ t114/parse_t114.c \ t30/parse_t30.c \ t20/parse_t20.c \ + t210/nvbctlib_t210.c \ t132/nvbctlib_t132.c \ t124/nvbctlib_t124.c \ t114/nvbctlib_t114.c \
@@ -75,4 +81,6 @@ bct_dump_SOURCES = \ t124/nvboot_bct_t124.h \ t124/nvboot_sdram_param_t124.h \ t132/nvboot_bct_t132.h \ - t132/nvboot_sdram_param_t132.h + t132/nvboot_sdram_param_t132.h \ + t210/nvboot_bct_t210.h \ + t210/nvboot_sdram_param_t210.h
src/bct_dump.c +1 -0
@@ -53,6 +53,7 @@ static value_data const values[] = { { token_partition_size, "PartitionSize = ", format_u32_hex8 }, { token_odm_data, "OdmData = ", format_u32_hex8 }, { token_secure_jtag_control, "JtagCtrl = ", format_u32_hex8 }, + { token_secure_debug_control, "DebugCtrl = ", format_u32_hex8 }, { token_unique_chip_id, "ChipUid = ", format_chipuid }, { token_bootloader_used, "# Bootloader used = ", format_u32 }, { token_bootloaders_max, "# Bootloaders max = ", format_u32 },
src/cbootimage.c +4 -2
@@ -1,5 +1,5 @@/* -* Copyright (c) 2012-2014, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2012-2015, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License,
@@ -75,7 +75,7 @@ usage(void)printf (" Default: 20. This option is deprecated\n" );printf (" -s|--soc tegraNN Select target device. Must be one of:\n" );printf (" tegra20, tegra30, tegra114, tegra124,\n" ); -printf (" tegra132.\n" ); +printf (" tegra132, tegra210.\n" );printf (" Default: tegra20.\n" );printf (" -u|--update Copy input image data and update bct\n" );printf (" configs into new image file.\n" );
@@ -131,6 +131,8 @@ process_command_line(int argc, char *argv[], build_image_context *context)t124_get_soc_config (context, &g_soc_config); }else if (!strcasecmp ("132" , optarg)) {t132_get_soc_config (context, &g_soc_config); + }else if (!strcasecmp ("210" , optarg)) { +t210_get_soc_config (context, &g_soc_config); }else {printf ("Unsupported chipname!\n" );usage ();
src/cbootimage.h +4 -2
@@ -1,5 +1,5 @@/* -* Copyright (c) 2012-2014, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2012-2015, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License,
@@ -45,10 +45,11 @@#define BOOTDATA_VERSION_T114 NVBOOT_BOOTDATA_VERSION(0x35, 0x1)#define BOOTDATA_VERSION_T124 NVBOOT_BOOTDATA_VERSION(0x40, 0x1)#define BOOTDATA_VERSION_T132 NVBOOT_BOOTDATA_VERSION(0x13, 0x1) +#define BOOTDATA_VERSION_T210 NVBOOT_BOOTDATA_VERSION(0x21, 0x1)#define MAX_MTS_SIZE (4 * 1024 * 1024) -#define NVBOOT_CONFIG_TABLE_SIZE_MAX 8704 +#define NVBOOT_CONFIG_TABLE_SIZE_MAX (10 * 1024)/* * Enumerations
@@ -111,6 +112,7 @@ typedef struct build_image_context_recu_int32_t odm_data;/* The odm data value */ u_int8_t unique_chip_id[16 ];/* The unique chip uid */ u_int8_t secure_jtag_control;/* The flag for enabling jtag control */ +u_int32_t secure_debug_control;/* The flag for enabling jtag control */ u_int8_t update_image;/* The flag for updating image */ } build_image_context;
src/data_layout.c +2 -0
@@ -1034,6 +1034,8 @@ int data_is_valid_bct(build_image_context *context)return 1 ;if (if_bct_is_t132_get_soc_config (context, &g_soc_config))return 1 ; +if (if_bct_is_t210_get_soc_config (context, &g_soc_config)) +return 1 ;return 0 ; }
src/parse.c +1 -0
@@ -115,6 +115,7 @@ static parse_item s_top_level_items[] = { { "OdmData=", token_odm_data, parse_value_u32 }, { "ChipUid=", token_unique_chip_id, parse_value_chipuid }, { "JtagCtrl=", token_secure_jtag_control, parse_value_u32 }, + { "DebugCtrl=", token_secure_debug_control, parse_value_u32 }, { NULL, 0, NULL } /* Must be last */ };
src/parse.h +390 -0
596 lines not on this page · raw message
src/set.c +6 -0
@@ -242,6 +242,12 @@ int context_set_value(build_image_context *context, value, context->bct);break ; +case token_secure_debug_control: + context->secure_debug_control = *((u_int32_t *)value); + g_soc_config->set_value (token_secure_debug_control, + value, context->bct); +break ; +case token_unique_chip_id:memcpy (context->unique_chip_id, value,16 ); g_soc_config->set_value(token_unique_chip_id,
src/t210/nvbctlib_t210.c new file +2314 -0
2,280 lines not on this page · raw message
src/t210/nvboot_bct_t210.h new file +406 -0
406 lines not on this page · raw message
src/t210/nvboot_sdram_param_t210.h new file +953 -0
953 lines not on this page · raw message
src/t210/parse_t210.c new file +741 -0
741 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.8.1.5
Part of the diff is not shown here. View the raw message.
PATCH v2 2/2 Bump to version 1.5
In reply to a message not in the archiveCreate a release that includes Tegra210 support.
--- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
@@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.67]) -AC_INIT([cbootimage], [1.4], [[email protected]]) +AC_INIT([cbootimage], [1.5], [[email protected]]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src/cbootimage.c]) AC_CONFIG_HEADERS([config.h])
Signature · 1 line
1.8.1.5