Skip to content

Commit

Permalink
Made the image work, turns out I stupidly put the 00entry.o last in t…
Browse files Browse the repository at this point in the history
…he link list, when it needed to be in the first 8k of the executable.
  • Loading branch information
ccs4ever committed Jul 14, 2011
1 parent f0b2b2a commit c47f013
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
img := img.iso
srcs := $(wildcard *.c *.s)
objs := $(srcs:%.c=%.o) 00entry.o
objs := 00entry.o $(srcs:%.c=%.o)
objs := $(objs:%.s=%.o)
target := image.elf
AS=$(CC)
Expand All @@ -13,10 +13,10 @@ clean:
-rm -f $(objs) $(target) $(img) doc.txt

00entry.o: start.asm
nasm -felf $< -o $@
nasm -f elf32 $< -o $@

$(target): link.ld $(objs)
ld -nostdlib -Tlink.ld $(objs) -o image.elf
ld -nostdlib -Tlink.ld $(objs) -o $(target)

src: $(target)

Expand Down
2 changes: 1 addition & 1 deletion src/menu.lst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ timeout 5

title ix
# grub infers this for us root (cd)
kernel /image.elf
kernel --type=multiboot /image.elf
boot

1 change: 1 addition & 0 deletions src/start.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

; entry.asm begins here


; Multiboot header
MULTIBOOT_PAGE_ALIGN equ 1<<0
MULTIBOOT_MEMORY_INFO equ 1<<1
Expand Down

0 comments on commit c47f013

Please sign in to comment.