Need to call elf_initialize() on bring-up before attempting to load ELF modules
This commit is contained in:
parent
90c411653f
commit
f74e69083c
@ -50,6 +50,8 @@
|
||||
# include <apps/usbmonitor.h>
|
||||
#endif
|
||||
|
||||
#include <nuttx/binfmt/elf.h>
|
||||
|
||||
#include "sama5d4-ek.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -58,10 +60,14 @@
|
||||
|
||||
/* Debug ********************************************************************/
|
||||
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# define message(...) syslog(__VA_ARGS__)
|
||||
#ifdef CONFIG_BOARD_INITIALIZE
|
||||
# define message lldbg
|
||||
#else
|
||||
# define message syslog
|
||||
# ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# define message(...) syslog(__VA_ARGS__)
|
||||
# else
|
||||
# define message syslog
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -78,9 +84,9 @@
|
||||
|
||||
int sam_bringup(void)
|
||||
{
|
||||
#if defined(HAVE_NAND) || defined(HAVE_AT25) || defined(HAVE_HSMCI) || \
|
||||
#if defined(HAVE_NAND) || defined(HAVE_AT25) || defined(HAVE_HSMCI) || \
|
||||
defined(HAVE_USBHOST) || defined(HAVE_USBMONITOR) || defined(HAVE_WM8904) || \
|
||||
defined(HAVE_AUTOMOUNTER)
|
||||
defined(HAVE_AUTOMOUNTER) || defined(HAVE_ELF)
|
||||
int ret;
|
||||
#endif
|
||||
|
||||
@ -212,6 +218,17 @@ int sam_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ELF
|
||||
/* Initialize the ELF binary loader */
|
||||
|
||||
message("Initializing the ELF binary loader\n");
|
||||
ret = elf_initialize();
|
||||
if (ret < 0)
|
||||
{
|
||||
message("ERROR: Initialization of the ELF loader failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If we got here then perhaps not all initialization was successful, but
|
||||
* at least enough succeeded to bring-up NSH with perhaps reduced
|
||||
* capabilities.
|
||||
|
@ -68,6 +68,7 @@
|
||||
#define HAVE_WM8904 1
|
||||
#define HAVE_AUDIO_NULL 1
|
||||
#define HAVE_PMIC 1
|
||||
#define HAVE_ELF 1
|
||||
|
||||
/* HSMCI */
|
||||
/* Can't support MMC/SD if the card interface(s) are not enable */
|
||||
@ -455,6 +456,12 @@
|
||||
# undef HAVE_PMIC /* REVISIT: Disable anyway because it does not yet work */
|
||||
#endif
|
||||
|
||||
/* ELF */
|
||||
|
||||
#if defined(CONFIG_BINFMT_DISABLE) || !defined(CONFIG_ELF)
|
||||
# undef HAVE_ELF
|
||||
#endif
|
||||
|
||||
/* LEDs *****************************************************************************/
|
||||
/* There are 3 LEDs on the SAMA5D4-EK:
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user