- Timestamp:
- Jun 19, 2017, 8:13:59 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile.x86
r26 r27 1 1 ############################################################################# 2 # 2 # ALMOS-MKH Makefile for x86_64 # 3 3 ############################################################################# 4 4 … … 10 10 11 11 # Export all variables to applications sub-Makefile. 12 export 12 export 13 13 CC = gcc 14 14 AS = as … … 18 18 19 19 20 # Rules that don't build target files 20 # Rules that don't build target files 21 21 # always out-of-date, need to be regenerated everytime they are called 22 22 .PHONY: compile \ … … 29 29 build/kernel/kernel.elf 30 30 31 # Objects to be linked for the soclib drivers library 31 # Objects to be linked for the soclib drivers library 32 32 DRIVERS_OBJS = build/kernel/drivers/soclib_tty.o \ 33 33 build/kernel/drivers/soclib_bdv.o \ … … 40 40 build/kernel/drivers/soclib_iob.o 41 41 42 # Objects to be linked for kernel.elf generation 42 # Objects to be linked for kernel.elf generation 43 43 KERN_OBJS = build/kernel/kern/kernel_init.o \ 44 44 build/kernel/kern/printk.o \ … … 78 78 build/kernel/devices/dev_dma.o \ 79 79 build/kernel/devices/dev_fbf.o \ 80 build/kernel/devices/dev_iob.o 80 build/kernel/devices/dev_iob.o 81 81 82 82 MM_OBJS = build/kernel/mm/ppm.o \ … … 139 139 build/kernel/syscalls/sys_clock.o \ 140 140 build/kernel/syscalls/sys_alarm.o \ 141 build/kernel/syscalls/sys_rmdir.o 141 build/kernel/syscalls/sys_rmdir.o 142 142 143 143 SYS_OBJS_3 = build/kernel/syscalls/sys_utls.o \ … … 150 150 build/kernel/syscalls/sys_exec.o \ 151 151 build/kernel/syscalls/sys_stat.o \ 152 build/kernel/syscalls/sys_trace.o 152 build/kernel/syscalls/sys_trace.o 153 153 154 154 SYS_OBJS_4 = build/kernel/syscalls/sys_madvise.o \ … … 163 163 build/kernel/syscalls/sys_gettimeofday.o 164 164 165 SYS_OBJS_5 = build/kernel/syscalls/sys_times.o 165 SYS_OBJS_5 = build/kernel/syscalls/sys_times.o 166 166 167 167 … … 172 172 173 173 # List of directories to be searched for included files 174 # when compiling for kernel.elf generation 174 # when compiling for kernel.elf generation 175 175 KERNEL_INCLUDE = -Ikernel \ 176 176 -Ikernel/kern \ … … 200 200 # The Mtools used to build the FAT32 disk image perfom a few sanity checks, to 201 201 # make sure that the disk is indeed an MS-DOS disk. However, the size of the 202 # disk image used by ALMOS-VM is not MS-DOS compliant. 202 # disk image used by ALMOS-VM is not MS-DOS compliant. 203 203 # Setting this variable prevents these checks. 204 204 MTOOLS_SKIP_CHECK := 1 … … 219 219 @mkdir -p build/kernel/libk 220 220 @mkdir -p build/kernel/drivers 221 @mkdir -p build/kernel/vfs 221 @mkdir -p build/kernel/vfs 222 222 @mkdir -p build/kernel/syscalls 223 223 @mkdir -p hdd … … 232 232 233 233 ############################################################## 234 # Rule to copy the files generated by the virtual prototype 234 # Rule to copy the files generated by the virtual prototype 235 235 # from the virtual disk 'home' directory to the current directory. 236 236 extract: 237 237 mcopy -o -i $(DISK_IMAGE) ::/home . 238 238 239 # Rules to delete all binary files from Unix File System 239 # Rules to delete all binary files from Unix File System 240 240 # without modifying the virtual disk. 241 241 clean: … … 267 267 268 268 ############################## 269 # rules to compile the drivers 269 # rules to compile the drivers 270 270 build/kernel/drivers/%.o: kernel/drivers/soclib/%.c \ 271 271 kernel/drivers/soclib/%.h \ … … 365 365 $(SYS_OBJS_2) \ 366 366 $(SYS_OBJS_3) \ 367 kernel/kernel_x86.ld 368 $(LD) -o $@ -z max-page-size=0x1000 -T kernel/kernel_x86.ld 367 kernel/kernel_x86.ld 368 $(LD) -o $@ -z max-page-size=0x1000 -T kernel/kernel_x86.ld \ 369 369 $(KERN_OBJS) $(HAL_OBJS) $(DEV_OBJS) $(MM_OBJS) \ 370 370 $(LIBK_OBJS) $(DRIVERS_OBJS) $(VFS_OBJS) \ 371 371 $(SYS_OBJS_0) $(SYS_OBJS_1) $(SYS_OBJS_2) \ 372 372 $(SYS_OBJS_3) 373 373 374 374 375 375 # $(SYS_OBJS_4) $(SYS_OBJS_5) 376 376 377 377 $(DU) -D $@ > $@.txt 378 378 mcopy -o -i $(DISK_IMAGE) build/kernel/kernel.elf ::/bin/kernel -
trunk/kernel/kernel.ld
r14 r27 1 /******************************************************************************* ***************2 * This is the linker script for the ALMOS-MK kernel.1 /******************************************************************************* 2 * This is the linker script for the ALMOS-MKH TSAR kernel. 3 3 * It describes the memory layout for the "kernel.elf" binary file. 4 ****************************************************************************** ***************/4 ******************************************************************************/ 5 5 6 /* define the kernel code base address */ 7 6 /* Define the kernel code base address */ 8 7 kernel_base = 0x4000; 9 8 10 /* Set the entry point of the boot-loader (e_entry field in the "boot.elf" file header) */ 9 /* 10 * Set the entry point of the boot-loader (e_entry field in the "boot.elf" 11 * file header) 12 */ 11 13 12 14 ENTRY(kernel_init) 13 15 14 /* Describe how to group the sections */ 15 16 /* 17 * Describe how to group the sections 18 */ 16 19 SECTIONS 17 20 { 18 . = kernel_base; 19 seg_kcode : 20 { 21 *(.text) 22 *(.rodata*) 23 } 24 . = ALIGN(0x1000); 25 seg_kdata : 26 { 27 *(.kinfo) 28 *(.kidle) 29 *(.kdata*) 30 *(.data*) 31 } 21 . = kernel_base; 22 seg_kcode : 23 { 24 *(.text) 25 *(.rodata*) 26 } 27 28 . = ALIGN(0x1000); 29 30 seg_kdata : 31 { 32 *(.kinfo) 33 *(.kidle) 34 *(.kdata*) 35 *(.data*) 36 } 32 37 } -
trunk/kernel/kernel_x86.ld
r26 r27 1 1 /******************************************************************************* 2 * This is the linker script for the ALMOS-MKH kernel.2 * This is the linker script for the ALMOS-MKH x86_64 kernel. 3 3 * It describes the memory layout for the "kernel.elf" binary file. 4 4 ******************************************************************************/
Note: See TracChangeset
for help on using the changeset viewer.