Move all of the ramdisk support into the hard disk

This commit is contained in:
Kevin Lange 2011-11-18 14:45:19 -06:00
parent b2b8185494
commit f3a52d272a
26 changed files with 12 additions and 7 deletions

3
.gitignore vendored
View File

@ -1,13 +1,14 @@
toaruos-kernel
toaruos-initrd
toaruos-disk.img
hdd/*
*.o
*.swp
bootloader/stage1.bin
bootloader/stage2.bin
initrd/boot
initrd/bin/*
hdd/boot
hdd/bin/*
.gdb_history
bootdisk.img
util/toaru-toolchain/*

View File

@ -14,7 +14,7 @@ YASM = yasm
MODULES = $(patsubst %.c,%.o,$(wildcard kernel/core/*.c))
FILESYSTEMS = $(patsubst %.c,%.o,$(wildcard kernel/core/fs/*.c))
VIDEODRIVERS = $(patsubst %.c,%.o,$(wildcard kernel/core/video/*.c))
BINARIES = initrd/bin/hello initrd/bin/echo initrd/bin/yes initrd/bin/cat initrd/bin/sh initrd/bin/clear
BINARIES = hdd/bin/hello hdd/bin/echo hdd/bin/yes hdd/bin/cat hdd/bin/sh hdd/bin/clear
UTILITIES = util/bin/readelf util/bin/typewriter
EMU = qemu
GENEXT = genext2fs
@ -92,7 +92,7 @@ kernel/start.o: kernel/start.s
################
# Ram disk #
################
toaruos-initrd: initrd/boot/kernel initrd/boot/stage2 initrd/bs.bmp ${BINARIES}
toaruos-initrd: initrd/boot/kernel initrd/boot/stage2
@${BEG} "initrd" "Generating initial RAM disk"
@# Get rid of the old one
@-rm -f toaruos-initrd
@ -122,7 +122,7 @@ initrd/boot/kernel: toaruos-kernel
hdd:
@mkdir hdd
toaruos-disk.img: hdd
toaruos-disk.img: hdd hdd/bs.bmp ${BINARIES}
@${BEG} "hdd" "Generating a Hard Disk image..."
@-rm -f toaruos-disk.img
@${GENEXT} -d hdd -q -b 131072 -N 4096 toaruos-disk.img ${ERRORS}
@ -146,7 +146,7 @@ loader/crtbegin.o: loader/crtbegin.s
@${YASM} -f elf32 -o $@ $< ${ERRORS}
@${END} "yasm" "$<"
initrd/bin/%: loader/%.o loader/crtbegin.o loader/syscall.o
hdd/bin/%: loader/%.o loader/crtbegin.o loader/syscall.o
@${BEG} "LD" "$<"
@${LD} -T loader/link.ld -s -S -o $@ $< ${ERRORS}
@${END} "LD" "$<"

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

0
hdd/dev/.dummy Normal file
View File

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

BIN
hdd/usr/share/arrow.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

4
hdd/usr/share/cat Normal file
View File

@ -0,0 +1,4 @@
\ /\
) ( ')
( / )
\(__)|

View File

@ -1,6 +1,6 @@
CC = i686-pc-toaru-gcc
CFLAGS = -march=core2 -std=c99 -O3 -m32 -Wa,--32
EXECUTABLES = $(patsubst %.c,../initrd/bin/%,$(wildcard *.c))
EXECUTABLES = $(patsubst %.c,../hdd/bin/%,$(wildcard *.c))
ERRORS = 2>>/tmp/.build-errors || util/mk-error
@ -11,5 +11,5 @@ all: ${EXECUTABLES}
clean:
-rm -f ${EXECUTABLES}
../initrd/bin/%: %.c
../hdd/bin/%: %.c
${CC} ${CFLAGS} -s -O3 -o $@ $<