diff options
author | Francesco Dolcini <francesco.dolcini@toradex.com> | 2022-08-29 22:52:25 +0200 |
---|---|---|
committer | Francesco Dolcini <francesco.dolcini@toradex.com> | 2022-08-29 22:53:47 +0200 |
commit | a3ad7977d6c76af9fb0c7a8cd69e18cc8f641059 (patch) | |
tree | 2279304c95e1bd2d004ca9553331386a75e8a190 /recipes-bsp/u-boot/u-boot-toradex/0002-toradex-tdx-cfg-block-use-defines-for-string-length.patch | |
parent | 7ad862bbbaaf4d912684c7634b45f68ad0feb400 (diff) |
u-boot-toradex: move patches in the correct directory
Fix build issue with patches not found
Relates-to: ELB-4680
Fixes: 7ad862bbbaaf ("u-boot: convert bbappend into our own recipe")
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-toradex/0002-toradex-tdx-cfg-block-use-defines-for-string-length.patch')
-rw-r--r-- | recipes-bsp/u-boot/u-boot-toradex/0002-toradex-tdx-cfg-block-use-defines-for-string-length.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-toradex/0002-toradex-tdx-cfg-block-use-defines-for-string-length.patch b/recipes-bsp/u-boot/u-boot-toradex/0002-toradex-tdx-cfg-block-use-defines-for-string-length.patch new file mode 100644 index 0000000..4a6fd83 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-toradex/0002-toradex-tdx-cfg-block-use-defines-for-string-length.patch @@ -0,0 +1,45 @@ +From 44c266438be85e0431a490a60a4ab3f174ecca77 Mon Sep 17 00:00:00 2001 +From: Philippe Schenker <philippe.schenker@toradex.com> +Date: Mon, 13 Jun 2022 19:35:22 +0200 +Subject: [PATCH 2/5] toradex: tdx-cfg-block: use defines for string length + +With those defines the length can be reused and is in one place +extendable. + +Upstream-Status: Backport [494ef10c3bf7859e7d21d9e1d608dc0b634451c2] +Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> +Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> +Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> +--- + board/toradex/common/tdx-common.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c +index 2207818447a..94e603c14f4 100644 +--- a/board/toradex/common/tdx-common.c ++++ b/board/toradex/common/tdx-common.c +@@ -22,13 +22,17 @@ + + #define TORADEX_OUI 0x00142dUL + ++#define SERIAL_STR_LEN 8 ++#define MODULE_VER_STR_LEN 4 // V1.1 ++#define MODULE_REV_STR_LEN 1 // [A-Z] ++ + #ifdef CONFIG_TDX_CFG_BLOCK +-static char tdx_serial_str[9]; +-static char tdx_board_rev_str[6]; ++static char tdx_serial_str[SERIAL_STR_LEN + 1]; ++static char tdx_board_rev_str[MODULE_VER_STR_LEN + MODULE_REV_STR_LEN + 1]; + + #ifdef CONFIG_TDX_CFG_BLOCK_EXTRA +-static char tdx_car_serial_str[9]; +-static char tdx_car_rev_str[6]; ++static char tdx_car_serial_str[SERIAL_STR_LEN + 1]; ++static char tdx_car_rev_str[MODULE_VER_STR_LEN + MODULE_REV_STR_LEN + 1]; + static char *tdx_carrier_board_name; + #endif + +-- +2.20.1 + |