diff --git a/build/AUTO-VM.ISO b/build/AUTO-VM.ISO deleted file mode 100755 index b6d36cd8..00000000 Binary files a/build/AUTO-VM.ISO and /dev/null differ diff --git a/build/AUTO.ISO b/build/AUTO.ISO index 96c44221..0c1eeecc 100755 Binary files a/build/AUTO.ISO and b/build/AUTO.ISO differ diff --git a/build/build-iso.sh b/build/build-iso.sh index ae6eca77..45280168 100755 --- a/build/build-iso.sh +++ b/build/build-iso.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Build Distro ISO using AUTO.ISO minimal auto-install as bootstrap to merge codebase, recompile system, and export ISO +# Build OS using AUTO.ISO minimal auto-install as bootstrap to merge codebase, recompile system, attempt build limine UEFI hybrid ISO # make sure we are in the correct directory SCRIPT_DIR=$(realpath "$(dirname "$0")") @@ -17,6 +17,7 @@ fi #alias sudo=doas TMPDIR="/tmp/zealtmp" +TMPISODIR="$TMPDIR/iso" TMPDISK="$TMPDIR/ZealOS.raw" TMPMOUNT="$TMPDIR/mnt" @@ -34,29 +35,114 @@ umount_tempdisk() { } [ ! -d $TMPMOUNT ] && mkdir -p $TMPMOUNT +[ ! -d $TMPISODIR ] && mkdir -p $TMPISODIR +set -e -echo "Making temp vdisk, running auto-install..." +echo "Building ZealBooter..." +( cd ../zealbooter && make clean all ) + +set +e + +echo "Making temp vdisk, running auto-install ..." qemu-img create -f raw $TMPDISK 192M -qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -cdrom AUTO.ISO -device isa-debug-exit +qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -smp 4 -cdrom AUTO.ISO -device isa-debug-exit -echo "Mounting vdisk and copying src/..." +echo "Copying src/Kernel/KStart16.ZC and src/Kernel/KernelA.HH into vdisk ..." rm ../src/Home/Registry.ZC 2> /dev/null rm ../src/Home/MakeHome.ZC 2> /dev/null mount_tempdisk -sudo cp -r ../src/* $TMPMOUNT +sudo cp -rf ../src/Kernel/KStart16.ZC $TMPMOUNT/Kernel/ +sudo cp -rf ../src/Kernel/KernelA.HH $TMPMOUNT/Kernel/ umount_tempdisk -echo "Generating ISO..." -qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -device isa-debug-exit +echo "Rebuilding kernel headers ..." +qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -smp 4 -device isa-debug-exit -echo "Extracting ISO from vdisk..." -rm ./ZealOS-*.iso 2> /dev/null # comment this line if you want lingering old ISOs +echo "Copying all kernel code into vdisk ..." +rm ../src/Home/Registry.ZC 2> /dev/null +rm ../src/Home/MakeHome.ZC 2> /dev/null mount_tempdisk -cp $TMPMOUNT/Tmp/MyDistro.ISO.C ./ZealOS-$(date +%Y-%m-%d-%H_%M_%S).iso +sudo cp -rf ../src/Kernel/* $TMPMOUNT/Kernel/ umount_tempdisk -echo "Deleting temp folder..." -rm -rf $TMPDIR -echo "Finished." -ls -lh ZealOS-*.iso +echo "Rebuilding kernel..." +qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -smp 4 -device isa-debug-exit +echo "Copying all src/ code into vdisk ..." +rm ../src/Home/Registry.ZC 2> /dev/null +rm ../src/Home/MakeHome.ZC 2> /dev/null +rm ../src/Boot/Kernel.ZXE 2> /dev/null +mount_tempdisk +sudo cp -r ../src/* $TMPMOUNT + +if [ ! -d "limine" ]; then + git clone https://github.com/limine-bootloader/limine.git --branch=v3.0-branch-binary --depth=1 + make -C limine +fi + +sudo mkdir -p $TMPMOUNT/EFI/BOOT +sudo cp limine/BOOTX64.EFI $TMPMOUNT/EFI/BOOT/BOOTX64.EFI +sudo cp limine/limine.sys $TMPMOUNT/ +sudo cp ../zealbooter/zealbooter.elf $TMPMOUNT/Boot/ZealBooter.ELF +umount_tempdisk + +if [ ! -d "ovmf" ]; then + echo "Downloading OVMF..." + mkdir ovmf + cd ovmf + curl -o OVMF-X64.zip https://efi.akeo.ie/OVMF/OVMF-X64.zip + 7z x OVMF-X64.zip + cd .. +fi + +./limine/limine-deploy $TMPDISK + +echo "Building Distro ISO ..." +qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -bios ovmf/OVMF.fd -smp 4 -device isa-debug-exit + +mount_tempdisk +echo "Extracting MyDistro ISO from vdisk ..." +cp $TMPMOUNT/Tmp/MyDistro.ISO.C ./ZealOS-MyDistro.iso +echo "Setting up temp ISO directory contents for use with limine xorriso command ..." +sudo cp -rf $TMPMOUNT/* $TMPISODIR +sudo cp limine/limine-cd-efi.bin $TMPISODIR/Boot/ +sudo cp limine/limine-cd.bin $TMPISODIR/Boot/ +sudo cp limine/limine.sys $TMPISODIR/ +sudo cp $TMPMOUNT/limine.cfg $TMPISODIR/limine.cfg +sudo rm -rf $TMPISODIR/EFI +sudo cp -rf ../zealbooter/zealbooter.elf $TMPISODIR/Boot/ZealBooter.ELF +echo "Copying DVDKernel.ZXE over ISO Boot/Kernel.ZXE ..." +sudo mv $TMPMOUNT/Tmp/DVDKernel.ZXE $TMPISODIR/Boot/Kernel.ZXE +umount_tempdisk + +sudo ls $TMPISODIR -al +mv $TMPDISK ./ZealOS-UEFI-limine-dev.raw + +xorriso -as mkisofs -b Boot/limine-cd.bin \ + -no-emul-boot -boot-load-size 4 -boot-info-table \ + --efi-boot Boot/limine-cd-efi.bin \ + -efi-boot-part --efi-boot-image --protective-msdos-label \ + $TMPISODIR -o ZealOS-UEFI-limine-dev.iso + +./limine/limine-deploy ZealOS-UEFI-limine-dev.iso + +echo "Testing limine-zealbooter-xorriso isohybrid boot in UEFI mode ..." +qemu-system-x86_64 -machine q35,accel=kvm -m 1G -rtc base=localtime -bios ovmf/OVMF.fd -smp 4 -cdrom ZealOS-UEFI-limine-dev.iso +echo "Testing limine-zealbooter-xorriso isohybrid boot in BIOS mode ..." +qemu-system-x86_64 -machine q35,accel=kvm -m 1G -rtc base=localtime -smp 4 -cdrom ZealOS-UEFI-limine-dev.iso + +echo "Testing native ZealC MyDistro legacy ISO in BIOS mode ..." +qemu-system-x86_64 -machine q35,accel=kvm -m 1G -rtc base=localtime -smp 4 -cdrom ZealOS-MyDistro.iso + +rm ./ZealOS-2*.iso 2> /dev/null # comment this line if you want lingering old Distro ISOs +mv ./ZealOS-MyDistro.iso ./ZealOS-$(date +%Y-%m-%d-%H_%M_%S).iso + +echo "Testing temp vdisk in UEFI mode ..." +qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=ZealOS-UEFI-limine-dev.raw -m 1G -rtc base=localtime -bios ovmf/OVMF.fd -smp 4 +echo "Testing temp vdisk in BIOS mode ..." +qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=ZealOS-UEFI-limine-dev.raw -m 1G -rtc base=localtime -smp 4 + +echo "Deleting temp folder ..." +sudo rm -rf $TMPDIR +sudo rm -rf $TMPISODIR +echo "Finished." diff --git a/build/build-temp-vm-uefi-iso.sh b/build/build-temp-vm-uefi-iso.sh deleted file mode 100755 index e1058e84..00000000 --- a/build/build-temp-vm-uefi-iso.sh +++ /dev/null @@ -1,132 +0,0 @@ -#!/bin/sh - -# Build OS using AUTO.ISO minimal auto-install as bootstrap to merge codebase, recompile system, attempt build limine UEFI hybrid ISO - -# make sure we are in the correct directory -SCRIPT_DIR=$(realpath "$(dirname "$0")") -SCRIPT_NAME=$(basename "$0") -EXPECTED_DIR=$(realpath "$PWD") - -if test "${EXPECTED_DIR}" != "${SCRIPT_DIR}" -then - ( cd "$SCRIPT_DIR" || exit ; "./$SCRIPT_NAME" "$@" ); - exit -fi - -# Uncomment if you use doas instead of sudo -#alias sudo=doas - -TMPDIR="/tmp/zealtmp" -TMPISODIR="$TMPDIR/iso" -TMPDISK="$TMPDIR/ZealOS.raw" -TMPMOUNT="$TMPDIR/mnt" - -mount_tempdisk() { - sudo modprobe nbd - sudo qemu-nbd -c /dev/nbd0 -f raw $TMPDISK - sudo partprobe /dev/nbd0 - sudo mount /dev/nbd0p1 $TMPMOUNT -} - -umount_tempdisk() { - sync - sudo umount $TMPMOUNT - sudo qemu-nbd -d /dev/nbd0 -} - -[ ! -d $TMPMOUNT ] && mkdir -p $TMPMOUNT -[ ! -d $TMPISODIR ] && mkdir -p $TMPISODIR -set -e - -echo "Building ZealBooter..." -( cd ../zealbooter && make clean all ) - -set +e - -echo "Making temp vdisk, running auto-install..." -qemu-img create -f raw $TMPDISK 192M -qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -smp 4 -cdrom AUTO-VM.ISO -device isa-debug-exit - -echo "Mounting vdisk, copying src/Kernel/KStart16.ZC and src/Kernel/KernelA.HH ..." -rm ../src/Home/Registry.ZC 2> /dev/null -rm ../src/Home/MakeHome.ZC 2> /dev/null -mount_tempdisk -sudo cp -rf ../src/Kernel/KStart16.ZC $TMPMOUNT/Kernel/ -sudo cp -rf ../src/Kernel/KernelA.HH $TMPMOUNT/Kernel/ -umount_tempdisk - -echo "Rebuilding kernel headers..." -qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -smp 4 -device isa-debug-exit - -echo "Mounting vdisk, copying all src/ kernel code..." -rm ../src/Home/Registry.ZC 2> /dev/null -rm ../src/Home/MakeHome.ZC 2> /dev/null -mount_tempdisk -sudo cp -rf ../src/Kernel/* $TMPMOUNT/Kernel/ -umount_tempdisk - -echo "Rebuilding kernel..." -qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -smp 4 -device isa-debug-exit - -echo "Mounting vdisk and copying all src/ code..." -rm ../src/Home/Registry.ZC 2> /dev/null -rm ../src/Home/MakeHome.ZC 2> /dev/null -rm ../src/Boot/Kernel.ZXE 2> /dev/null -mount_tempdisk -sudo cp -r ../src/* $TMPMOUNT - -if [ ! -d "limine" ]; then - git clone https://github.com/limine-bootloader/limine.git --branch=v3.0-branch-binary --depth=1 - make -C limine -fi - -sudo mkdir -p $TMPMOUNT/EFI/BOOT -sudo cp limine/BOOTX64.EFI $TMPMOUNT/EFI/BOOT/BOOTX64.EFI -sudo cp limine/limine.sys $TMPMOUNT/ -sudo cp ../zealbooter/zealbooter.elf $TMPMOUNT/Boot/ZealBooter.ELF -umount_tempdisk - -if [ ! -d "ovmf" ]; then - echo "Downloading OVMF..." - mkdir ovmf - cd ovmf - curl -o OVMF-X64.zip https://efi.akeo.ie/OVMF/OVMF-X64.zip - 7z x OVMF-X64.zip - cd .. -fi - -./limine/limine-deploy $TMPDISK - -echo "Rebuilding kernel and OS..." -qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -bios ovmf/OVMF.fd -smp 4 -device isa-debug-exit - -mount_tempdisk -sudo cp -rf $TMPMOUNT/* $TMPISODIR -sudo cp limine/limine-cd-efi.bin $TMPISODIR/Boot/ -sudo cp limine/limine-cd.bin $TMPISODIR/Boot/ -sudo cp limine/limine.sys $TMPISODIR/ -sudo cp $TMPMOUNT/limine.cfg $TMPISODIR/limine.cfg -sudo rm -rf $TMPISODIR/EFI -sudo cp -rf ../zealbooter/zealbooter.elf $TMPISODIR/Boot/ZealBooter.ELF -umount_tempdisk - -sudo ls $TMPISODIR -al - -xorriso -as mkisofs -b Boot/limine-cd.bin \ - -no-emul-boot -boot-load-size 4 -boot-info-table \ - --efi-boot Boot/limine-cd-efi.bin \ - -efi-boot-part --efi-boot-image --protective-msdos-label \ - $TMPISODIR -o ZealOS-UEFI-limine-dev.iso - -./limine/limine-deploy ZealOS-UEFI-limine-dev.iso - -echo "Testing UEFI ISO boot ..." -qemu-system-x86_64 -machine q35,accel=kvm -m 1G -rtc base=localtime -bios ovmf/OVMF.fd -smp 4 -cdrom ZealOS-UEFI-limine-dev.iso -echo "Testing BIOS ISO boot ..." -qemu-system-x86_64 -machine q35,accel=kvm -m 1G -rtc base=localtime -smp 4 -cdrom ZealOS-UEFI-limine-dev.iso - -echo "Deleting temp folder..." -sudo rm -rf $TMPDIR -sudo rm -rf $TMPISODIR -echo "Finished." - diff --git a/build/build-temp-vm-uefi.sh b/build/build-temp-vm-uefi.sh deleted file mode 100755 index 2c293ec6..00000000 --- a/build/build-temp-vm-uefi.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/sh - -# Build OS using AUTO.ISO minimal auto-install as bootstrap to merge codebase, recompile system, and start temporary VM - -# make sure we are in the correct directory -SCRIPT_DIR=$(realpath "$(dirname "$0")") -SCRIPT_NAME=$(basename "$0") -EXPECTED_DIR=$(realpath "$PWD") - -if test "${EXPECTED_DIR}" != "${SCRIPT_DIR}" -then - ( cd "$SCRIPT_DIR" || exit ; "./$SCRIPT_NAME" "$@" ); - exit -fi - -# Uncomment if you use doas instead of sudo -#alias sudo=doas - -TMPDIR="/tmp/zealtmp" -TMPDISK="$TMPDIR/ZealOS.raw" -TMPMOUNT="$TMPDIR/mnt" - -mount_tempdisk() { - sudo modprobe nbd - sudo qemu-nbd -c /dev/nbd0 -f raw $TMPDISK - sudo partprobe /dev/nbd0 - sudo mount /dev/nbd0p1 $TMPMOUNT -} - -umount_tempdisk() { - sync - sudo umount $TMPMOUNT - sudo qemu-nbd -d /dev/nbd0 -} - -[ ! -d $TMPMOUNT ] && mkdir -p $TMPMOUNT - -set -e - -echo "Building ZealBooter..." -( cd ../zealbooter && make clean all ) - -set +e - -echo "Making temp vdisk, running auto-install..." -qemu-img create -f raw $TMPDISK 192M -qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -smp 4 -cdrom AUTO-VM.ISO -device isa-debug-exit - -echo "Mounting vdisk, copying src/Kernel/KStart16.ZC and src/Kernel/KernelA.HH ..." -rm ../src/Home/Registry.ZC 2> /dev/null -rm ../src/Home/MakeHome.ZC 2> /dev/null -mount_tempdisk -sudo cp -rf ../src/Kernel/KStart16.ZC $TMPMOUNT/Kernel/ -sudo cp -rf ../src/Kernel/KernelA.HH $TMPMOUNT/Kernel/ -umount_tempdisk - -echo "Rebuilding kernel headers..." -qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -smp 4 -device isa-debug-exit - -echo "Mounting vdisk, copying all src/ kernel code..." -rm ../src/Home/Registry.ZC 2> /dev/null -rm ../src/Home/MakeHome.ZC 2> /dev/null -mount_tempdisk -sudo cp -rf ../src/Kernel/* $TMPMOUNT/Kernel/ -umount_tempdisk - -echo "Rebuilding kernel..." -qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -smp 4 -device isa-debug-exit - -echo "Mounting vdisk and copying all src/ code..." -rm ../src/Home/Registry.ZC 2> /dev/null -rm ../src/Home/MakeHome.ZC 2> /dev/null -rm ../src/Boot/Kernel.ZXE 2> /dev/null -mount_tempdisk -sudo cp -r ../src/* $TMPMOUNT - -if [ ! -d "limine" ]; then - git clone https://github.com/limine-bootloader/limine.git --branch=v3.0-branch-binary --depth=1 - make -C limine -fi - -sudo mkdir -p $TMPMOUNT/EFI/BOOT -sudo cp limine/BOOTX64.EFI $TMPMOUNT/EFI/BOOT/BOOTX64.EFI -sudo cp limine/limine.sys $TMPMOUNT/ -sudo cp ../zealbooter/zealbooter.elf $TMPMOUNT/Boot/ZealBooter.ELF -umount_tempdisk - -if [ ! -d "ovmf" ]; then - echo "Downloading OVMF..." - mkdir ovmf - cd ovmf - curl -o OVMF-X64.zip https://efi.akeo.ie/OVMF/OVMF-X64.zip - 7z x OVMF-X64.zip - cd .. -fi - -./limine/limine-deploy $TMPDISK - -echo "Rebuilding kernel and OS..." -qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -bios ovmf/OVMF.fd -smp 4 -device isa-debug-exit - -mv $TMPDISK ./ZealOS-UEFI-limine-dev.raw - -echo "Testing UEFI..." -qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=ZealOS-UEFI-limine-dev.raw -m 1G -rtc base=localtime -bios ovmf/OVMF.fd -smp 4 -echo "Testing BIOS..." -qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=ZealOS-UEFI-limine-dev.raw -m 1G -rtc base=localtime -smp 4 - -echo "Deleting temp folder..." -rm -rf $TMPDIR -echo "Finished." - diff --git a/src/Kernel/KStart16.ZC b/src/Kernel/KStart16.ZC index 57e7b178..b3d9dbaf 100755 --- a/src/Kernel/KStart16.ZC +++ b/src/Kernel/KStart16.ZC @@ -60,8 +60,8 @@ SYS_SMBIOS_ENTRY:: DU64 0; #assert $$ - SYS_KERNEL == sizeof(CKernel) - sizeof(CZXE) -REQUESTED_SCREEN_WIDTH: DU16 1920; -REQUESTED_SCREEN_HEIGHT: DU16 1080; +REQUESTED_SCREEN_WIDTH: DU16 1024; +REQUESTED_SCREEN_HEIGHT: DU16 768; VBE_TEMP_MODE: DU8 sizeof(CVBEMode) DUP(0); VBE_INFO: DU8 sizeof(CVBEInfo) DUP(0); diff --git a/src/Misc/Auto/AutoFullDistro0.ZC b/src/Misc/Auto/AutoFullDistro0.ZC index e0514165..423786c0 100755 --- a/src/Misc/Auto/AutoFullDistro0.ZC +++ b/src/Misc/Auto/AutoFullDistro0.ZC @@ -22,10 +22,6 @@ U0 Auto() in_str = MStrPrint("Sleep(700);In(\"CC\\n%d\\n\\n\\n\\n\");", ata_port); OnceDrive('C', in_str); Free(in_str); -// in_str = MStrPrint("BootHDIns;OnceFlush;Once(\"#include \\\"/Misc/Auto/AutoFullDistro1\\\";;Auto;\");Reboot;"); -// in_str = MStrPrint("BootHDIns;OnceFlush;Reboot;"); -// in_str = MStrPrint("BootHDIns;OnceFlush;OutU8(0x501,0x31);"); -// in_str = MStrPrint("BootHDIns;OnceFlush;Once(\"Sleep(700);In(\\\"CC\\\\n%d\\\\n\\\\n1024\\\\n768\\\\n\\\\n\\\\n\\\");OutU8(0x501,0x31);\");OutU8(0x501,0x31);"); in_str = MStrPrint("BootHDIns;OnceFlush;Once(\"#include \\\"/Misc/Auto/AutoFullDistro00\\\";;Auto;\");OutU8(0x501,0x31);"); OnceDrive('C', in_str); OutU8(0x501,0x31); diff --git a/src/Misc/Auto/AutoFullDistro00.ZC b/src/Misc/Auto/AutoFullDistro00.ZC index fc237ca2..1dddeb74 100755 --- a/src/Misc/Auto/AutoFullDistro00.ZC +++ b/src/Misc/Auto/AutoFullDistro00.ZC @@ -18,22 +18,12 @@ U0 Auto() } } -// BootMHDIns('C'); -// in_str = MStrPrint("Sleep(700);In(\"CC\\n%d\\n\\n1024\\n768\\n\\n\\n\");", ata_port); in_str = MStrPrint("CC\n%d\n\n\n\n", ata_port); Sleep(700); In(in_str); -// OnceDrive('C', in_str); -// Free(in_str); -// in_str = MStrPrint("BootHDIns;OnceFlush;Once(\"#include \\\"/Misc/Auto/AutoFullDistro1\\\";;Auto;\");Reboot;"); -// in_str = MStrPrint("BootHDIns;OnceFlush;Reboot;"); -// in_str = MStrPrint("BootHDIns;OnceFlush;OutU8(0x501,0x31);"); -// in_str = MStrPrint("BootHDIns;OnceFlush;Once(\"Sleep(700);In(\\\"CC\\\\n%d\\\\n\\\\n1024\\\\n768\\\\n\\\\n\\\\n\\\");OutU8(0x501,0x31);\");OutU8(0x501,0x31);"); -// in_str = MStrPrint("BootHDIns;OnceFlush;Once(\"#include \\\"/Misc/Auto/AutoFullDistro00\\\";;Auto;\");OutU8(0x501,0x31);"); -// OnceDrive('C', in_str); BootHDIns; OnceFlush; - in_str = MStrPrint("#include \"/Misc/Auto/AutoFullDistro000\";;Auto;OutU8(0x501,0x31);"); + in_str = MStrPrint("#include \"/Misc/Auto/AutoFullDistro1\";;Auto;;"); OnceDrive('C', in_str); OutU8(0x501,0x31); } diff --git a/src/Misc/Auto/AutoFullDistro000.ZC b/src/Misc/Auto/AutoFullDistro000.ZC deleted file mode 100755 index a0f6c2a0..00000000 --- a/src/Misc/Auto/AutoFullDistro000.ZC +++ /dev/null @@ -1,40 +0,0 @@ -U0 Auto() -{ - I64 i, ata_port = -1; - CAHCIPort *port; - U8 *in_str; - - for (i = 0; i < AHCI_MAX_PORTS; i++) - - { - if (Bt(&blkdev.ahci_hba->ports_implemented, i)) - { - port = &blkdev.ahci_hba->ports[i]; - if (port->signature == AHCI_PxSIG_ATA) - { - ata_port = i; - break; - } - } - } - -// BootMHDIns('C'); -// in_str = MStrPrint("Sleep(700);In(\"CC\\n%d\\n\\n1024\\n768\\n\\n\\n\");", ata_port); - in_str = MStrPrint("CC\n%d\n\n\n\n", ata_port); - Sleep(700); - In(in_str); -// OnceDrive('C', in_str); -// Free(in_str); -// in_str = MStrPrint("BootHDIns;OnceFlush;Once(\"#include \\\"/Misc/Auto/AutoFullDistro1\\\";;Auto;\");Reboot;"); -// in_str = MStrPrint("BootHDIns;OnceFlush;Reboot;"); -// in_str = MStrPrint("BootHDIns;OnceFlush;OutU8(0x501,0x31);"); -// in_str = MStrPrint("BootHDIns;OnceFlush;Once(\"Sleep(700);In(\\\"CC\\\\n%d\\\\n\\\\n1024\\\\n768\\\\n\\\\n\\\\n\\\");OutU8(0x501,0x31);\");OutU8(0x501,0x31);"); -// in_str = MStrPrint("BootHDIns;OnceFlush;Once(\"#include \\\"/Misc/Auto/AutoFullDistro00\\\";;Auto;\");OutU8(0x501,0x31);"); -// OnceDrive('C', in_str); - BootHDIns; - OnceFlush; -// in_str = MStrPrint("Once(\"#include \\\"/Misc/Auto/AutoFullDistro000\\\";;Auto;\");OutU8(0x501,0x31);"); -// OnceDrive('C', in_str); - OutU8(0x501,0x31); -} -Auto; diff --git a/src/Misc/Auto/AutoFullDistro2.ZC b/src/Misc/Auto/AutoFullDistro2.ZC index 9dcf023f..962128f6 100755 --- a/src/Misc/Auto/AutoFullDistro2.ZC +++ b/src/Misc/Auto/AutoFullDistro2.ZC @@ -64,6 +64,8 @@ U0 MakeMyISO() //If CD-ROM use MT_CD instead of MT_DVD. //DVDImageWrite('T',out_iso_filename,MT_DVD); //Uncomment to burn. + Copy("/Distro" BOOT_DIR_KERNEL_ZXE, "/Tmp/DVD" KERNEL_ZXE); + DelTree("/Distro"); ProgressBarsReset; Free(out_iso_filename);