Progress toward kernel build

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3465 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-04-05 01:46:55 +00:00
parent 4a210dae69
commit 33ace467b7
3 changed files with 36 additions and 6 deletions

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