Move all of the ramdisk support into the hard disk
3
.gitignore
vendored
@ -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/*
|
||||
|
8
Makefile
@ -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" "$<"
|
||||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
0
hdd/dev/.dummy
Normal file
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
BIN
hdd/usr/share/arrow.bmp
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
hdd/usr/share/arrow_alpha.bmp
Normal file
After Width: | Height: | Size: 6.8 KiB |
4
hdd/usr/share/cat
Normal file
@ -0,0 +1,4 @@
|
||||
\ /\
|
||||
) ( ')
|
||||
( / )
|
||||
\(__)|
|
@ -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 $@ $<
|
||||
|