From 3dab3922965447d0bc6993386afba2d5772a7a15 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Mon, 27 Mar 2023 01:11:17 +0300 Subject: [PATCH] Build System: Create base directory for the FS --- {fonts => base/usr/share/fonts}/lat0-08.psfu | Bin {fonts => base/usr/share/fonts}/lat0-16.psfu | Bin .../usr/share/fonts}/zap-ext-vga16.psf | Bin {fonts => base/usr/share/fonts}/zap-vga16.psf | Bin disk.sh | 15 +++++++-------- 5 files changed, 7 insertions(+), 8 deletions(-) rename {fonts => base/usr/share/fonts}/lat0-08.psfu (100%) rename {fonts => base/usr/share/fonts}/lat0-16.psfu (100%) rename {fonts => base/usr/share/fonts}/zap-ext-vga16.psf (100%) rename {fonts => base/usr/share/fonts}/zap-vga16.psf (100%) diff --git a/fonts/lat0-08.psfu b/base/usr/share/fonts/lat0-08.psfu similarity index 100% rename from fonts/lat0-08.psfu rename to base/usr/share/fonts/lat0-08.psfu diff --git a/fonts/lat0-16.psfu b/base/usr/share/fonts/lat0-16.psfu similarity index 100% rename from fonts/lat0-16.psfu rename to base/usr/share/fonts/lat0-16.psfu diff --git a/fonts/zap-ext-vga16.psf b/base/usr/share/fonts/zap-ext-vga16.psf similarity index 100% rename from fonts/zap-ext-vga16.psf rename to base/usr/share/fonts/zap-ext-vga16.psf diff --git a/fonts/zap-vga16.psf b/base/usr/share/fonts/zap-vga16.psf similarity index 100% rename from fonts/zap-vga16.psf rename to base/usr/share/fonts/zap-vga16.psf diff --git a/disk.sh b/disk.sh index 22ca3b14..a0113ec8 100755 --- a/disk.sh +++ b/disk.sh @@ -2,6 +2,8 @@ set -e . ./build.sh +cp -r base/* $SYSROOT + DISK_NAME=banan-os.img DISK_SIZE=$[50 * 1024 * 1024] MOUNT_DIR=/mnt @@ -46,14 +48,16 @@ PARTITION1=${LOOP_DEV}p1 PARTITION2=${LOOP_DEV}p2 PARTITION3=${LOOP_DEV}p3 +sudo mkfs.ext2 $PARTITION3 +sudo mount $PARTITION3 $MOUNT_DIR +echo 'hello' | sudo tee ${MOUNT_DIR}/hello.txt +sudo umount $MOUNT_DIR + sudo mkfs.ext2 $PARTITION2 sudo mount $PARTITION2 $MOUNT_DIR sudo cp -r ${SYSROOT}/* ${MOUNT_DIR}/ -sudo mkdir -p ${MOUNT_DIR}/usr/share/ -sudo cp -r fonts ${MOUNT_DIR}/usr/share/ -sudo mkdir -p ${MOUNT_DIR}/mnt/ sudo grub-install --no-floppy --target=i386-pc --modules="normal ext2 multiboot" --boot-directory=${MOUNT_DIR}/boot $LOOP_DEV @@ -74,9 +78,4 @@ menuentry "banan-os (no apic, no serial)" { sudo umount $MOUNT_DIR -sudo mkfs.ext2 $PARTITION3 -sudo mount $PARTITION3 $MOUNT_DIR -echo 'hello' | sudo tee ${MOUNT_DIR}/hello.txt -sudo umount $MOUNT_DIR - sudo losetup -d $LOOP_DEV