-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JIRA: RTOS-664
- Loading branch information
Showing
19 changed files
with
214 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ W /bin/bind devfs /dev | |
W /sbin/dummyfs -m /tmp -D | ||
X /bin/posixsrv | ||
T /dev/console | ||
W /bin/ldconfig | ||
X /linuxrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ export HOME=/root | |
W /bin/bind devfs /dev | ||
W /sbin/dummyfs -m /tmp -D | ||
X /bin/posixsrv | ||
W /bin/ldconfig | ||
X /bin/psh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ W /sbin/dummyfs -m /tmp -D | |
X /bin/posixsrv | ||
X /sbin/lwip rtl:0x18:11 | ||
T /dev/console | ||
W /bin/ldconfig | ||
X /bin/psh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ export HOME=/root | |
W /bin/bind devfs /dev | ||
W /sbin/dummyfs -m /tmp -D | ||
X /bin/posixsrv | ||
W /bin/ldconfig | ||
X /bin/psh |
6 changes: 6 additions & 0 deletions
6
_projects/sparcv8leon3-generic-qemu/rootfs-overlay/etc/rc.psh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
:{}: | ||
export PATH=/bin:/sbin:/usr/bin:/usr/sbin | ||
export HOME=/root | ||
W /bin/bind devfs /dev | ||
X /bin/posixsrv | ||
X /bin/psh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# Makefile for user application | ||
# | ||
# Copyright 2024 Phoenix Systems | ||
# | ||
ifeq ($(HAVE_SHLIB), y) | ||
|
||
NAME := libhello | ||
LOCAL_HEADERS := hello.h | ||
LOCAL_SRCS := hello.c | ||
|
||
include $(shared-lib.mk) | ||
|
||
|
||
NAME := dlopen | ||
LOCAL_SRCS := main.c | ||
|
||
include $(binary-dyn.mk) | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Phoenix-RTOS | ||
* | ||
* dlopen | ||
* | ||
* Example of user application using dlopen. | ||
* | ||
* Copyright 2024 Phoenix Systems | ||
* Author: Hubert Badocha | ||
* | ||
* This file is part of Phoenix-RTOS. | ||
* | ||
* %LICENSE% | ||
*/ | ||
|
||
#include "hello.h" | ||
|
||
#include <stdio.h> | ||
|
||
|
||
int hello(void) | ||
{ | ||
return printf("Hello shared world!\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Phoenix-RTOS | ||
* | ||
* dlopen | ||
* | ||
* Example of user application using dlopen. | ||
* | ||
* Copyright 2024 Phoenix Systems | ||
* Author: Hubert Badocha | ||
* | ||
* This file is part of Phoenix-RTOS. | ||
* | ||
* %LICENSE% | ||
*/ | ||
|
||
#ifndef _USER_DLOPEN_DYN_H_ | ||
#define _USER_DLOPEN_DYN_H_ | ||
|
||
int hello(void); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Phoenix-RTOS | ||
* | ||
* dlopen | ||
* | ||
* Example of user application using dlopen. | ||
* | ||
* Copyright 2024 Phoenix Systems | ||
* Author: Hubert Badocha | ||
* | ||
* This file is part of Phoenix-RTOS. | ||
* | ||
* %LICENSE% | ||
*/ | ||
|
||
#include <stddef.h> | ||
#include <stdio.h> | ||
#include <dlfcn.h> | ||
#include <sys/debug.h> | ||
|
||
int main(void) | ||
{ | ||
void *handle = dlopen("/usr/lib/libhello.so", RTLD_LAZY); | ||
if (handle == NULL) { | ||
printf("%s\n", dlerror()); | ||
return 1; | ||
} | ||
int (*hello)(void) = (int (*)(void))dlsym(handle, "hello"); | ||
if (hello == NULL) { | ||
printf("%s\n", dlerror()); | ||
(void)dlclose(handle); | ||
return 1; | ||
} | ||
|
||
hello(); | ||
|
||
(void)dlclose(handle); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# Makefile for user application | ||
# | ||
# Copyright 2024 Phoenix Systems | ||
# | ||
ifeq ($(HAVE_SHLIB), y) | ||
|
||
NAME := libdyn | ||
LOCAL_HEADERS := dyn.h | ||
LOCAL_SRCS := dyn.c | ||
|
||
include $(shared-lib.mk) | ||
|
||
|
||
NAME := sharedlib | ||
LOCAL_SRCS := main.c | ||
DEP_LIBS_SHARED := libdyn | ||
|
||
include $(binary-dyn.mk) | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Phoenix-RTOS | ||
* | ||
* sharedlib | ||
* | ||
* Example of user application using shared libraries. | ||
* | ||
* Copyright 2024 Phoenix Systems | ||
* Author: Hubert Badocha | ||
* | ||
* This file is part of Phoenix-RTOS. | ||
* | ||
* %LICENSE% | ||
*/ | ||
|
||
#include "dyn.h" | ||
|
||
|
||
extern void *_DYNAMIC; | ||
|
||
|
||
void *dyn(void) | ||
{ | ||
return &_DYNAMIC; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Phoenix-RTOS | ||
* | ||
* sharedlib | ||
* | ||
* Example of user application using shared libraries. | ||
* | ||
* Copyright 2024 Phoenix Systems | ||
* Author: Hubert Badocha | ||
* | ||
* This file is part of Phoenix-RTOS. | ||
* | ||
* %LICENSE% | ||
*/ | ||
|
||
|
||
#ifndef _USER_SHAREDLIB_DYN_H_ | ||
#define _USER_SHAREDLIB_DYN_H_ | ||
|
||
void *dyn(void); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Phoenix-RTOS | ||
* | ||
* sharedlib | ||
* | ||
* Example of user application using shared libraries. | ||
* | ||
* Copyright 2024 Phoenix Systems | ||
* Author: Hubert Badocha | ||
* | ||
* This file is part of Phoenix-RTOS. | ||
* | ||
* %LICENSE% | ||
*/ | ||
|
||
#include <stdio.h> | ||
|
||
#include "dyn.h" | ||
|
||
int main(void) | ||
{ | ||
printf("Dynamic section pointer %p\n", dyn()); | ||
|
||
return 0; | ||
} |
Submodule libphoenix
updated
27 files
+22 −11 | Makefile | |
+1 −1 | arch/arm/v7a/Makefile | |
+49 −0 | arch/arm/v7a/tls.S | |
+107 −85 | arch/ia32/jmp.S | |
+21 −6 | arch/ia32/signal.S | |
+1 −1 | arch/riscv64/Makefile | |
+8 −0 | arch/riscv64/jmp.S | |
+4 −0 | arch/riscv64/syscalls.S | |
+41 −0 | arch/riscv64/tls.S | |
+12 −1 | arch/sparcv8leon3/jmp.S | |
+1 −5 | arch/sparcv8leon3/syscalls.S | |
+5 −0 | crt0-common.c | |
+4 −1 | errno/errno.c | |
+1 −0 | include/arch/armv7a/arch.h | |
+1 −0 | include/arch/riscv64/arch.h | |
+51 −0 | include/dlfcn.h | |
+7 −0 | include/sys/threads.h | |
+14 −1 | misc/init.c | |
+8 −0 | rtld/Makefile | |
+70 −0 | rtld/stubs.c | |
+94 −0 | shared.mk | |
+1 −1 | stdlib/Makefile | |
+54 −21 | stdlib/atexit.c | |
+130 −0 | stdlib/cxa_thread_atexit.c | |
+2 −2 | stdlib/exit.c | |
+46 −0 | sys/threads.c | |
+1 −1 | time/time.c |
Submodule phoenix-rtos-build
updated
28 files
+10 −2 | Makefile.common | |
+3 −0 | build-core-armv7a7-imx6ull.sh | |
+3 −0 | build-core-armv7a9-zynq7000.sh | |
+3 −0 | build-core-ia32-generic.sh | |
+3 −0 | build-core-riscv64-generic.sh | |
+3 −0 | build-core-riscv64-noelv.sh | |
+3 −0 | build-core-sparcv8leon3-generic.sh | |
+3 −0 | build-core-sparcv8leon3-gr712rc.sh | |
+25 −0 | makes/binary-dyn.mk | |
+8 −0 | makes/binary.mk | |
+6 −0 | makes/check-env.mk | |
+153 −0 | makes/shared-lib.mk | |
+1 −1 | makes/static-lib.mk | |
+8 −0 | target/armv7a.mk | |
+5 −1 | target/armv7m.mk | |
+5 −1 | target/armv8m.mk | |
+5 −1 | target/armv8r.mk | |
+3 −0 | target/host.mk | |
+8 −0 | target/ia32.mk | |
+8 −0 | target/riscv64.mk | |
+13 −1 | target/sparcv8leon3.mk | |
+75 −24 | toolchain/build-toolchain.sh | |
+6 −5 | toolchain/gcc-9.5.0-10-fix-libc-spec.patch | |
+21 −0 | toolchain/gcc-9.5.0-12-fix-link-spec.patch | |
+58 −0 | toolchain/gcc-9.5.0-13-set-init-files.patch | |
+49 −0 | toolchain/gcc-9.5.0-14-compile-shared-libgcc.patch | |
+106 −0 | toolchain/gcc-9.5.0-15-compile-shared-libstdc++.patch | |
+37 −0 | toolchain/gcc-9.5.0-16-disable-thumb1-targets.patch |
Submodule phoenix-rtos-kernel
updated
15 files
+29 −0 | hal/armv7m/arch/elf.h | |
+4 −2 | hal/armv7m/imxrt/117x/imxrt117x.c | |
+30 −0 | hal/armv8m/arch/elf.h | |
+29 −0 | hal/armv8r/arch/elf.h | |
+32 −0 | hal/elf.h | |
+6 −9 | hal/ia32/_exceptions.S | |
+22 −0 | hal/sparcv8leon3/arch/elf.h | |
+41 −0 | include/auxv.h | |
+1 −1 | include/mman.h | |
+2 −2 | include/syscalls.h | |
+65 −56 | proc/elf.h | |
+434 −129 | proc/process.c | |
+2 −1 | proc/process.h | |
+2 −2 | proc/threads.c | |
+2 −2 | syscalls.c |
Submodule phoenix-rtos-tests
updated
69 files
Submodule phoenix-rtos-utils
updated
101 files