From 4bafc809c41116b7c40767963ecc2b068c7f676c Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Fri, 22 Oct 2010 17:18:06 +0900 Subject: [PATCH] Fix for DFU. --- ChangeLog | 6 ++++++ src/gnuk.ld.in | 5 +++-- src/openpgp.c | 12 ++++++------ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0e03322..6a1691c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2010-10-22 NIIBE Yutaka + * src/gnuk.ld.in (.gnuk_random): Fix description so that + padding with 0xffffffff will be in gnuk.hex. + + * src/openpgp.c (file_selection): Change type (was: int). + (FILE_NONE..FILE_EF_SERIAL): Change the values. + * src/configure: Added STBee Mini support. * boards/STBEE_MINI/mcuconf.h: New. * boards/STBEE_MINI/board.mk: New. diff --git a/src/gnuk.ld.in b/src/gnuk.ld.in index c14c068..f9e989c 100644 --- a/src/gnuk.ld.in +++ b/src/gnuk.ld.in @@ -114,10 +114,11 @@ SECTIONS PROVIDE(end = .); _end = .; - .gnuk_random : ALIGN (1024) + .gnuk_random : { + . = ALIGN (1024); *(.gnuk_random) - } > flash + } > flash =0xffffffff .gnuk_flash : ALIGN (1024) { diff --git a/src/openpgp.c b/src/openpgp.c index dcc368b..98ba617 100644 --- a/src/openpgp.c +++ b/src/openpgp.c @@ -69,13 +69,13 @@ write_res_apdu (const uint8_t *p, int len, uint8_t sw1, uint8_t sw2) res_APDU[len+1] = sw2; } -#define FILE_NONE -1 -#define FILE_DF_OPENPGP 0 -#define FILE_MF 1 -#define FILE_EF_DIR 2 -#define FILE_EF_SERIAL 3 +#define FILE_NONE 0 +#define FILE_DF_OPENPGP 1 +#define FILE_MF 2 +#define FILE_EF_DIR 3 +#define FILE_EF_SERIAL 4 -static int file_selection = FILE_NONE; +static uint8_t file_selection = FILE_NONE; static void cmd_verify (void)