[boot/initrd] Add stage2 to initial ramdisk, move kernel.
This commit is contained in:
parent
781659d67b
commit
bcd06ac136
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,7 +4,7 @@ toaruos-initrd
|
||||
*.swp
|
||||
bootloader/stage1.bin
|
||||
bootloader/stage2.bin
|
||||
initrd/kernel
|
||||
initrd/boot
|
||||
.gdb_history
|
||||
bootdisk.img
|
||||
*.log
|
||||
|
15
Makefile
15
Makefile
@ -65,8 +65,9 @@ kernel/start.o: kernel/start.s
|
||||
################
|
||||
# Ram disk #
|
||||
################
|
||||
toaruos-initrd: initrd/kernel
|
||||
toaruos-initrd: initrd/boot/kernel bootloader/stage2.bin
|
||||
@${ECHO} -n "\033[32m initrd Generating initial RAM disk\033[0m"
|
||||
@# Get rid of the old one
|
||||
@-rm -f toaruos-initrd
|
||||
@${GENEXT} -d initrd -q -b 249 toaruos-initrd
|
||||
@${ECHO} "\r\033[32;1m initrd Generated initial RAM disk image\033[0m"
|
||||
@ -74,9 +75,15 @@ toaruos-initrd: initrd/kernel
|
||||
|
||||
### Ram Disk installers...
|
||||
|
||||
# Second stage bootloader
|
||||
initrd/boot/stage2: bootloader/stage2.bin
|
||||
@mkdir -p initrd/boot
|
||||
@cp bootloader/stager2.bin initrd/boot/stage2
|
||||
|
||||
# Kernel
|
||||
initrd/kernel: toaruos-kernel
|
||||
@cp toaruos-kernel initrd/kernel
|
||||
initrd/boot/kernel: toaruos-kernel
|
||||
@mkdir -p initrd/boot
|
||||
@cp toaruos-kernel initrd/boot/kernel
|
||||
|
||||
################
|
||||
# Utilities #
|
||||
@ -145,7 +152,7 @@ clean:
|
||||
@-rm -f bootloader/stage1/*.o
|
||||
@-rm -f bootloader/stage2.bin
|
||||
@-rm -f bootloader/stage2/*.o
|
||||
@-rm -f initrd/kernel
|
||||
@-rm -f initrd/boot
|
||||
@-rm -f bootdisk.img
|
||||
@-rm -f docs/*.pdf docs/*.aux docs/*.log docs/*.out
|
||||
@-rm -f docs/*.idx docs/*.ind docs/*.toc docs/*.ilg
|
||||
|
@ -6,10 +6,15 @@
|
||||
* architecture you feel like running me on, though I much
|
||||
* prefer something simple and 32-bit.
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
/* The EXT2 header is smart enough to know to grab us stdint.h rather than types.h... */
|
||||
#include "../kernel/include/ext2.h"
|
||||
|
||||
int main(int argc, char ** argv) {
|
||||
printf("Mr. Boots Installer\n");
|
||||
|
||||
if (argc < 3) {
|
||||
fprintf(stderr, "Expected two additional arguments: a ramdisk, and a file path to second stage to find in it.\n");
|
||||
return -1;
|
||||
}
|
||||
fprintf(stderr, "I will look for %s in %s and generate appropriate output.\n", argv[2], argv[1]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user