fixes to enable reGNUal

This commit is contained in:
NIIBE Yutaka
2013-02-26 10:25:32 +09:00
parent 93c97e9474
commit 8cf0dd5665
6 changed files with 23 additions and 3 deletions

View File

@@ -1,3 +1,10 @@
2013-02-26 Niibe Yutaka <gniibe@fsij.org>
* regnual/regnual.ld (MEMORY): Fix start address.
* src/random.c (random_fini): New.
* src/main.c (main): Call random_fini.
2013-02-25 Niibe Yutaka <gniibe@fsij.org>
* src/configure: Correct typo in help text.

4
README
View File

@@ -1,3 +1,7 @@
************* THIS IS DEVELOPMENT BRANCH OF GNUK *************
************* Text written below is for release 1.0.2, *************
************* which might not be vaild for this code *************
Gnuk - An Implementation of USB Cryptographic Token for GnuPG
Version 1.0.2

View File

@@ -7,8 +7,8 @@ __stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
MEMORY
{
ram0 : org = 0x20000000, len = 0x1a00
ram1 : org = 0x20001400, len = 20k - 0x1a00
ram0 : org = 0x20000000, len = 0x1c00
ram1 : org = 0x20001c00, len = 20k - 0x1c00
}
vector = 0x08000000;

View File

@@ -428,6 +428,8 @@ main (int argc, char *argv[])
#endif
}
random_fini ();
set_led (1);
usb_lld_shutdown ();
/* Disable SysTick */

View File

@@ -1,7 +1,7 @@
/*
* random.c -- get random bytes
*
* Copyright (C) 2010, 2011, 2012 Free Software Initiative of Japan
* Copyright (C) 2010, 2011, 2012, 2013 Free Software Initiative of Japan
* Author: NIIBE Yutaka <gniibe@fsij.org>
*
* This file is a part of Gnuk, a GnuPG USB Token implementation.
@@ -40,6 +40,12 @@ random_init (void)
(void)neug_get (NEUG_KICK_FILLING);
}
void
random_fini (void)
{
neug_fini ();
}
/*
* Return pointer to random 32-byte
*/

View File

@@ -1,4 +1,5 @@
void random_init (void);
void random_fini (void);
/* 32-byte random bytes */
const uint8_t *random_bytes_get (void);