Changeset 444 for trunk/user/init


Ignore:
Timestamp:
May 16, 2018, 8:31:35 PM (6 years ago)
Author:
satin@…
Message:

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

Location:
trunk/user/init
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/user/init/Makefile

    r440 r444  
    1111OBJS = build/init.o
    1212
    13 INCLUDES = -I.                     \
    14            -I../..                 \
    15            -I$(LIBC_INCLUDE)/      \
    16            -I$(LIBPTHREAD_INCLUDE)
     13INCLUDES = -I.                   \
     14           -I../..               \
     15           -I$(LIBC_INCLUDE)/    \
     16           -I$(LIBPTHREAD_INCLUDE) \
     17           -I$(LIBALMOSMKH_INCLUDE) \
     18           -I$(SHARED_INCLUDE)
    1719
    1820compile : dirs build/init.elf
    1921build/init.elf : $(OBJS) init.ld
    20         $(LD) -o $@ -T init.ld $(OBJS) -nostdlib -L$(LIBC) -L$(LIBPTHREAD) -lc -lpthread
     22        $(LD) -o $@ -T init.ld $(OBJS) -nostdlib -L$(LIBC) -L$(LIBPTHREAD) -L$(LIBALMOSMKH) -lc -lpthread -lalmos-mkh -lpthread -lc
    2123        $(DU) -D $@ > $@.txt
    2224
  • trunk/user/init/init.c

    r442 r444  
    1313
    1414#include <hard_config.h>
    15 
     15#include <unistd.h>
    1616#include <stdlib.h>
    1717#include <stdio.h>
    1818#include <pthread.h>
     19#include <almos-mkh.h>
     20#include <assert.h>
     21#include <sys/wait.h>
    1922
    2023#define DEBUG_PROCESS_INIT    0
     
    5457        {
    5558            // CHILD[i] process exec process KSH[i]
    56             ret_exec = exec( "/bin/user/ksh.elf" , NULL , NULL );
     59            ret_exec = execve( "/bin/user/ksh.elf" , NULL , NULL );
    5760
    5861            if ( ret_exec )   // error in exec             
     
    139142            {
    140143                // CHILD process exec process KSH
    141                 ret_exec = exec( "/bin/user/ksh.elf" , NULL , NULL );
     144                ret_exec = execve( "/bin/user/ksh.elf" , NULL , NULL );
    142145
    143146                if ( ret_exec )   // error in exec             
Note: See TracChangeset for help on using the changeset viewer.