+11
@@ -0,0 +1,11 @@
|
||||
2019.05.05:
|
||||
Finally, the problem with creating new files (with vim, echo and so on) is solved.
|
||||
Added one line of code to bitmap.c
|
||||
|
||||
2019.04.23:
|
||||
The code is changed to remove all warnings when compiling it.
|
||||
I changed key_map from Finland to English keyboard.
|
||||
|
||||
2019.04.18:
|
||||
Repo forked from mariuz/linux-0.01.
|
||||
Did first pull request.
|
||||
@@ -0,0 +1 @@
|
||||
gem 'jekyll-seo-tag'
|
||||
BIN
Arquivo binário não exibido.
+9
-2
@@ -13,7 +13,7 @@ LD =ld -m elf_i386
|
||||
LDFLAGS =-M -Ttext 0 -e startup_32
|
||||
#LDFLAGS =-s -x -M -Ttext 0 -e startup_32
|
||||
CC =gcc
|
||||
CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer -fno-stack-protector -fno-builtin -g -m32
|
||||
CFLAGS =-Wall -O -std=gnu89 -fstrength-reduce -fomit-frame-pointer -fno-stack-protector -fno-builtin -g -m32
|
||||
CPP =gcc -E -nostdinc -Iinclude
|
||||
|
||||
ARCHIVES=kernel/kernel.o mm/mm.o fs/fs.o
|
||||
@@ -48,7 +48,7 @@ tools/system: boot/head.o init/main.o \
|
||||
$(ARCHIVES) \
|
||||
$(LIBS) \
|
||||
-o tools/system > System.map
|
||||
|
||||
|
||||
kernel/kernel.o:
|
||||
(cd kernel; make)
|
||||
|
||||
@@ -68,6 +68,12 @@ boot/boot: boot/boot.s tools/system
|
||||
$(AS86) -o boot/boot.o tmp.s
|
||||
rm -f tmp.s
|
||||
$(LD86) -s -o boot/boot boot/boot.o
|
||||
|
||||
run:
|
||||
qemu-system-i386 -drive format=raw,file=Image,index=0,if=floppy -boot a -hdb hd_oldlinux.img -m 8 -machine pc-0.10
|
||||
|
||||
dump:
|
||||
objdump -D --disassembler-options=intel tools/system > System.dum
|
||||
|
||||
clean:
|
||||
rm -f Image System.map tmp_make boot/boot core
|
||||
@@ -96,3 +102,4 @@ init/main.o : init/main.c include/unistd.h include/sys/stat.h \
|
||||
include/linux/sched.h include/linux/head.h include/linux/fs.h \
|
||||
include/linux/mm.h include/asm/system.h include/asm/io.h include/stddef.h \
|
||||
include/stdarg.h include/fcntl.h
|
||||
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
linux-0.01 On Ubuntu 18.04 with GCC-7.3
|
||||
|
||||
First of all, thanks Mariuz!
|
||||
|
||||
After a lot of time, I managed to compile this revised version of the first kernel on machines with Ubuntu 18.04 64 and 32 bit versions. So you can compile them and try them on 64 and 32 bit Intel machines.
|
||||
|
||||
The kernel runs in both emulators: QEMU ver. 2.11.1 and Bochs ver 2.6. and that was a great success for me ...
|
||||
|
||||
I also uploaded the bochsrc.txt file so that the bochs runs from the command line from the root where the kernel(Image) is
|
||||
and qemu runs from the cmd line by the command: make run, but first unzip the file hd_oldlinux.img.zip.
|
||||
|
||||
Enjoy work and improvement.
|
||||
sincerely
|
||||
Isoux
|
||||
@@ -0,0 +1,2 @@
|
||||
plugins:
|
||||
- jekyll-seo-tag
|
||||
@@ -0,0 +1,46 @@
|
||||
# configuration file generated by Bochs
|
||||
plugin_ctrl: unmapped=1, biosdev=1, speaker=1, extfpuirq=1, parallel=1, serial=1, gameport=1, iodebug=1
|
||||
config_interface: textconfig
|
||||
display_library: x, options="gui_debug"
|
||||
memory: host=32, guest=32
|
||||
romimage: file="/usr/share/bochs/BIOS-bochs-latest"
|
||||
vgaromimage: file="/usr/share/bochs/VGABIOS-lgpl-latest"
|
||||
boot: floppy
|
||||
floppy_bootsig_check: disabled=0
|
||||
floppya: type=1_44, 1_44="Image", status=inserted, write_protected=0
|
||||
# no floppyb
|
||||
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
|
||||
ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
|
||||
ata2: enabled=0
|
||||
ata3: enabled=0
|
||||
ata0-slave: type=disk, path="hd_oldlinux.img", mode=flat, cylinders=1024, heads=4, spt=20, translation=none
|
||||
pci: enabled=1, chipset=i440fx
|
||||
vga: extension=vbe, update_freq=5
|
||||
cpu: count=1, ips=4000000, model=bx_generic, reset_on_triple_fault=1, cpuid_limit_winnt=0, ignore_bad_msrs=1, mwait_is_nop=0
|
||||
cpuid: family=6, model=0x03, stepping=3, mmx=1, apic=xapic, sse=sse2, sse4a=0, sep=1, aes=0, xsave=0, xsaveopt=0, movbe=0, adx=0, smep=0, avx=0, avx_f16c=0, avx_fma=0, bmi=0, xop=0, tbm=0, fma4=0, vmx=1, x86_64=1, 1g_pages=0, pcid=0, fsgsbase=0, mwait=1
|
||||
cpuid: vendor_string="GenuineIntel"
|
||||
cpuid: brand_string=" Intel(R) Pentium(R) 4 CPU "
|
||||
|
||||
print_timestamps: enabled=0
|
||||
debugger_log: -
|
||||
magic_break: enabled=0
|
||||
port_e9_hack: enabled=0
|
||||
private_colormap: enabled=0
|
||||
clock: sync=none, time0=local, rtc_sync=0
|
||||
# no cmosimage
|
||||
# no loader
|
||||
log: -
|
||||
logprefix: %t%e%d
|
||||
panic: action=ask
|
||||
error: action=report
|
||||
info: action=report
|
||||
debug: action=ignore
|
||||
keyboard: type=mf, serial_delay=250, paste_delay=100000, keymap=
|
||||
user_shortcut: keys=none
|
||||
mouse: enabled=0, type=ps2, toggle=ctrl+mbutton
|
||||
parport1: enabled=1, file=""
|
||||
parport2: enabled=0
|
||||
com1: enabled=1, mode=null, dev=""
|
||||
com2: enabled=0
|
||||
com3: enabled=0
|
||||
com4: enabled=0
|
||||
+1
-1
@@ -2,7 +2,7 @@ AR =ar
|
||||
AS =as --32
|
||||
CC =gcc
|
||||
LD =ld -m elf_i386
|
||||
CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer -m32 \
|
||||
CFLAGS =-Wall -O -std=gnu89 -fstrength-reduce -fomit-frame-pointer -m32 \
|
||||
-fno-stack-protector -nostdinc -fno-builtin -g -I../include
|
||||
CPP =gcc -E -nostdinc -I../include
|
||||
|
||||
|
||||
+3
-2
@@ -79,8 +79,9 @@ int new_block(int dev)
|
||||
break;
|
||||
if (i>=8 || !bh || j>=8192)
|
||||
return 0;
|
||||
if (set_bit(j,bh->b_data))
|
||||
panic("new_block: bit already set");
|
||||
sb->s_rd_only = 0;
|
||||
if (set_bit(j,bh->b_data)){
|
||||
panic("new_block: bit already set");}
|
||||
bh->b_dirt = 1;
|
||||
j += i*8192 + sb->s_firstdatazone-1;
|
||||
if (j >= sb->s_nzones)
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ static int permission(struct m_inode * inode,int mask)
|
||||
*
|
||||
* NOTE! unlike strncmp, match returns 1 for success, 0 for failure.
|
||||
*/
|
||||
static int match(int len,const char * name,struct dir_entry * de)
|
||||
__attribute__((noinline)) int match(int len,const char * name,struct dir_entry * de)
|
||||
{
|
||||
register int same __asm__("ax");
|
||||
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ static int minix_getdents64(struct m_inode * inode, struct file * filp,
|
||||
else
|
||||
break;
|
||||
if (i) {
|
||||
put_fs_long(de->inode,&dirent->d_ino);
|
||||
put_fs_long64(de->inode,&dirent->d_ino);
|
||||
put_fs_byte(0,i+dirent->d_name);
|
||||
put_fs_word(i,&dirent->d_reclen);
|
||||
brelse(bh);
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
google-site-verification: google7fde9e4016bc449e.html
|
||||
@@ -27,7 +27,7 @@ extern inline void put_fs_byte(char val,char *addr)
|
||||
__asm__ ("movb %0,%%fs:%1"::"q" (val),"m" (*addr));
|
||||
}
|
||||
|
||||
extern inline void put_fs_word(short val,short * addr)
|
||||
extern inline void put_fs_word(short val, unsigned short * addr)
|
||||
{
|
||||
__asm__ ("movw %0,%%fs:%1"::"r" (val),"m" (*addr));
|
||||
}
|
||||
@@ -36,3 +36,8 @@ extern inline void put_fs_long(unsigned long val,unsigned long * addr)
|
||||
{
|
||||
__asm__ ("movl %0,%%fs:%1"::"r" (val),"m" (*addr));
|
||||
}
|
||||
|
||||
extern inline void put_fs_long64(unsigned long val,unsigned long long * addr)
|
||||
{
|
||||
__asm__ ("movl %0,%%fs:%1"::"r" (val),"m" (*addr));
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
#define NAME_MAX NAME_LEN
|
||||
|
||||
struct dirent{
|
||||
long d_ino;
|
||||
unsigned long d_ino; //long d_ino;
|
||||
off_t d_off;
|
||||
unsigned short d_reclen;
|
||||
char d_name[256];
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Welcome to the isoux/linux-0.01</h1>
|
||||
<h2>Linux-0.01 On Ubuntu 18.04 with GCC-7.3, NASM assembler & LLVM Clang </h2>
|
||||
<h3>
|
||||
<p>This revised version of the first Linux kernel is now available on machines with Ubuntu 18.04 64 and 32 bit versions</p>
|
||||
<p>for compiling it and running it in both default emulators on Ubuntu: QEMU ver. 2.11.1 and Bochs ver 2.6.</p>
|
||||
<p> </p>
|
||||
<p>Enjoy work and improvement:</p>
|
||||
<a href=https://github.com/isoux/linux-0.01>github.com/isoux/linux-0.01</a>
|
||||
</h3>
|
||||
</body>
|
||||
<head> {% raw %}{% seo %}{% endraw %} </head>
|
||||
</html>
|
||||
+1
-1
@@ -11,7 +11,7 @@ AS =as --32
|
||||
LD =ld -m elf_i386
|
||||
LDFLAGS =-g #-s -x
|
||||
CC =gcc
|
||||
CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer -m32 \
|
||||
CFLAGS =-Wall -O -std=gnu89 -fstrength-reduce -fomit-frame-pointer -m32 \
|
||||
-finline-functions -fno-stack-protector -nostdinc -fno-builtin -g -I../include
|
||||
CPP =gcc -E -nostdinc -I../include
|
||||
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ static unsigned long lines=LINES,columns=COLUMNS;
|
||||
static unsigned long state=0;
|
||||
static unsigned long npar,par[NPAR];
|
||||
static unsigned long ques=0;
|
||||
static unsigned char attr=0x07;
|
||||
unsigned char attr=0x07;
|
||||
|
||||
/*
|
||||
* this is what the terminal answers to a ESC-Z or csi0c
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
|
||||
extern void write_verify(unsigned long address);
|
||||
|
||||
/* It is necessary that there is no warning. */
|
||||
extern void memcpy(struct task_struct *, struct task_struct *, long int);
|
||||
|
||||
long last_pid=0;
|
||||
|
||||
void verify_area(void * addr,int size)
|
||||
|
||||
+2
-1
@@ -261,10 +261,11 @@ static void read_intr(void)
|
||||
if (this_request->nsector==2){
|
||||
this_request->nsector--;
|
||||
port_read(HD_DATA,this_request->bh->b_data,256);
|
||||
return;
|
||||
}
|
||||
else{
|
||||
port_read(HD_DATA,this_request->bh->b_data+512,256);
|
||||
return;
|
||||
//return;
|
||||
}
|
||||
|
||||
this_request->errors = 0;
|
||||
|
||||
+11
-11
@@ -221,13 +221,13 @@ func_table:
|
||||
|
||||
key_map:
|
||||
.byte 0,27
|
||||
.ascii "1234567890+'"
|
||||
.ascii "1234567890-=" /* .ascii "1234567890+'" */
|
||||
.byte 127,9
|
||||
.ascii "qwertyuiop}"
|
||||
.byte 0,10,0
|
||||
.ascii "asdfghjkl|{"
|
||||
.byte 0,0
|
||||
.ascii "'zxcvbnm,.-"
|
||||
.ascii "qwertyuiop[]" /* .ascii "qwertyuiop}" */
|
||||
.byte 10,0 /* .byte 0,10,0 */
|
||||
.ascii "asdfghjkl;'`" /* .ascii "asdfghjkl|{" */
|
||||
.byte 0 /* .byte 0,0 */
|
||||
.ascii "\\zxcvbnm,./"
|
||||
.byte 0,'*,0,32 /* 36-39 */
|
||||
.fill 16,1,0 /* 3A-49 */
|
||||
.byte '-,0,0,0,'+ /* 4A-4E */
|
||||
@@ -237,13 +237,13 @@ key_map:
|
||||
|
||||
shift_map:
|
||||
.byte 0,27
|
||||
.ascii "!\"#$%&/()=?`"
|
||||
.ascii "!@#$%^&*()_+" /* .ascii "!\"#$%&/()=?`" */
|
||||
.byte 127,9
|
||||
.ascii "QWERTYUIOP]^"
|
||||
.ascii "QWERTYUIOP{}" /* .ascii "QWERTYUIOP]^" */
|
||||
.byte 10,0
|
||||
.ascii "ASDFGHJKL\\["
|
||||
.byte 0,0
|
||||
.ascii "*ZXCVBNM;:_"
|
||||
.ascii "ASDFGHJKL:\"~" /* .ascii "ASDFGHJKL\\[" */
|
||||
.byte 0 /* .byte 0,0 * */
|
||||
.ascii "|ZXCVBNM<>?_" /* .ascii "*ZXCVBNM;:_" */
|
||||
.byte 0,'*,0,32 /* 36-39 */
|
||||
.fill 16,1,0 /* 3A-49 */
|
||||
.byte '-,0,0,0,'+ /* 4A-4E */
|
||||
|
||||
+3
-3
@@ -98,7 +98,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
|
||||
int field_width; /* width of output field */
|
||||
int precision; /* min. # of digits for integers; max
|
||||
number of chars for from string */
|
||||
int qualifier; /* 'h', 'l', or 'L' for integer fields */
|
||||
//int qualifier; /* 'h', 'l', or 'L' for integer fields */
|
||||
|
||||
for (str=buf ; *fmt ; ++fmt) {
|
||||
if (*fmt != '%') {
|
||||
@@ -146,9 +146,9 @@ int vsprintf(char *buf, const char *fmt, va_list args)
|
||||
}
|
||||
|
||||
/* get the conversion qualifier */
|
||||
qualifier = -1;
|
||||
//qualifier = -1;
|
||||
if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L') {
|
||||
qualifier = *fmt;
|
||||
//qualifier = *fmt;
|
||||
++fmt;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ AS =as --32
|
||||
LD =ld -m elf_i386
|
||||
LDFLAGS =-g #-s -x
|
||||
CC =gcc
|
||||
CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer -m32\
|
||||
CFLAGS =-Wall -O -std=gnu89 -fstrength-reduce -fomit-frame-pointer -m32 \
|
||||
-finline-functions -fno-stack-protector -nostdinc -fno-builtin -g -I../include
|
||||
CPP =gcc -E -nostdinc -I../include
|
||||
|
||||
|
||||
@@ -1,271 +0,0 @@
|
||||
diff -rc linux-0.01-rm-3.5.orig/fs/Makefile linux-0.01-rm-3.5/fs/Makefile
|
||||
*** linux-0.01-rm-3.5.orig/fs/Makefile 2008-01-14 05:58:48.000000000 +0900
|
||||
--- linux-0.01-rm-3.5/fs/Makefile 2011-01-12 15:19:16.412242974 +0900
|
||||
***************
|
||||
*** 3,9 ****
|
||||
CC =gcc
|
||||
LD =ld
|
||||
CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \
|
||||
! -fno-stack-protector -nostdinc -I../include
|
||||
CPP =gcc -E -nostdinc -I../include
|
||||
|
||||
.c.s:
|
||||
--- 3,9 ----
|
||||
CC =gcc
|
||||
LD =ld
|
||||
CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \
|
||||
! -fno-stack-protector -nostdinc -fno-builtin -g -I../include
|
||||
CPP =gcc -E -nostdinc -I../include
|
||||
|
||||
.c.s:
|
||||
diff -rc linux-0.01-rm-3.5.orig/fs/stat.c linux-0.01-rm-3.5/fs/stat.c
|
||||
*** linux-0.01-rm-3.5.orig/fs/stat.c 2008-01-14 05:58:48.000000000 +0900
|
||||
--- linux-0.01-rm-3.5/fs/stat.c 2011-01-10 22:17:58.000062644 +0900
|
||||
***************
|
||||
*** 102,108 ****
|
||||
|
||||
int sys_lstat64(char* filename, struct stat * statbuf)
|
||||
{
|
||||
! return sys_stat64(filename,statbuf);
|
||||
}
|
||||
|
||||
int sys_oldstat()
|
||||
--- 102,108 ----
|
||||
|
||||
int sys_lstat64(char* filename, struct stat * statbuf)
|
||||
{
|
||||
! return sys_stat64(filename, (struct stat64 *)statbuf);
|
||||
}
|
||||
|
||||
int sys_oldstat()
|
||||
diff -rc linux-0.01-rm-3.5.orig/include/asm/segment.h linux-0.01-rm-3.5/include/asm/segment.h
|
||||
*** linux-0.01-rm-3.5.orig/include/asm/segment.h 2008-01-14 05:58:48.000000000 +0900
|
||||
--- linux-0.01-rm-3.5/include/asm/segment.h 2011-01-12 14:13:26.278253365 +0900
|
||||
***************
|
||||
*** 24,30 ****
|
||||
|
||||
extern inline void put_fs_byte(char val,char *addr)
|
||||
{
|
||||
! __asm__ ("movb %0,%%fs:%1"::"r" (val),"m" (*addr));
|
||||
}
|
||||
|
||||
extern inline void put_fs_word(short val,short * addr)
|
||||
--- 24,30 ----
|
||||
|
||||
extern inline void put_fs_byte(char val,char *addr)
|
||||
{
|
||||
! __asm__ ("movb %0,%%fs:%1"::"q" (val),"m" (*addr));
|
||||
}
|
||||
|
||||
extern inline void put_fs_word(short val,short * addr)
|
||||
diff -rc linux-0.01-rm-3.5.orig/kernel/console.c linux-0.01-rm-3.5/kernel/console.c
|
||||
*** linux-0.01-rm-3.5.orig/kernel/console.c 2008-01-14 05:58:48.000000000 +0900
|
||||
--- linux-0.01-rm-3.5/kernel/console.c 2011-01-12 15:22:17.037152184 +0900
|
||||
***************
|
||||
*** 76,89 ****
|
||||
__asm__ __volatile("cld\n\t"
|
||||
"rep\n\t"
|
||||
"movsl\n\t"
|
||||
! "movl columns,%1\n\t"
|
||||
"rep\n\t"
|
||||
"stosw"
|
||||
:"=&a" (d0), "=&c" (d1), "=&D" (d2), "=&S" (d3)
|
||||
:"0" (0x0720),
|
||||
"1" ((lines-1)*columns>>1),
|
||||
"2" (SCREEN_START),
|
||||
! "3" (origin)
|
||||
:"memory");
|
||||
|
||||
scr_end -= origin-SCREEN_START;
|
||||
--- 76,90 ----
|
||||
__asm__ __volatile("cld\n\t"
|
||||
"rep\n\t"
|
||||
"movsl\n\t"
|
||||
! "movl %[columns],%1\n\t"
|
||||
"rep\n\t"
|
||||
"stosw"
|
||||
:"=&a" (d0), "=&c" (d1), "=&D" (d2), "=&S" (d3)
|
||||
:"0" (0x0720),
|
||||
"1" ((lines-1)*columns>>1),
|
||||
"2" (SCREEN_START),
|
||||
! "3" (origin),
|
||||
! [columns] "r" (columns)
|
||||
:"memory");
|
||||
|
||||
scr_end -= origin-SCREEN_START;
|
||||
***************
|
||||
*** 106,119 ****
|
||||
__asm__ __volatile__("cld\n\t"
|
||||
"rep\n\t"
|
||||
"movsl\n\t"
|
||||
! "movl columns,%%ecx\n\t"
|
||||
"rep\n\t"
|
||||
"stosw"
|
||||
:"=&a" (d0), "=&c" (d1), "=&D" (d2), "=&S" (d3)
|
||||
:"0" (0x0720),
|
||||
"1" ((bottom-top-1)*columns>>1),
|
||||
"2" (origin+(columns<<1)*top),
|
||||
! "3" (origin+(columns<<1)*(top+1))
|
||||
:"memory");
|
||||
}
|
||||
}
|
||||
--- 107,121 ----
|
||||
__asm__ __volatile__("cld\n\t"
|
||||
"rep\n\t"
|
||||
"movsl\n\t"
|
||||
! "movl %[columns],%%ecx\n\t"
|
||||
"rep\n\t"
|
||||
"stosw"
|
||||
:"=&a" (d0), "=&c" (d1), "=&D" (d2), "=&S" (d3)
|
||||
:"0" (0x0720),
|
||||
"1" ((bottom-top-1)*columns>>1),
|
||||
"2" (origin+(columns<<1)*top),
|
||||
! "3" (origin+(columns<<1)*(top+1)),
|
||||
! [columns] "r" (columns)
|
||||
:"memory");
|
||||
}
|
||||
}
|
||||
***************
|
||||
*** 125,138 ****
|
||||
"rep\n\t"
|
||||
"movsl\n\t"
|
||||
"addl $2,%%edi\n\t" /* %edi has been decremented by 4 */
|
||||
! "movl columns,%%ecx\n\t"
|
||||
"rep\n\t"
|
||||
"stosw"
|
||||
:"=&a" (d0), "=&c" (d1), "=&D" (d2), "=&S" (d3)
|
||||
:"0" (0x0720),
|
||||
"1" ((bottom-top-1)*columns>>1),
|
||||
"2" (origin+(columns<<1)*bottom-4),
|
||||
! "3" (origin+(columns<<1)*(bottom-1)-4)
|
||||
:"memory");
|
||||
}
|
||||
|
||||
--- 127,141 ----
|
||||
"rep\n\t"
|
||||
"movsl\n\t"
|
||||
"addl $2,%%edi\n\t" /* %edi has been decremented by 4 */
|
||||
! "movl %[columns],%%ecx\n\t"
|
||||
"rep\n\t"
|
||||
"stosw"
|
||||
:"=&a" (d0), "=&c" (d1), "=&D" (d2), "=&S" (d3)
|
||||
:"0" (0x0720),
|
||||
"1" ((bottom-top-1)*columns>>1),
|
||||
"2" (origin+(columns<<1)*bottom-4),
|
||||
! "3" (origin+(columns<<1)*(bottom-1)-4),
|
||||
! [columns] "r" (columns)
|
||||
:"memory");
|
||||
}
|
||||
|
||||
diff -rc linux-0.01-rm-3.5.orig/kernel/fork.c linux-0.01-rm-3.5/kernel/fork.c
|
||||
*** linux-0.01-rm-3.5.orig/kernel/fork.c 2008-01-14 05:58:48.000000000 +0900
|
||||
--- linux-0.01-rm-3.5/kernel/fork.c 2011-01-12 15:14:01.272244170 +0900
|
||||
***************
|
||||
*** 70,76 ****
|
||||
--- 70,80 ----
|
||||
p = (struct task_struct *) get_free_page();
|
||||
if (!p)
|
||||
return -EAGAIN;
|
||||
+ #if 0 /* This statement breaks *p memory (gcc 4.4.5). */
|
||||
*p = *current; /* NOTE! this doesn't copy the supervisor stack */
|
||||
+ #else
|
||||
+ memcpy(p, current, sizeof(struct task_struct));
|
||||
+ #endif
|
||||
p->state = TASK_RUNNING;
|
||||
p->pid = last_pid;
|
||||
p->father = current->pid;
|
||||
diff -rc linux-0.01-rm-3.5.orig/kernel/Makefile linux-0.01-rm-3.5/kernel/Makefile
|
||||
*** linux-0.01-rm-3.5.orig/kernel/Makefile 2008-01-14 05:58:48.000000000 +0900
|
||||
--- linux-0.01-rm-3.5/kernel/Makefile 2011-01-12 15:22:49.318242168 +0900
|
||||
***************
|
||||
*** 9,18 ****
|
||||
AR =ar
|
||||
AS =as
|
||||
LD =ld
|
||||
! LDFLAGS =-s -x
|
||||
CC =gcc
|
||||
CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \
|
||||
! -finline-functions -fno-stack-protector -nostdinc -I../include
|
||||
CPP =gcc -E -nostdinc -I../include
|
||||
|
||||
.c.s:
|
||||
--- 9,18 ----
|
||||
AR =ar
|
||||
AS =as
|
||||
LD =ld
|
||||
! LDFLAGS =-g #-s -x
|
||||
CC =gcc
|
||||
CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \
|
||||
! -finline-functions -fno-stack-protector -nostdinc -fno-builtin -g -I../include
|
||||
CPP =gcc -E -nostdinc -I../include
|
||||
|
||||
.c.s:
|
||||
diff -rc linux-0.01-rm-3.5.orig/lib/Makefile linux-0.01-rm-3.5/lib/Makefile
|
||||
*** linux-0.01-rm-3.5.orig/lib/Makefile 2008-01-14 05:58:48.000000000 +0900
|
||||
--- linux-0.01-rm-3.5/lib/Makefile 2011-01-12 15:20:03.508243026 +0900
|
||||
***************
|
||||
*** 9,18 ****
|
||||
AR =ar
|
||||
AS =as
|
||||
LD =ld
|
||||
! LDFLAGS =-s -x
|
||||
CC =gcc
|
||||
CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \
|
||||
! -finline-functions -fno-stack-protector -nostdinc -I../include
|
||||
CPP =gcc -E -nostdinc -I../include
|
||||
|
||||
.c.s:
|
||||
--- 9,18 ----
|
||||
AR =ar
|
||||
AS =as
|
||||
LD =ld
|
||||
! LDFLAGS =-g #-s -x
|
||||
CC =gcc
|
||||
CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \
|
||||
! -finline-functions -fno-stack-protector -nostdinc -fno-builtin -g -I../include
|
||||
CPP =gcc -E -nostdinc -I../include
|
||||
|
||||
.c.s:
|
||||
diff -rc linux-0.01-rm-3.5.orig/Makefile linux-0.01-rm-3.5/Makefile
|
||||
*** linux-0.01-rm-3.5.orig/Makefile 2008-01-24 22:17:39.000000000 +0900
|
||||
--- linux-0.01-rm-3.5/Makefile 2011-01-12 15:19:49.900242989 +0900
|
||||
***************
|
||||
*** 10,18 ****
|
||||
|
||||
AS =as
|
||||
LD =ld
|
||||
! LDFLAGS =-s -x -M -Ttext 0 -e startup_32
|
||||
CC =gcc
|
||||
! CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer -fno-stack-protector
|
||||
CPP =gcc -E -nostdinc -Iinclude
|
||||
|
||||
ARCHIVES=kernel/kernel.o mm/mm.o fs/fs.o
|
||||
--- 10,19 ----
|
||||
|
||||
AS =as
|
||||
LD =ld
|
||||
! LDFLAGS =-M -Ttext 0 -e startup_32
|
||||
! #LDFLAGS =-s -x -M -Ttext 0 -e startup_32
|
||||
CC =gcc
|
||||
! CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer -fno-stack-protector -fno-builtin -g
|
||||
CPP =gcc -E -nostdinc -Iinclude
|
||||
|
||||
ARCHIVES=kernel/kernel.o mm/mm.o fs/fs.o
|
||||
diff -rc linux-0.01-rm-3.5.orig/mm/Makefile linux-0.01-rm-3.5/mm/Makefile
|
||||
*** linux-0.01-rm-3.5.orig/mm/Makefile 2008-01-14 05:58:48.000000000 +0900
|
||||
--- linux-0.01-rm-3.5/mm/Makefile 2011-01-12 15:18:38.900966175 +0900
|
||||
***************
|
||||
*** 1,6 ****
|
||||
CC =gcc
|
||||
CFLAGS =-O -Wall -fstrength-reduce -fomit-frame-pointer \
|
||||
! -fno-stack-protector -finline-functions -nostdinc -I../include
|
||||
AS =as
|
||||
AR =ar
|
||||
LD =ld
|
||||
--- 1,6 ----
|
||||
CC =gcc
|
||||
CFLAGS =-O -Wall -fstrength-reduce -fomit-frame-pointer \
|
||||
! -fno-stack-protector -finline-functions -nostdinc -fno-builtin -g -I../include
|
||||
AS =as
|
||||
AR =ar
|
||||
LD =ld
|
||||
Arquivo binário não exibido.
+1
-1
@@ -1,5 +1,5 @@
|
||||
CC =gcc
|
||||
CFLAGS =-O -Wall -fstrength-reduce -fomit-frame-pointer -m32 \
|
||||
CFLAGS =-Wall -O -std=gnu89 -fstrength-reduce -fomit-frame-pointer -m32 \
|
||||
-fno-stack-protector -finline-functions -nostdinc -fno-builtin -g -I../include
|
||||
AS =as --32
|
||||
AR =ar
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ int main(int argc, char ** argv)
|
||||
* size is < 512 bytes )
|
||||
*/
|
||||
memset(buf,0,512);
|
||||
write(1,buf,512);
|
||||
//write(1,buf,512);
|
||||
|
||||
close(id);
|
||||
fprintf(stderr,"System %d bytes.\n",i);
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário