diff options
author | Marvin Borner | 2019-10-30 21:18:08 +0100 |
---|---|---|
committer | Marvin Borner | 2019-10-30 21:18:08 +0100 |
commit | 836e4eba09e73612b00f268e124750e78aeaa225 (patch) | |
tree | ee0876bc2ba05498f87afb6a7b625bf652cb6708 /Makefile | |
parent | 118898807865ba11f5d7754f6f0572a0403f8512 (diff) |
Added kind of working initrd support
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 21 |
1 files changed, 4 insertions, 17 deletions
@@ -40,25 +40,12 @@ build: clean # Create ISO mkdir -p ./iso/boot/grub; \ cp ./build/melvix.bin ./iso/boot/; \ - cp ./src/kernel/grub.cfg ./iso/boot/grub/; \ + cp ./src/bootloader/grub.cfg ./iso/boot/grub/; \ + gcc -w ./src/bootloader/make_initrd.c -o ./build/make_initrd || exit; \ + ./build/make_initrd ./src/bootloader/test.txt test.txt || exit; \ + mv initrd.img ./iso/boot/melvix.initrd || exit; \ grub-mkrescue -o ./build/melvix.iso ./iso/; -image: build - @set -e; \ - gcc -w ./src/utils/make_initrd.c -o ./build/make_initrd || exit; \ - ./build/make_initrd ./src/utils/test.txt test.txt || exit; \ - mv initrd.img ./build/initrd.img || exit; \ - dd if=/dev/zero of=./build/image.img iflag=fullblock bs=1M count=10 && sync; \ - mkfs.ext2 ./build/image.img; \ - device=$$(sudo losetup -f); \ - sudo losetup $$device ./build/image.img || exit; \ - mkdir ./build/mnt/ || exit; \ - sudo mount $$device ./build/mnt/ || exit; \ - sudo cp ./build/melvix.iso ./build/mnt/kernel || exit; \ - sudo cp ./build/initrd.img ./build/mnt/initrd || exit; \ - sudo umount $$device || exit; \ - sudo losetup -d $$device; - cross: @set -e; \ [ -d "./cross/" ] && echo "Please remove ./cross/ and try again" && exit; \ |