diff --git a/build/AUTO.ISO b/build/AUTO.ISO index 362ed543..1516d807 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 2e742b38..e5132dd2 100755 --- a/build/build-iso.sh +++ b/build/build-iso.sh @@ -46,39 +46,19 @@ echo "Building ZealBooter..." set +e echo "Making temp vdisk, running auto-install ..." -qemu-img create -f raw $TMPDISK 192M +qemu-img create -f raw $TMPDISK 1024M 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 "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 -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 "Copying all kernel code into vdisk ..." -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 "Copying all src/ code into vdisk ..." +echo "Copying all src/ code into vdisk Tmp/OSBuild/ ..." 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 +sudo mkdir $TMPMOUNT/Tmp/OSBuild/ +sudo cp -r ../src/* $TMPMOUNT/Tmp/OSBuild umount_tempdisk -echo "Building Distro ISO ..." +echo "Rebuilding kernel headers, kernel, OS, and building Distro ISO ..." qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -smp 4 -device isa-debug-exit LIMINE_BINARY_BRANCH="v4.x-branch-binary" diff --git a/src/Misc/Auto/AutoFullDistro0.ZC b/src/Misc/Auto/AutoFullDistro0.ZC index 791b8b47..acf30208 100755 --- a/src/Misc/Auto/AutoFullDistro0.ZC +++ b/src/Misc/Auto/AutoFullDistro0.ZC @@ -18,11 +18,15 @@ U0 Auto() } } + WinMax; BootMHDIns('C'); 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/AutoFullDistro00\\\";;Auto;\");OutU8(0x501,0x31);"); + in_str = MStrPrint( "BootHDIns;" + "OnceFlush;" + "Once(\"#include \\\"/Misc/Auto/AutoFullDistro00\\\";;Auto;\");" + "Reboot;"); OnceDrive('C', in_str); OutU8(0x501,0x31); } diff --git a/src/Misc/Auto/AutoFullDistro00.ZC b/src/Misc/Auto/AutoFullDistro00.ZC index c9c58e39..dfdfb802 100755 --- a/src/Misc/Auto/AutoFullDistro00.ZC +++ b/src/Misc/Auto/AutoFullDistro00.ZC @@ -18,13 +18,20 @@ U0 Auto() } } + WinMax; + BootMHDIns('C'); + Copy("C:/Tmp/OSBuild/Kernel/KStart16.ZC", "C:/Kernel/"); + Copy("C:/Tmp/OSBuild/Kernel/KernelA.HH", "C:/Kernel/"); in_str = MStrPrint("CC\n%d\n\n\n\n", ata_port); Sleep(700); In(in_str); BootHDIns; OnceFlush; - in_str = MStrPrint("#include \"/Misc/Auto/AutoFullDistro1\";;Auto;;"); + Free(in_str); + in_str = MStrPrint( "OnceFlush;" + "Once(\"#include \\\"/Misc/Auto/AutoFullDistro000\\\";;Auto;\");" + "Reboot;"); OnceDrive('C', in_str); - OutU8(0x501,0x31); + Reboot; } Auto; diff --git a/src/Misc/Auto/AutoFullDistro000.ZC b/src/Misc/Auto/AutoFullDistro000.ZC new file mode 100755 index 00000000..df4c90ca --- /dev/null +++ b/src/Misc/Auto/AutoFullDistro000.ZC @@ -0,0 +1,36 @@ +U0 Auto() +{ + I64 i, ata_port = -1; + CAHCIPort *port; + U8 *in_str; + + for (i = 0; i < AHCI_MAX_PORTS; i++) + + { + if (PCIBt(&blkdev.ahci_hba->ports_implemented, i)) + { + port = &blkdev.ahci_hba->ports[i]; + if (port->signature == AHCI_PxSIG_ATA) + { + ata_port = i; + break; + } + } + } + + WinMax; + BootMHDIns('C'); + CopyTree("C:/Tmp/OSBuild/Kernel/", "C:/Kernel/"); + in_str = MStrPrint("CC\n%d\n\n\n\n", ata_port); + Sleep(700); + In(in_str); + BootHDIns; + OnceFlush; + Free(in_str); + in_str = MStrPrint( "OnceFlush;" + "Once(\"#include \\\"/Misc/Auto/AutoFullDistro0000\\\";;Auto;\");" + "Reboot;"); + OnceDrive('C', in_str); + Reboot; +} +Auto; diff --git a/src/Misc/Auto/AutoFullDistro0000.ZC b/src/Misc/Auto/AutoFullDistro0000.ZC new file mode 100755 index 00000000..a85d2fab --- /dev/null +++ b/src/Misc/Auto/AutoFullDistro0000.ZC @@ -0,0 +1,33 @@ +U0 Auto() +{ + I64 i, ata_port = -1; + CAHCIPort *port; + U8 *in_str; + + for (i = 0; i < AHCI_MAX_PORTS; i++) + + { + if (PCIBt(&blkdev.ahci_hba->ports_implemented, i)) + { + port = &blkdev.ahci_hba->ports[i]; + if (port->signature == AHCI_PxSIG_ATA) + { + ata_port = i; + break; + } + } + } + + WinMax; + CopyTree("C:/Tmp/OSBuild/", "C:/"); + in_str = MStrPrint("CC\n%d\n\n\n\n", ata_port); + Sleep(700); + In(in_str); + BootHDIns; + OnceFlush; + in_str = MStrPrint("#include \"/Misc/Auto/AutoFullDistro1\";;Auto;;"); + OnceDrive('C', in_str); + DelTree("C:/Tmp/OSBuild"); + Reboot; +} +Auto;