Compare commits
2 Commits
9a82de6b70
...
d941e6d70b
Author | SHA1 | Date |
---|---|---|
|
d941e6d70b | |
|
b65068dc7d |
|
@ -23,7 +23,7 @@ If you want to try out DOOM, you should first enter the GUI environment using th
|
|||
- [x] Basic graphical environment
|
||||
- [x] Terminal emulator
|
||||
- [x] Status bar
|
||||
- [ ] Program launcher
|
||||
- [x] Program launcher
|
||||
- [ ] Some nice apps
|
||||
- [x] ELF dynamic linking
|
||||
- [x] copy-on-write memory
|
||||
|
@ -118,6 +118,8 @@ To change the bootloader you can set environment variable BANAN\_BOOTLOADER; sup
|
|||
|
||||
To run with UEFI set environment variable BANAN\_UEFI\_BOOT=1. You will also have to set OVMF\_PATH to the correct OVMF (default */usr/share/ovmf/x64/OVMF.fd*).
|
||||
|
||||
To build an image with no physical root filesystem, but an initrd set environment variable BANAN\_INITRD=1. This can be used when testing on hardware with unsupported USB controller.
|
||||
|
||||
If you have corrupted your disk image or want to create new one, you can either manually delete *build/banan-os.img* and build system will automatically create you a new one or you can run the following command.
|
||||
```sh
|
||||
./bos image-full
|
||||
|
|
|
@ -28,6 +28,10 @@ if [[ -z $BANAN_UEFI_BOOT ]]; then
|
|||
export BANAN_UEFI_BOOT=0
|
||||
fi
|
||||
|
||||
if [[ -z $BANAN_INITRD ]]; then
|
||||
export BANAN_INITRD=0
|
||||
fi
|
||||
|
||||
if [[ -z $BANAN_BOOTLOADER ]]; then
|
||||
export BANAN_BOOTLOADER='BANAN'
|
||||
fi
|
||||
|
|
|
@ -33,9 +33,15 @@ if [ ! -b $ROOT_PARTITION ]; then
|
|||
fi
|
||||
|
||||
if sudo mount $ROOT_PARTITION $MOUNT_DIR; then
|
||||
cd $MOUNT_DIR
|
||||
sudo tar xf $BANAN_SYSROOT_TAR
|
||||
cd
|
||||
if (($BANAN_INITRD)); then
|
||||
sudo mkdir -p $MOUNT_DIR/boot
|
||||
sudo cp $BANAN_BUILD_DIR/kernel/banan-os.kernel $MOUNT_DIR/boot/banan-os.kernel
|
||||
sudo cp $BANAN_SYSROOT_TAR $MOUNT_DIR/boot/banan-os.initrd
|
||||
else
|
||||
cd $MOUNT_DIR
|
||||
sudo tar xf $BANAN_SYSROOT_TAR
|
||||
cd
|
||||
fi
|
||||
|
||||
sudo umount $MOUNT_DIR
|
||||
fi
|
||||
|
|
|
@ -44,7 +44,11 @@ install_grub_legacy() {
|
|||
--boot-directory="$mount_dir/boot" \
|
||||
$loop_dev
|
||||
sudo mkdir -p "$mount_dir/boot/grub"
|
||||
sudo cp "$BANAN_BUILD_DIR/grub-legacy-boot.cfg" "$mount_dir/boot/grub/grub.cfg"
|
||||
if (($BANAN_INITRD)); then
|
||||
sudo cp "$BANAN_BUILD_DIR/grub-legacy-initrd.cfg" "$mount_dir/boot/grub/grub.cfg"
|
||||
else
|
||||
sudo cp "$BANAN_BUILD_DIR/grub-legacy.cfg" "$mount_dir/boot/grub/grub.cfg"
|
||||
fi
|
||||
sudo umount "$mount_dir"
|
||||
}
|
||||
|
||||
|
@ -57,11 +61,20 @@ install_grub_uefi() {
|
|||
|
||||
sudo mount $partition2 "$mount_dir"
|
||||
sudo mkdir -p "$mount_dir/boot/grub"
|
||||
sudo cp "$BANAN_BUILD_DIR/grub-uefi.cfg" "$mount_dir/boot/grub/grub.cfg"
|
||||
if (($BANAN_INITRD)); then
|
||||
sudo cp "$BANAN_BUILD_DIR/grub-uefi-initrd.cfg" "$mount_dir/boot/grub/grub.cfg"
|
||||
else
|
||||
sudo cp "$BANAN_BUILD_DIR/grub-uefi.cfg" "$mount_dir/boot/grub/grub.cfg"
|
||||
fi
|
||||
sudo umount "$mount_dir"
|
||||
}
|
||||
|
||||
install_banan_legacy() {
|
||||
if (($BANAN_INITRD)); then
|
||||
echo "banan bootloader does not support initrd" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
root_disk_info=$(fdisk -x "$BANAN_DISK_IMAGE_PATH" | tr -s ' ')
|
||||
root_part_guid=$(echo "$root_disk_info" | grep "^$BANAN_DISK_IMAGE_PATH" | head -2 | tail -1 | cut -d' ' -f6)
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
menuentry "banan-os" {
|
||||
multiboot2 /boot/banan-os.kernel readonly
|
||||
module2 /boot/banan-os.initrd
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
insmod part_gpt
|
||||
insmod search_fs_uuid
|
||||
|
||||
search --no-floppy --fs-uuid --set=root <ROOT_FS>
|
||||
|
||||
insmod all_video
|
||||
|
||||
menuentry "banan-os" {
|
||||
multiboot2 /boot/banan-os.kernel readonly
|
||||
module2 /boot/banan-os.initrd
|
||||
}
|
Loading…
Reference in New Issue