kernel:export board to userland.
Export the board variable to userland using sysenv. This allows rc-scrips to perform device specific initialisation. The board variable follows the following pattern [ARCH]-[ARCHVARIANT]-[VENDOR]-[BOARD]-[BOARDVARIANT] We currently we support the following boards: X86-I586-GENERIC-GENERIC-GENERIC ARM-ARMV7-TI-BBXM-GENERIC ARM-ARMV7-TI-BB-WHITE ARM-ARMV7-TI-BB-BLACK Change-Id: I9e5f5f24f9a71cc9797cacb1aafb19499613f0be
This commit is contained in:
parent
43581a14ee
commit
7194772eae
2 changed files with 17 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <minix/minlib.h>
|
||||
#include <minix/const.h>
|
||||
#include <minix/type.h>
|
||||
#include <minix/board.h>
|
||||
#include <minix/com.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -195,6 +196,21 @@ void get_parameters(u32_t ebx, kinfo_t *cbi)
|
|||
|
||||
/* let higher levels know what we are booting on */
|
||||
mb_set_param(cbi->param_buf, ARCHVARNAME, "earm", cbi);
|
||||
#ifdef AM335X
|
||||
int id = get_board_id_by_short_name("A335BONE");
|
||||
printf("BOARD ID=0x%08x\n",id);
|
||||
const char * boardname = get_board_name(id);
|
||||
printf("BOARD NAME=%s\n",boardname);
|
||||
mb_set_param(cbi->param_buf, BOARDVARNAME,(char *) boardname, cbi);
|
||||
#endif
|
||||
#ifdef DM337x
|
||||
int id = get_board_id_by_short_name("BBXM");
|
||||
printf("BOARD ID=0x%08x\n",id);
|
||||
const char * boardname = get_board_name(id);
|
||||
printf("BOARD NAME=%s\n",boardname);
|
||||
mb_set_param(cbi->param_buf, BOARDVARNAME,(char *) boardname, cbi);
|
||||
#endif
|
||||
|
||||
|
||||
/* round user stack down to leave a gap to catch kernel
|
||||
* stack overflow; and to distinguish kernel and user addresses
|
||||
|
|
|
@ -154,6 +154,7 @@ void get_parameters(u32_t ebx, kinfo_t *cbi)
|
|||
|
||||
/* let higher levels know what we are booting on */
|
||||
mb_set_param(cbi->param_buf, ARCHVARNAME, "i386", cbi);
|
||||
mb_set_param(cbi->param_buf, BOARDVARNAME, "i586", cbi);
|
||||
|
||||
/* round user stack down to leave a gap to catch kernel
|
||||
* stack overflow; and to distinguish kernel and user addresses
|
||||
|
|
Loading…
Reference in a new issue