Created libc under containers/posix which now all tasks use to build.

There is a problem in the new libc that test0 now misbehaves. Going to be fixed.
This commit is contained in:
Bahadir Balban
2009-08-27 12:00:04 +03:00
parent 87e2aeaf58
commit a41caeebd2
67 changed files with 2760 additions and 53 deletions

View File

@@ -19,6 +19,6 @@
Import('environment', 'previousImage')
program = environment['buildTask']('fs0', Glob('*.c') + [Glob(directory + '/*.c') for directory in [ 'src', 'src/lib', 'src/lib/elf', 'src/memfs']], environment, previousImage)
program = environment['buildTask']('fs0', Glob('*.c') + [Glob(directory + '/*.[cS]') for directory in [ 'src', 'src/lib', 'src/lib/elf', 'src/memfs']], environment, previousImage)
Return('program')

View File

@@ -3,6 +3,12 @@
#include <stddef.h>
#include <string.h>
#ifndef NULL
#define NULL 0
#endif
#ifndef size_t
#define size_t int
#endif
void *kmalloc(size_t size);
void kfree(void *blk);

View File

@@ -26,7 +26,7 @@ SECTIONS
{
. = virtual_base;
_start_text = .;
.text : AT (ADDR(.text) - offset) { crt0.o(.text) *(.text) }
.text : AT (ADDR(.text) - offset) { *(.text.head) *(.text) }
/* rodata is needed else your strings will link at physical! */
.rodata : AT (ADDR(.rodata) - offset) { *(.rodata) }
.rodata1 : AT (ADDR(.rodata1) - offset) { *(.rodata1) }

View File

@@ -6,7 +6,7 @@
#include <l4/lib/list.h>
#include <memfs/memfs.h>
#include <l4/macros.h>
#include <stdio.h>
#include <printf.h>
#include <task.h>
#include <path.h>

View File

@@ -122,7 +122,7 @@ void handle_fs_requests(void)
default:
printf("%s: Unrecognised ipc tag (%d) "
"received from tid: %d. Ignoring.\n", __TASKNAME__,
mr[MR_TAG], sender);
mr[MR_TAG], senderid);
}
/* Reply */

View File

@@ -0,0 +1,12 @@
.section .text.head
.global _start;
.type _start,function;
.align;
_start:
ldr sp, =__stack
bl __container_init
1:
b 1b

View File

@@ -8,7 +8,7 @@
#include <l4/lib/list.h>
#include <l4/macros.h>
#include INC_GLUE(memory.h)
#include <stdio.h>
#include <printf.h>
/*
* This reads contents of a file in pages, calling the fs-specific file read function to read-in

View File

@@ -6,7 +6,7 @@
#include <lib/bit.h>
#include <l4/macros.h>
#include <l4/config.h>
#include <stdio.h>
#include <printf.h>
#include INC_GLUE(memory.h)
/* Emulation of ARM's CLZ (count leading zeroes) instruction */

View File

@@ -8,7 +8,7 @@
#include <lib/malloc.h> // --> This is a local library that statically allocates its heap.
#include <l4/macros.h>
#include INC_GLUE(memory.h)
#include <stdio.h>
#include <printf.h>
#include <l4/api/errno.h>
struct id_pool *id_pool_new_init(int totalbits)

View File

@@ -18,7 +18,8 @@ Messages that indicate a software error will contain three asterisks (***).
*****************************************************************************/
#include <string.h> /* memcpy(), memset() */
#include <stdio.h> /* printf() */
#include <printf.h>
#include <malloc.h>
#define _32BIT 1
/* use small (32K) heap for 16-bit compilers,

View File

@@ -8,7 +8,7 @@
#include <l4/types.h>
#include INC_GLUE(memory.h)
#include <lib/vaddr.h>
#include <stdio.h>
#include <printf.h>
void vaddr_pool_init(struct id_pool *pool, unsigned long start, unsigned long end)
{

View File

@@ -192,7 +192,7 @@ struct superblock *memfs_get_superblock(void *block)
return 0;
}
if (sb->magic != MEMFS_MAGIC) {
printf("%s: Magic number not match: %s\n", __FUNCTION__, sb->magic);
printf("%s: Magic number not match: %u\n", __FUNCTION__, sb->magic);
return 0;
}