Changeset 16
- Timestamp:
- 03/12/08 21:07:23 (6 months ago)
- Location:
- Whitix/trunk
- Files:
-
- 7 modified
-
Makefile (modified) (3 diffs)
-
include/sys.h (modified) (1 diff)
-
kernel/main.c (modified) (1 diff)
-
memory/mmap.c (modified) (2 diffs)
-
user/libc/Makefile (modified) (1 diff)
-
user/linker/Linker (modified) (previous)
-
user/linker/load_lib.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/trunk/Makefile
r7 r16 14 14 export ARCH 15 15 16 # All directories that are to be built or cleaned. 17 SUBDIRS = arch/$(ARCH) devices fs kernel lib memory video user 18 16 19 all: cd 17 20 mkdir -p CdRoot CdRoot/Applications CdRoot/Devices CdRoot/Mount CdRoot/System CdRoot/System/Include CdRoot/System/Runtime 18 make -C user19 21 make -C user install 20 22 mkisofs -o cd.iso -b Boot/isoboot -no-emul-boot -c Boot/boot.cat -boot-load-size 4 -boot-info-table -iso-level 3 -l CdRoot … … 39 41 mkisofs -o cd.iso -b Boot/isoboot -no-emul-boot -c Boot/boot.cat -boot-load-size 4 -boot-info-table -iso-level 3 -l CdRoot 40 42 41 kern: 42 make -C arch/$(ARCH) 43 make -C devices 44 make -C fs 45 make -C kernel 46 make -C lib 47 make -C video 48 make -C memory 43 kern: subdirs 49 44 ld -M -T link.ld arch/$(ARCH)/boot/*.o arch/$(ARCH)/lib/*.o arch/$(ARCH)/kernel/*.o arch/$(ARCH)/mm/*.o devices/*.o devices/storage/*.o devices/storage/ata/*.o kernel/*.o video/*.o fs/*.o fs/isofs/*.o fs/vfs/*.o fs/fat/*.o fs/ext3/*.o lib/*.o memory/*.o -o kern > kernel.txt 50 45 51 .PHONY: clean 46 subdirs: 47 for dir in $(SUBDIRS); do \ 48 $(MAKE) -C $$dir; \ 49 done; 50 51 $(SUBDIRS): 52 $(MAKE) -C $@ 53 54 .PHONY: subdirs $(SUBDIRS) 55 52 56 clean: 53 57 make -C arch/$(ARCH) clean … … 70 74 @echo "clean - remove all intermediate files" 71 75 @echo "See the readme file for more help" 76 77 # Phony targets. 78 .PHONY: clean help cd -
Whitix/trunk/include/sys.h
r9 r16 57 57 /* Memory calls */ 58 58 void* SysMoreCore(int len); 59 int SysMemoryMap(DWORD address, DWORD length,int protection,int fd,DWORD offset,int flags);59 int SysMemoryMap(DWORD address, DWORD length, int protection, int fd, DWORD offset, int flags); 60 60 int SysMemoryUnmap(DWORD address,DWORD length); 61 61 -
Whitix/trunk/kernel/main.c
r9 r16 16 16 * 17 17 */ 18 19 /* TODO: Fix cli(); hlt(); */ 18 20 19 21 #include <console.h> -
Whitix/trunk/memory/mmap.c
r11 r16 599 599 }else if (!vNode) 600 600 { 601 int err=NameToVNode(&vNode,DEVICES_PATH "Zero",0);602 if ( err)601 /* Map to the zero file, so we can use the existing infrastructure. */ 602 if (NameToVNode(&vNode,DEVICES_PATH "Zero",0)) 603 603 return 0; 604 604 } … … 762 762 if (!(vNode=MMapGetVNode(fd))) 763 763 return 0; 764 764 765 765 return MMapDo(current,vNode,PAGE_ALIGN(address),PAGE_ALIGN_UP(length),protection,offset,flags); 766 766 } -
Whitix/trunk/user/libc/Makefile
r7 r16 26 26 make -C init clean 27 27 make -C setjmp clean 28 rm *.so 28 rm *.so -f -
Whitix/trunk/user/linker/load_lib.c
r9 r16 115 115 elfProt|=2; 116 116 117 if ( loadAddr || !picLib)117 if (*loadAddr || !picLib) 118 118 mmapFlags|=_SYS_MMAP_FIXED; 119 119 … … 153 153 /* Zero out the bss. */ 154 154 if (PAGE_OFFSET(elfBss) > 0) 155 { 156 DWORD partSize=PAGE_OFFSET(pHeaders[i].memSize-pHeaders[i].fileSize); 157 link_memset((void*)(pHeaders[i].vAddr+pHeaders[i].fileSize), 0, partSize); 158 } 155 link_memset((void*)(pHeaders[i].vAddr+pHeaders[i].fileSize), 0, PAGE_OFFSET(pHeaders[i].memSize-pHeaders[i].fileSize)); 159 156 } 160 157 } … … 251 248 } 252 249 253 DlCreateResolveEntry(name, pHeaders, fileHeader.phEntries, loadAddr, dynamicAddr, dynEntries);250 entry=DlCreateResolveEntry(name, pHeaders, fileHeader.phEntries, loadAddr, dynamicAddr, dynEntries); 254 251 255 252 /* Initialize the global offset table (GOT) */
