9
0
Fork 0

Progress toward kernel build

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3465 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2011-04-05 01:46:55 +00:00
parent 3272c8e87e
commit ef7b0b7469
11 changed files with 87 additions and 28 deletions

View File

@ -153,7 +153,7 @@ static const struct cmdmap_s g_cmdmap[] =
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0
# ifndef CONFIG_NSH_DISABLE_LS
# ifndef CONFIG_NSH_DISABLE_DD
{ "dd", cmd_dd, 3, 6, "if=<infile> of=<outfile> [bs=<sectsize>] [count=<sectors>] [skip=<sectors>]" },
# endif
#endif
@ -194,7 +194,7 @@ static const struct cmdmap_s g_cmdmap[] =
#endif
#ifndef CONFIG_DISABLE_SIGNALS
# ifndef CONFIG_NSH_DISABLE_SLEEP
# ifndef CONFIG_NSH_DISABLE_KILL
{ "kill", cmd_kill, 3, 3, "-<signal> <pid>" },
# endif
#endif

View File

@ -69,6 +69,7 @@ typedef int (*exec_t)(void);
* Private Data
****************************************************************************/
#ifndef CONFIG_NSH_DISABLE_PS
static const char *g_statenames[] =
{
"INVALID ",
@ -85,6 +86,7 @@ static const char *g_statenames[] =
"MQNFULL "
#endif
};
#endif
/****************************************************************************
* Public Data

View File

@ -74,7 +74,7 @@ $(TOPDIR)/nuttx_user.elf: nuttx_user.elf
$(TOPDIR)/User.map: nuttx_user.elf
@$(NM) nuttx_user.elf >$(TOPDIR)/User.map
@$(CROSSDEV)size $(TOPDIR)/User.map
@$(CROSSDEV)size nuttx_user.elf
$(BOARD_INCLUDE)/user_map.h: $(TOPDIR)/User.map
@echo "/* configs/$(CONFIG_ARCH_BOARD)/include/user_map.h" > $(BOARD_INCLUDE)/user_map.h
@ -85,10 +85,18 @@ $(BOARD_INCLUDE)/user_map.h: $(TOPDIR)/User.map
@echo "#ifndef __ARCH_BOARD_USER_MAP_H" >> $(BOARD_INCLUDE)/user_map.h
@echo "#define __ARCH_BOARD_USER_MAP_H" >> $(BOARD_INCLUDE)/user_map.h
@echo "" >> $(BOARD_INCLUDE)/user_map.h
@echo "#define CONFIG_USER_ENTRYPOINT `grep user_start $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h
@echo "#define CONFIG_USER_DATASOURCE `grep _eronly $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h
@echo "#define CONFIG_USER_DATADESTSTART `grep _sdata $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h
@echo "#define CONFIG_USER_DATADESTEND `grep _edata $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h
@echo "/* General memory map */" >> $(BOARD_INCLUDE)/user_map.h
@echo "" >> $(BOARD_INCLUDE)/user_map.h
@echo "#define CONFIG_USER_ENTRYPOINT 0x`grep \" user_start$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h
@echo "#define CONFIG_USER_DATASOURCE 0x`grep \" _eronly$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h
@echo "#define CONFIG_USER_DATADESTSTART 0x`grep \" _sdata$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h
@echo "#define CONFIG_USER_DATADESTEND 0x`grep \" _edata$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h
@echo "" >> $(BOARD_INCLUDE)/user_map.h
@echo "/* Memory manager entry points */" >> $(BOARD_INCLUDE)/user_map.h
@echo "" >> $(BOARD_INCLUDE)/user_map.h
@echo "#define CONFIG_USER_MALLOC 0x`grep \" malloc$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h
@echo "#define CONFIG_USER_REALLOC 0x`grep \" realloc$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h
@echo "#define CONFIG_USER_FREE 0x`grep \" free$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h
@echo "" >> $(BOARD_INCLUDE)/user_map.h
@echo "#endif /* __ARCH_BOARD_USER_MAP_H */" >> $(BOARD_INCLUDE)/user_map.h

View File

@ -62,9 +62,21 @@ MEMORY
sram2 (rwx) : ORIGIN = 0x20080000, LENGTH = 16K
}
# Force user_start into the link. This is the application entry point
EXTERN(user_start)
# Make sure that the critical memory management functions are in user-space.
# Currently, the plan is that the memory manager will reside in user-space
# but be usable both by kernel- and user-space code
EXTERN(malloc)
EXTERN(realloc)
EXTERN(free)
OUTPUT_ARCH(arm)
ENTRY(user_start)
EXTERN(user_start)
SECTIONS
{
.text : {

View File

@ -339,6 +339,16 @@ CONFIG_SCHED_WORKPERIOD=(50*1000)
CONFIG_SCHED_WORKSTACKSIZE=1024
CONFIG_SIG_SIGWORK=4
#
# These NSH commands are (temporarily) disable because more support is needed
# for these commands to work with CONFIG_NUTTX_KERNEL
#
CONFIG_NSH_DISABLE_MKRD=y
CONFIG_NSH_DISABLE_MKFATFS=y
CONFIG_NSH_DISABLE_LOSETUP=y
CONFIG_NSH_DISABLE_DD=y
CONFIG_NSH_DISABLE_PS=y
#
# The following can be used to disable categories of
# APIs supported by the OS. If the compiler supports

View File

@ -48,11 +48,16 @@ CSRCS += fs_open.c fs_close.c fs_read.c fs_write.c fs_ioctl.c \
fs_poll.c fs_select.c fs_lseek.c fs_dup.c fs_filedup.c \
fs_dup2.c fs_fcntl.c fs_filedup2.c fs_mmap.c fs_opendir.c \
fs_closedir.c fs_stat.c fs_readdir.c fs_seekdir.c fs_rewinddir.c \
fs_files.c fs_inode.c fs_fdopen.c fs_inodefind.c fs_inodereserve.c \
fs_files.c fs_inode.c fs_inodefind.c fs_inodereserve.c \
fs_statfs.c fs_inoderemove.c fs_registerdriver.c fs_unregisterdriver.c \
fs_inodeaddref.c fs_inoderelease.c
CSRCS += fs_registerblockdriver.c fs_unregisterblockdriver.c \
fs_findblockdriver.c fs_openblockdriver.c fs_closeblockdriver.c
ifneq ($(CONFIG_NFILE_STREAMS),0)
CSRCS += fs_fdopen.c
endif
ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
CSRCS += fs_mount.c fs_umount.c fs_fsync.c fs_unlink.c fs_rename.c \
fs_mkdir.c fs_rmdir.c

View File

@ -193,18 +193,28 @@
# define SYS_stat (__SYS_filedesc+13)
# define SYS_statfs (__SYS_filedesc+14)
# define SYS_telldir (__SYS_filedesc+15)
# if !defined(CONFIG_DISABLE_MOUNTPOINT)
# define SYS_fsync (__SYS_filedesc+16)
# define SYS_mkdir (__SYS_filedesc+17)
# define SYS_mount (__SYS_filedesc+18)
# define SYS_rename (__SYS_filedesc+19)
# define SYS_rmdir (__SYS_filedesc+20)
# define SYS_umount (__SYS_filedesc+21)
# define SYS_unlink (__SYS_filedesc+22)
# define __SYS_pthread (__SYS_filedesc+23)
# if CONFIG_NFILE_STREAMS > 0
# define SYS_fs_fdopen (__SYS_filedesc+16)
# define SYS_sched_getstreams (__SYS_filedesc+17)
# define __SYS_mountpoint (__SYS_filedesc+18)
# else
# define __SYS_pthread (__SYS_filedesc+16)
# define __SYS_mountpoint (__SYS_filedesc+16)
# endif
# if !defined(CONFIG_DISABLE_MOUNTPOINT)
# define SYS_fsync (__SYS_mountpoint+0)
# define SYS_mkdir (__SYS_mountpoint+1)
# define SYS_mount (__SYS_mountpoint+2)
# define SYS_rename (__SYS_mountpoint+3)
# define SYS_rmdir (__SYS_mountpoint+4)
# define SYS_umount (__SYS_mountpoint+5)
# define SYS_unlink (__SYS_mountpoint+6)
# define __SYS_pthread (__SYS_mountpoint+7)
# else
# define __SYS_pthread __SYS_mountpoint
# endif
#else
# define __SYS_pthread __SYS_filedesc
#endif
@ -241,6 +251,7 @@
# define SYS_pthread_setspecific (__SYS_pthread+26)
# define SYS_pthread_testcancel (__SYS_pthread+27)
# define SYS_pthread_yield (__SYS_pthread+28)
# ifndef CONFIG_DISABLE_SIGNAL
# define SYS_pthread_cond_timedwait (__SYS_pthread+29)
# define SYS_pthread_kill (__SYS_pthread+30)
@ -249,6 +260,7 @@
# else
# define __SYS_mqueue (__SYS_pthread+29)
# endif
#else
# define __SYS_mqueue __SYS_pthread
#endif

View File

@ -92,7 +92,6 @@ $(MKSYSCALL):
@$(MAKE) -C $(TOPDIR)/tools -f Makefile.host mksyscall
.context: syscall.csv
echo "Rebuilding stubs and proxies"
@(cd proxies; $(MKSYSCALL) -p $(CSVFILE);)
@(cd stubs; $(MKSYSCALL) -s $(CSVFILE);)
@touch $@

View File

@ -76,10 +76,10 @@ extern uintptr_t STUB_sem_post(uintptr_t parm1);
extern uintptr_t STUB_sem_trywait(uintptr_t parm1);
extern uintptr_t STUB_sem_unlink(uintptr_t parm1);
extern uintptr_t STUB_sem_wait(uintptr_t parm1);
extern uintptr_t (uintptr_t parm1);
extern uintptr_t (uintptr_t parm1, uintptr_t parm2, uintptr_t parm3, uintptr_t parm4, uintptr_t parm5);
extern uintptr_t (uintptr_t parm1);
extern uintptr_t (uintptr_t parm1);
extern uintptr_t STUB_set_errno(uintptr_t parm1);
extern uintptr_t STUB_task_create(uintptr_t parm1, uintptr_t parm2, uintptr_t parm3, uintptr_t parm4, uintptr_t parm5);
extern uintptr_t STUB_task_delete(uintptr_t parm1);
extern uintptr_t STUB_task_restart(uintptr_t parm1);
extern uintptr_t STUB_up_assert(uintptr_t parm1, uintptr_t parm2);
extern uintptr_t STUB_up_assert_code(uintptr_t parm1, uintptr_t parm2, uintptr_t parm3);
@ -150,6 +150,9 @@ extern uintptr_t STUB_stat(uintptr_t parm1, uintptr_t parm2);
extern uintptr_t STUB_statfs(uintptr_t parm1, uintptr_t parm2);
extern uintptr_t STUB_telldir(uintptr_t parm1);
extern uintptr_t STUB_fs_fdopen(uintptr_t parm1, uintptr_t parm2, uintptr_t parm3);
extern uintptr_t STUB_sched_getstreams(void);
extern uintptr_t STUB_fsync(uintptr_t parm1);
extern uintptr_t STUB_mkdir(uintptr_t parm1, uintptr_t parm2);
extern uintptr_t STUB_mount(uintptr_t parm1, uintptr_t parm2, uintptr_t parm3, uintptr_t parm4, uintptr_t parm5);
@ -239,18 +242,18 @@ extern uintptr_t STUB_socket(uintptr_t parm1, uintptr_t parm2, uintptr_t parm3);
const union syscall_stubfunc_u *g_stublookup[SYS_nsyscalls] =
{
# undef STUB_LOOKUP1
# define STUB_LOOKUP1(n,p) p
# define STUB_LOOKUP1(n,p) (union syscall_stubfunc_u *)p
# undef STUB_LOOKUP
# define STUB_LOOKUP(n,p) , p
# define STUB_LOOKUP(n,p) , (union syscall_stubfunc_u *)p
# include "stub_lookup.h"
};
const uint8_t g_stubnparms[SYS_nsyscalls] =
{
# undef STUB_LOOKUP1
# define STUB_LOOKUP1(n,p) { n }
# define STUB_LOOKUP1(n,p) n
# undef STUB_LOOKUP
# define STUB_LOOKUP(n,p) , { n }
# define STUB_LOOKUP(n,p) , n
# include "stub_lookup.h"
};

View File

@ -150,6 +150,12 @@ STUB_LOOKUP(3, STUB_up_assert_code) /* SYS_up_assert_code */
STUB_LOOKUP(2, STUB_stat) /* SYS_stat */
STUB_LOOKUP(2, STUB_statfs) /* SYS_statfs */
STUB_LOOKUP(1, STUB_telldir) /* SYS_telldir */
# if CONFIG_NFILE_STREAMS > 0
STUB_LOOKUP(3, STUB_fs_fdopen) /* SYS_fs_fdopen */
STUB_LOOKUP(0, STUB_sched_getstreams) /* SYS_sched_getstreams */
#endif
# if !defined(CONFIG_DISABLE_MOUNTPOINT)
STUB_LOOKUP(1, STUB_fsync) /* SYS_fsync */
STUB_LOOKUP(2, STUB_mkdir) /* SYS_mkdir */

View File

@ -13,6 +13,7 @@
"dup2","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0","int","int","int"
"exit","stdlib.h","","void","int"
"fcntl","fcntl.h","CONFIG_NFILE_DESCRIPTORS > 0","int","int","int","..."
"fs_fdopen","nuttx/fs.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR struct file_struct*","int","int","FAR _TCB*"
"fsync","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT)","int","int"
"get_errno","errno.h","","int"
"getenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","FAR char*","FAR const char*"
@ -81,6 +82,7 @@
"rmdir","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char*"
"sched_getparam","sched.h","","int","pid_t","struct sched_param*"
"sched_getscheduler","sched.h","","int","pid_t"
"sched_getstreams","nuttx/sched.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR struct streamlist*"
"sched_lock","sched.h","","int"
"sched_lockcount","sched.h","","int32_t"
"sched_rr_get_interval","sched.h","","int","pid_t","struct timespec*"

Can't render this file because it has a wrong number of fields in line 2.