head	1.7;
access;
symbols
	start:1.1.1.1 vendor:1.1.1;
locks; strict;
comment	@# @;


1.7
date	2003.04.07.04.13.51;	author redpain;	state Exp;
branches;
next	1.6;

1.6
date	2003.04.07.03.10.56;	author redpain;	state Exp;
branches;
next	1.5;

1.5
date	2003.04.07.02.45.29;	author redpain;	state Exp;
branches;
next	1.4;

1.4
date	2003.04.07.02.27.33;	author redpain;	state Exp;
branches;
next	1.3;

1.3
date	2003.04.07.01.06.07;	author redpain;	state Exp;
branches;
next	1.2;

1.2
date	2003.04.07.01.00.09;	author redpain;	state Exp;
branches;
next	1.1;

1.1
date	2003.04.01.12.46.57;	author redpain;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2003.04.01.12.46.57;	author redpain;	state Exp;
branches;
next	;


desc
@@


1.7
log
@idt.c and idt.h added
@
text
@kernel_SFLAGS = -Wall
kernel_CFLAGS = -Wall -g
kernel_LDFLAGS = -nostdlib -Wl,-N -Wl,-Ttext -Wl,100000

OBJS=boot.o kernel.o stdio.o idt.o

.c.o :
	gcc $(kernel_CFLAGS) -c $<

.S.o :
	gcc $(kernel_SFLAGS) -c $<

kernel : $(OBJS)
	gcc -g -o kernel $(kernel_LDFLAGS) $(OBJS)

boot.o : boot.S multiboot.h

kernel.o : kernel.c multiboot.h stdio.h idt.h
stdio.o : stdio.c stdio.h
idt.o : idt.c idt.h

fd :
	# init
	dd if=/dev/zero of=fd.img bs=1k count=1440
	losetup /dev/loop0 fd.img
	dd if=grub_data/grub-0.93-i386-pc.ext2fs of=/dev/loop0
	mkfs -t ext2 /dev/loop0
	mkdir mnt
	mount -t ext2 /dev/loop0 mnt

	# main
	mkdir mnt/boot
	mkdir mnt/boot/grub
	cp grub_data/menu.lst mnt/boot/grub
	cp kernel mnt

	# finish
	umount /dev/loop0
	rmdir mnt
	losetup -d /dev/loop0

clean:
	rm -f *.o kernel log.txt
@


1.6
log
@remove config.h
@
text
@d1 2
a2 2
kernel_SFLAGS = -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -malign-jumps=1 -malign-loops=1 -malign-functions=1 -Wundef
kernel_CFLAGS = -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -Wundef
d5 10
a14 2
kernel : boot.o kernel.o stdio.o
	gcc -g -o kernel $(kernel_LDFLAGS) boot.o kernel.o stdio.o
a16 4
	gcc $(kernel_SFLAGS) -o boot.o -g -c boot.S

kernel.o : kernel.c multiboot.h stdio.h
	gcc $(kernel_CFLAGS) -o kernel.o -g -c kernel.c
d18 1
d20 1
a20 1
	gcc $(kernel_CFLAGS) -o stdio.o -g -c stdio.c
@


1.5
log
@kernel boot ok
@
text
@a2 1
kernel_FLAGS = -fno-builtin -nostdinc -O -g -Wall -imacros ./config.h
@


1.4
log
@make fd.img that can boot. but it has error
@
text
@d1 2
a2 1
kernel_CFLAGS = -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -malign-jumps=1 -malign-loops=1 -malign-functions=1 -Wundef
d6 2
a7 2
kernel : boot.o
	gcc -g -o kernel $(kernel_LDFLAGS) boot.o
d10 7
a16 1
	gcc $(kernel_CFLAGS) -o boot.o -g -c boot.S
@


1.3
log
@in clean, not remove fd.img
@
text
@d11 20
@


1.2
log
@floppy.img -> fd.img
@
text
@d12 1
a12 1
	rm -f *.o kernel log.txt fd.img
@


1.1
log
@Initial revision
@
text
@d12 1
a12 1
	rm -f *.o kernel log.txt floppy.img
@


1.1.1.1
log
@project start
@
text
@@
