From: ljsebald <ljs...@us...> - 2023-03-26 21:13:30
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 547d44653ef7cb5a5d3e7c6615284c3ea0e0a3aa (commit) via 3bd35d6d3ee3b886b60af8e24243a57d9c580973 (commit) via 035030b245c59f0ea374dcd0527a43aa42d1a3a4 (commit) via cbffea67a4ab28d7af3bd2ebac5f356c799efee9 (commit) via a22531bbee760d3e9ce4db56724cf34e05f7a8e5 (commit) from c84b74b52c9240cd02fe52d5f92d4d256d85ce69 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 547d44653ef7cb5a5d3e7c6615284c3ea0e0a3aa Merge: c84b74b 3bd35d6 Author: Lawrence Sebald <ljs...@us...> Date: Sun Mar 26 17:11:59 2023 -0400 Merge pull request #136 from cepawiel/random-gcc4 Disable opening/reading random device when using GCC4 Toolchain commit 3bd35d6d3ee3b886b60af8e24243a57d9c580973 Author: Colton Pawielski <cep...@us...> Date: Wed Mar 15 16:40:37 2023 -0500 Change warning text to clarify limitation with newlib Co-authored-by: Lawrence Sebald <ljs...@us...> commit 035030b245c59f0ea374dcd0527a43aa42d1a3a4 Author: Colton Pawielski <cep...@us...> Date: Wed Mar 15 16:39:54 2023 -0500 Change CFLAGS to KOS_CFLAGS in random example Co-authored-by: Lawrence Sebald <ljs...@us...> commit cbffea67a4ab28d7af3bd2ebac5f356c799efee9 Author: Colton Pawielski <cep...@mt...> Date: Tue Mar 14 21:55:27 2023 -0500 Disable dev filesystem when newlib < 2.4.0 commit a22531bbee760d3e9ce4db56724cf34e05f7a8e5 Author: Colton Pawielski <cep...@mt...> Date: Tue Mar 14 17:20:17 2023 -0500 Add C99 flag to Random Example ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/random/Makefile | 2 ++ kernel/arch/dreamcast/kernel/init.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/examples/dreamcast/random/Makefile b/examples/dreamcast/random/Makefile index 7ac05a3..d294e73 100644 --- a/examples/dreamcast/random/Makefile +++ b/examples/dreamcast/random/Makefile @@ -14,6 +14,8 @@ OBJS = random.o romdisk.o # from the named dir. KOS_ROMDISK_DIR = romdisk +KOS_CFLAGS += -std=c99 + # The rm-elf step is to remove the target before building, to force the # re-creation of the rom disk. all: rm-elf $(TARGET) diff --git a/kernel/arch/dreamcast/kernel/init.c b/kernel/arch/dreamcast/kernel/init.c index 02efd4b..88bd685 100644 --- a/kernel/arch/dreamcast/kernel/init.c +++ b/kernel/arch/dreamcast/kernel/init.c @@ -116,7 +116,14 @@ int __attribute__((weak)) arch_auto_init() { fs_pty_init(); /* Pty */ fs_ramdisk_init(); /* Ramdisk */ fs_romdisk_init(); /* Romdisk */ + +/* The arc4random_buf() function used for random & urandom is only + available in newlib starting with version 2.4.0 */ +#if defined(__NEWLIB__) && !(__NEWLIB__ < 2 && __NEWLIB_MINOR__ < 4) fs_dev_init(); /* /dev/urandom etc. */ +#else +#warning "/dev filesystem is not supported with Newlib < 2.4.0" +#endif hardware_periph_init(); /* DC peripheral init */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |