URL
https://opencores.org/ocsvn/eco32/eco32/trunk
Subversion Repositories eco32
Compare Revisions
- This comparison shows the changes necessary to convert path
/eco32/trunk/stdalone/mkpart/mkmboot
- from Rev 106 to Rev 107
- ↔ Reverse comparison
Rev 106 → Rev 107
/stage1/mbr.s
4,8 → 4,8
|
; Runtime environment: |
; |
; This code must be loaded and started at 0xC0000000. |
; It allocates a stack from 0xC0001000 downwards. So |
; This code must be loaded and started at 0xC0010000. |
; It allocates a stack from 0xC0011000 downwards. So |
; it must run within 4K (code + data + stack). |
; |
; This code expects the disk number of the boot disk |
15,28 → 15,14
; The boot manager, which is loaded by this code, |
; must be in standalone (headerless) executable |
; format, stored at absolute disk sectors 2..31, |
; and gets loaded and started at 0xC00F0000. |
; and gets loaded and started at 0xC0011000. |
|
.set stacktop,0xC0001000 ; top of stack |
.set loadaddr,0xC00F0000 ; where to load the boot manager |
.set stacktop,0xC0011000 ; top of stack |
.set loadaddr,0xC0011000 ; where to load the boot manager |
|
.set cout,0xE0000018 ; ROM console output |
.set dskio,0xE0000030 ; ROM disk I/O |
.set cout,0xC0000018 ; the monitor's console output |
.set dskio,0xC0000030 ; the monitor's disk I/O |
|
; reset arrives here |
reset: |
j start |
|
; interrupts arrive here |
intrpt: |
j userMiss |
|
; user TLB misses arrive here |
userMiss: |
add $4,$0,intmsg ; we do not expect any interrupt |
jal msgout |
j halt |
|
; load the boot manager and start it |
start: |
add $29,$0,stacktop ; setup stack |
113,8 → 99,6
j halt1 |
|
; messages |
intmsg: |
.byte "unexpected interrupt", 0x0D, 0x0A, 0 |
strtmsg: |
.byte "MBR executing...", 0x0D, 0x0A, 0 |
dremsg: |
/stage1/Makefile
7,7 → 7,7
all: mbr.bin |
|
mbr.bin: mbr.o |
$(BUILD)/bin/ld -h -rc 0xC0000000 -o mbr.bin mbr.o |
$(BUILD)/bin/ld -h -rc 0xC0010000 -o mbr.bin mbr.o |
|
mbr.o: mbr.s |
$(BUILD)/bin/as -o mbr.o mbr.s |
/Makefile
8,14 → 8,14
|
all: mbootblk |
|
mbootblk: stage1/mbr.bin stage2/boot.bin |
mbootblk: stage1/mbr.bin stage2/mboot.bin |
dd if=/dev/zero of=./zeroes bs=512 count=1 |
cat stage1/mbr.bin zeroes stage2/boot.bin >mbootblk |
cat stage1/mbr.bin zeroes stage2/mboot.bin >mbootblk |
|
stage1/mbr.bin: |
$(MAKE) -C stage1 |
|
stage2/boot.bin: |
stage2/mboot.bin: |
$(MAKE) -C stage2 |
|
clean: |