summaryrefslogtreecommitdiffhomepage
path: root/Boot
diff options
context:
space:
mode:
Diffstat (limited to 'Boot')
-rw-r--r--Boot/BootKit/BitManip.hxx2
-rw-r--r--Boot/BootKit/BootKit.hxx2
-rw-r--r--Boot/BootKit/Device.hxx2
-rw-r--r--Boot/BootKit/EPM.hxx2
-rw-r--r--Boot/BootKit/HW/ATA.hxx2
-rw-r--r--Boot/BootKit/HW/SATA.hxx2
-rw-r--r--Boot/BootKit/Platform.hxx2
-rw-r--r--Boot/BootKit/Protocol.hxx2
-rw-r--r--Boot/BootKit/Vendor/Qr.hxx4
-rw-r--r--Boot/BootKit/Vendor/Support.hxx2
-rw-r--r--Boot/NetBoot/Module.cxx4
-rw-r--r--Boot/NetBoot/NetBoot.hxx17
-rw-r--r--Boot/ReadMe.md2
-rw-r--r--Boot/Sources/BootloaderRsrc.rsrc6
-rw-r--r--Boot/Sources/HEL/AMD64/BootAHCI.cxx4
-rw-r--r--Boot/Sources/HEL/AMD64/BootATA.cxx4
-rw-r--r--Boot/Sources/HEL/AMD64/BootFileReader.cxx2
-rw-r--r--Boot/Sources/HEL/AMD64/BootMain.cxx44
-rw-r--r--Boot/Sources/HEL/AMD64/BootPlatform.cxx2
-rw-r--r--Boot/Sources/HEL/AMD64/BootString.cxx2
-rw-r--r--Boot/Sources/HEL/AMD64/BootTextWriter.cxx2
-rw-r--r--Boot/Sources/HEL/AMD64/New+Delete.cxx2
-rw-r--r--Boot/Sources/HEL/AMD64/Support.cxx2
-rw-r--r--Boot/Sources/HEL/POWER/CoreBootStartup.S2
-rw-r--r--Boot/Sources/HEL/RISCV/BootRISCV.S2
-rw-r--r--Boot/Sources/Root/SplashScreen.fmt6
-rw-r--r--Boot/makefile10
27 files changed, 85 insertions, 50 deletions
diff --git a/Boot/BootKit/BitManip.hxx b/Boot/BootKit/BitManip.hxx
index cef6c875..f1ae048f 100644
--- a/Boot/BootKit/BitManip.hxx
+++ b/Boot/BootKit/BitManip.hxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
diff --git a/Boot/BootKit/BootKit.hxx b/Boot/BootKit/BootKit.hxx
index 311d6c7f..3eab16cb 100644
--- a/Boot/BootKit/BootKit.hxx
+++ b/Boot/BootKit/BootKit.hxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
diff --git a/Boot/BootKit/Device.hxx b/Boot/BootKit/Device.hxx
index 215c10b6..d7ac7a74 100644
--- a/Boot/BootKit/Device.hxx
+++ b/Boot/BootKit/Device.hxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
diff --git a/Boot/BootKit/EPM.hxx b/Boot/BootKit/EPM.hxx
index 0cefad5d..e29342a8 100644
--- a/Boot/BootKit/EPM.hxx
+++ b/Boot/BootKit/EPM.hxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
diff --git a/Boot/BootKit/HW/ATA.hxx b/Boot/BootKit/HW/ATA.hxx
index d9b251f5..6d7c0894 100644
--- a/Boot/BootKit/HW/ATA.hxx
+++ b/Boot/BootKit/HW/ATA.hxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
diff --git a/Boot/BootKit/HW/SATA.hxx b/Boot/BootKit/HW/SATA.hxx
index bbb65ec0..c4dca4c0 100644
--- a/Boot/BootKit/HW/SATA.hxx
+++ b/Boot/BootKit/HW/SATA.hxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
diff --git a/Boot/BootKit/Platform.hxx b/Boot/BootKit/Platform.hxx
index 14a1fa54..b1a95193 100644
--- a/Boot/BootKit/Platform.hxx
+++ b/Boot/BootKit/Platform.hxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
diff --git a/Boot/BootKit/Protocol.hxx b/Boot/BootKit/Protocol.hxx
index 3d9fd9f8..7a2ffb3a 100644
--- a/Boot/BootKit/Protocol.hxx
+++ b/Boot/BootKit/Protocol.hxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
diff --git a/Boot/BootKit/Vendor/Qr.hxx b/Boot/BootKit/Vendor/Qr.hxx
index 3bafc09f..7e1e85ed 100644
--- a/Boot/BootKit/Vendor/Qr.hxx
+++ b/Boot/BootKit/Vendor/Qr.hxx
@@ -9,7 +9,7 @@
#include <BootKit/Vendor/Shared/bit.h>
#include <BootKit/Vendor/QrPrelude.hxx>
-#include <Builtins/Toolbox/Toolbox.hxx>
+#include <Builtins/GX/GX>
#include <BootKit/Vendor/Support.hxx>
#include <CompilerKit/Detail.hxx>
@@ -371,7 +371,7 @@ namespace qr
{
for (int x = 0; x < (this->side_size()); ++x)
{
- ToolboxDrawZone(
+ GXDraw(
(this->module(x, y) ? RGB(00, 00, 00) : RGB(FF, FF, FF)),
1, 1,
x + whereX, y + whereY);
diff --git a/Boot/BootKit/Vendor/Support.hxx b/Boot/BootKit/Vendor/Support.hxx
index 6a480779..eed59424 100644
--- a/Boot/BootKit/Vendor/Support.hxx
+++ b/Boot/BootKit/Vendor/Support.hxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
diff --git a/Boot/NetBoot/Module.cxx b/Boot/NetBoot/Module.cxx
index 57841904..472b9a5b 100644
--- a/Boot/NetBoot/Module.cxx
+++ b/Boot/NetBoot/Module.cxx
@@ -2,7 +2,7 @@
* ========================================================
*
* NetBoot
- * Copyright SoftwareLabs, all rights reserved.
+ * Copyright Zeta Electronics Corporation, all rights reserved.
*
* ========================================================
*/
@@ -12,7 +12,7 @@
EXTERN_C Int32 ModuleMain(Void)
{
- /// - Find a network drive called "/Remote/NewOSKrnl"
+ /// - Find a network drive called "/Remote/newoskrnl"
/// - Download our image
/// - Boot from it.
diff --git a/Boot/NetBoot/NetBoot.hxx b/Boot/NetBoot/NetBoot.hxx
index d45f1de1..ccb43290 100644
--- a/Boot/NetBoot/NetBoot.hxx
+++ b/Boot/NetBoot/NetBoot.hxx
@@ -2,7 +2,7 @@
* ========================================================
*
* NetBoot
- * Copyright SoftwareLabs, all rights reserved.
+ * Copyright Zeta Electronics Corporation, all rights reserved.
*
* ========================================================
*/
@@ -10,3 +10,18 @@
#pragma once
#include <NewKit/Defines.hpp>
+
+/// @brief the internet header is used to download updates OTA.
+typedef struct NetBootInternetHeader
+{
+ CharacterTypeUTF8 NB1; /// magic char 1 'N'
+ CharacterTypeUTF8 NB2; /// magic char 2 'E'
+ CharacterTypeUTF8 NB3; /// magic char 3 'T'
+ CharacterTypeUTF8 NB4; /// magic char 4 'B'
+
+ CharacterTypeUTF8 PatchName[255]; /// example: ColdChoco
+ NewOS::Int32 PatchLength; /// the patch length.
+ CharacterTypeUTF8 PatchTarget[255]; /// the target file.
+ NewOS::Boolean ImpliesROM; /// does it implies EEPROM patching?
+} NetBootInternetHeader;
+
diff --git a/Boot/ReadMe.md b/Boot/ReadMe.md
index ce5b30cd..bc278a72 100644
--- a/Boot/ReadMe.md
+++ b/Boot/ReadMe.md
@@ -17,4 +17,4 @@ And execute:
make all
```
-##### Copyright, SoftwareLabs, all rights reserved.
+##### Copyright, Zeta Electronics Corporation, all rights reserved.
diff --git a/Boot/Sources/BootloaderRsrc.rsrc b/Boot/Sources/BootloaderRsrc.rsrc
index 857e08e4..92ff177f 100644
--- a/Boot/Sources/BootloaderRsrc.rsrc
+++ b/Boot/Sources/BootloaderRsrc.rsrc
@@ -1,6 +1,6 @@
#include "../../Kernel/CompilerKit/Version.hxx"
-1 ICON "../../Kernel/Root/Boot/Icons/boot-logo.ico"
+1 ICON "../../Icons/boot-logo.ico"
1 VERSIONINFO
FILEVERSION 1,0,0,0
@@ -10,11 +10,11 @@ BEGIN
BEGIN
BLOCK "080904E4"
BEGIN
- VALUE "CompanyName", "SoftwareLabs"
+ VALUE "CompanyName", "Zeta Electronics Corporation"
VALUE "FileDescription", "New OS multi-platform bootloader."
VALUE "FileVersion", BOOTLOADER_VERSION
VALUE "InternalName", "newosldr"
- VALUE "LegalCopyright", "Copyright SoftwareLabs, all rights reserved."
+ VALUE "LegalCopyright", "Copyright Zeta Electronics Corporation, all rights reserved."
VALUE "OriginalFilename", "newosldr.exe"
VALUE "ProductName", "newosldr"
VALUE "ProductVersion", BOOTLOADER_VERSION
diff --git a/Boot/Sources/HEL/AMD64/BootAHCI.cxx b/Boot/Sources/HEL/AMD64/BootAHCI.cxx
index d60b91fd..7d07f8f0 100644
--- a/Boot/Sources/HEL/AMD64/BootAHCI.cxx
+++ b/Boot/Sources/HEL/AMD64/BootAHCI.cxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
@@ -11,7 +11,7 @@
* @version 0.1
* @date 2024-02-02
*
- * @copyright Copyright (c) SoftwareLabs
+ * @copyright Copyright (c) Zeta Electronics Corporation
*
*/
diff --git a/Boot/Sources/HEL/AMD64/BootATA.cxx b/Boot/Sources/HEL/AMD64/BootATA.cxx
index d2753110..55a55a0c 100644
--- a/Boot/Sources/HEL/AMD64/BootATA.cxx
+++ b/Boot/Sources/HEL/AMD64/BootATA.cxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
@@ -11,7 +11,7 @@
* @version 0.1
* @date 2024-02-02
*
- * @copyright Copyright (c) SoftwareLabs
+ * @copyright Copyright (c) Zeta Electronics Corporation
*
*/
diff --git a/Boot/Sources/HEL/AMD64/BootFileReader.cxx b/Boot/Sources/HEL/AMD64/BootFileReader.cxx
index e6e70509..b5498cf9 100644
--- a/Boot/Sources/HEL/AMD64/BootFileReader.cxx
+++ b/Boot/Sources/HEL/AMD64/BootFileReader.cxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
File: FileReader.cxx
Purpose: New Boot FileReader,
diff --git a/Boot/Sources/HEL/AMD64/BootMain.cxx b/Boot/Sources/HEL/AMD64/BootMain.cxx
index cb8bccba..5ab7914a 100644
--- a/Boot/Sources/HEL/AMD64/BootMain.cxx
+++ b/Boot/Sources/HEL/AMD64/BootMain.cxx
@@ -1,12 +1,12 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
#include <BootKit/BootKit.hxx>
#include <BootKit/Rsrc/NewBoot.rsrc>
-#include <Builtins/Toolbox/Toolbox.hxx>
+#include <Builtins/GX/GX>
#include <FirmwareKit/EFI.hxx>
#include <FirmwareKit/EFI/API.hxx>
#include <FirmwareKit/Handover.hxx>
@@ -19,9 +19,17 @@
/// make the compiler shut up.
#ifndef kMachineModel
-#define kMachineModel "NeWS HD"
+#define kMachineModel "Zeta HD"
#endif // !kMachineModel
+#ifndef cExpectedWidth
+#define cExpectedWidth 436
+#endif
+
+#ifndef cExpectedHeight
+#define cExpectedHeight 644
+#endif
+
/** Graphics related. */
STATIC EfiGraphicsOutputProtocol* kGop = nullptr;
@@ -34,7 +42,7 @@ EXTERN_C Void hal_init_platform(HEL::HandoverInformationHeader* HIH);
@brief Finds and stores the GOP.
*/
-STATIC Void CheckAndFindFramebuffer() noexcept
+STATIC Void InitVideoFB() noexcept
{
kGopGuid = EfiGUID(EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID);
kGop = nullptr;
@@ -43,6 +51,18 @@ STATIC Void CheckAndFindFramebuffer() noexcept
BS->LocateProtocol(&kGopGuid, nullptr, (VoidPtr*)&kGop);
+ for (size_t i = 0; i < kGop->Mode->MaxMode; ++i)
+ {
+ EfiGraphicsOutputProtocolModeInformation* infoPtr = nullptr;
+
+ if (infoPtr->HorizontalResolution == cExpectedWidth &&
+ infoPtr->VerticalResolution == cExpectedHeight)
+ {
+ kGop->SetMode(kGop, i);
+ break;
+ }
+ }
+
kStride = 4;
}
@@ -62,16 +82,16 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle,
EfiSystemTable* SystemTable)
{
InitEFI(SystemTable); ///! Init the EFI library.
- CheckAndFindFramebuffer(); ///! Init the GOP.
+ InitVideoFB(); ///! Init the GOP.
BTextWriter writer;
/// Splash screen stuff
- writer.Write(L"SoftwareLabs (R) newosldr: ")
+ writer.Write(L"Zeta Electronics Corporation (R) newosldr: ")
.Write(BVersionString::The());
- writer.Write(L"\rNew Boot: Firmware Vendor: ")
+ writer.Write(L"\rnewosldr: Firmware Vendor: ")
.Write(SystemTable->FirmwareVendor)
.Write(L"\r");
@@ -123,18 +143,18 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle,
kHandoverHeader = handoverHdrPtr;
- ToolboxInitRsrc();
+ GXInit();
- ToolboxDrawZone(RGB(9d, 9d, 9d), handoverHdrPtr->f_GOP.f_Height,
+ GXDraw(RGB(9d, 9d, 9d), handoverHdrPtr->f_GOP.f_Height,
handoverHdrPtr->f_GOP.f_Width, 0, 0);
- ToolboxClearRsrc();
+ GXFini();
- ToolboxDrawRsrc(NewBoot, NEWBOOT_HEIGHT, NEWBOOT_WIDTH,
+ GXDrawImg(NewBoot, NEWBOOT_HEIGHT, NEWBOOT_WIDTH,
(handoverHdrPtr->f_GOP.f_Width - NEWBOOT_WIDTH) / 2,
(handoverHdrPtr->f_GOP.f_Height - NEWBOOT_HEIGHT) / 2);
- ToolboxClearRsrc();
+ GXFini();
BS->GetMemoryMap(SizePtr, Descriptor, MapKey, SzDesc, RevDesc);
diff --git a/Boot/Sources/HEL/AMD64/BootPlatform.cxx b/Boot/Sources/HEL/AMD64/BootPlatform.cxx
index 866c4839..66fe2f8d 100644
--- a/Boot/Sources/HEL/AMD64/BootPlatform.cxx
+++ b/Boot/Sources/HEL/AMD64/BootPlatform.cxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
diff --git a/Boot/Sources/HEL/AMD64/BootString.cxx b/Boot/Sources/HEL/AMD64/BootString.cxx
index 54ab2c64..384cef33 100644
--- a/Boot/Sources/HEL/AMD64/BootString.cxx
+++ b/Boot/Sources/HEL/AMD64/BootString.cxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
File: String.cxx
Purpose: NewBoot string library
diff --git a/Boot/Sources/HEL/AMD64/BootTextWriter.cxx b/Boot/Sources/HEL/AMD64/BootTextWriter.cxx
index 90d12f3d..3006591a 100644
--- a/Boot/Sources/HEL/AMD64/BootTextWriter.cxx
+++ b/Boot/Sources/HEL/AMD64/BootTextWriter.cxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
File: String.cxx
Purpose: NewBoot string library
diff --git a/Boot/Sources/HEL/AMD64/New+Delete.cxx b/Boot/Sources/HEL/AMD64/New+Delete.cxx
index 6c025646..647cddb1 100644
--- a/Boot/Sources/HEL/AMD64/New+Delete.cxx
+++ b/Boot/Sources/HEL/AMD64/New+Delete.cxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
diff --git a/Boot/Sources/HEL/AMD64/Support.cxx b/Boot/Sources/HEL/AMD64/Support.cxx
index 22b01280..8ebfb2ff 100644
--- a/Boot/Sources/HEL/AMD64/Support.cxx
+++ b/Boot/Sources/HEL/AMD64/Support.cxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
diff --git a/Boot/Sources/HEL/POWER/CoreBootStartup.S b/Boot/Sources/HEL/POWER/CoreBootStartup.S
index ed39c3b5..e1a186ae 100644
--- a/Boot/Sources/HEL/POWER/CoreBootStartup.S
+++ b/Boot/Sources/HEL/POWER/CoreBootStartup.S
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
diff --git a/Boot/Sources/HEL/RISCV/BootRISCV.S b/Boot/Sources/HEL/RISCV/BootRISCV.S
index b682d597..2f1e9eb9 100644
--- a/Boot/Sources/HEL/RISCV/BootRISCV.S
+++ b/Boot/Sources/HEL/RISCV/BootRISCV.S
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright SoftwareLabs
+ Copyright Zeta Electronics Corporation
------------------------------------------- */
diff --git a/Boot/Sources/Root/SplashScreen.fmt b/Boot/Sources/Root/SplashScreen.fmt
index 42005568..4a851dc1 100644
--- a/Boot/Sources/Root/SplashScreen.fmt
+++ b/Boot/Sources/Root/SplashScreen.fmt
@@ -1,7 +1,7 @@
==================================================================
-Welcome to NeWS.
+Welcome to Zeta.
Brought to you by: Amlal EL Mahrouss.
* newosldr, newoskrnl: Amlal EL Mahrouss.
-This copy can boot directly to newoskrnl (Unified System).
-Copyright SoftwareLabs, all rights reserved.
+
+Copyright Zeta Electronics Corporation, all rights reserved.
==================================================================
diff --git a/Boot/makefile b/Boot/makefile
index e979c309..4bee19a2 100644
--- a/Boot/makefile
+++ b/Boot/makefile
@@ -1,5 +1,5 @@
##################################################
-# (C) SoftwareLabs, all rights reserved.
+# (C) Zeta Electronics Corporation, all rights reserved.
# This is the bootloader makefile.
##################################################
@@ -19,14 +19,14 @@ EMU=qemu-system-x86_64w
endif
ifeq ($(NEWS_MODEL), )
-NEWOS_MODEL=-DkMachineModel="\"Generic NeWS HD\""
+NEWOS_MODEL=-DkMachineModel="\"Generic Zeta HD\""
endif
BIOS=OVMF.fd
IMG=epm.img
IMG_2=epm-slave.img
-EMU_FLAGS=-net none -smp 2 -m 4G -M q35 \
+EMU_FLAGS=-net none -smp 4 -serial stdio -m 4G -M q35 \
-bios $(BIOS) -device piix3-ide,id=ide \
-drive id=disk,file=$(IMG),format=raw,if=none \
-device ide-hd,drive=disk,bus=ide.0 -drive \
@@ -74,14 +74,14 @@ compile-amd64:
$(RESCMD)
$(CC_GNU) $(NEWOS_MODEL) $(STANDALONE_MACRO) $(FLAG_GNU) $(DEBUG) \
$(wildcard Sources/HEL/AMD64/*.cxx) \
- $(wildcard Sources/HEL/AMD64/*.S)
+ $(wildcard Sources/HEL/AMD64/*.S)
$(wildcard Sources/*.cxx)
.PHONY: run-efi-amd64
run-efi-amd64:
$(EMU) $(EMU_FLAGS)
-# img_2 is the rescue disk. img is the bootable disk, as provided by the NeWS.
+# img_2 is the rescue disk. img is the bootable disk, as provided by the Zeta.
.PHONY: epm-img
epm-img:
qemu-img create -f raw $(IMG) 10G