Skip to content

Commit

Permalink
Fix rs_write (Modern early serial write style)
Browse files Browse the repository at this point in the history
  • Loading branch information
YWHyuk committed Mar 1, 2020
1 parent 6d3ff1f commit 13dad76
Show file tree
Hide file tree
Showing 17 changed files with 28 additions and 13,465 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ AS =as
LD =ld
LDFLAGS =-m elf_i386 -s -x -M
CC =gcc
CFLAGS =-Wall -O -m32 -march=i386 -fomit-frame-pointer\
CFLAGS =-Wall -O0 -m32 -march=i386 -fomit-frame-pointer\
-fstack-protector-explicit -s -fno-pic -g
AFLAGS =--32 -march=i386
CPP =gcc -E -nostdinc -Iinclude
Expand Down
2 changes: 1 addition & 1 deletion fs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CC =gcc
LD =ld
LDFLAGS =-m elf_i386 -r
CFLAGS =-Wall -O -m32 -march=i386 -fomit-frame-pointer \
-nostdinc -I../include -fstack-protector-explicit -fno-pic
-nostdinc -I../include -fstack-protector-explicit -fno-pic -g
AFLAGS =--32 -march=i386
CPP =gcc -E -nostdinc -I../include

Expand Down
6 changes: 3 additions & 3 deletions init/main.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#define __LIBRARY__
#include <unistd.h>
#include <time.h>

/*
* we need this inline - forking from kernel space will result
* in NO COPY ON WRITE (!!!), until an execve is executed. This
Expand Down Expand Up @@ -40,7 +39,7 @@ extern void init(void);
extern void hd_init(void);
extern long kernel_mktime(struct tm * tm);
extern long startup_time;

extern int printk(const char* format, ...);
/*
* Yeah, yeah, it's ugly, but I cannot find how to do this correctly
* and this seems to work. I anybody has more info on the real-time
Expand Down Expand Up @@ -89,6 +88,7 @@ int main(void) /* This really IS void, no error here. */
buffer_init();
hd_init();
sti();
printk("Test");
move_to_user_mode();
if (!fork()) { /* we count on this going ok */
init();
Expand Down Expand Up @@ -120,7 +120,7 @@ static char * envp[] = { "HOME=/usr/root", NULL };
void init(void)
{
int i,j;

printf("I'm init");
setup();
if (!fork())
_exit(execve("/bin/update",NULL,NULL));
Expand Down
Loading

0 comments on commit 13dad76

Please sign in to comment.