From 35cba707ba79740137586bc64db0227a6d89fcb0 Mon Sep 17 00:00:00 2001 From: Jeremiah Orians Date: Sat, 21 May 2016 20:12:34 -0400 Subject: [PATCH] Organized files and expanded notes --- .../exec_enable.hex | 0 .../exec_enable.s | 0 hex.c => Linux Bootstrap/hex.c | 0 hex0.hex => Linux Bootstrap/hex0.hex | 0 hex0.s => Linux Bootstrap/hex0.s | 0 read.hex => Linux Bootstrap/read.hex | 0 read.s => Linux Bootstrap/read.s | 0 test.sh => Linux Bootstrap/test.sh | 0 xeh1.hex => Linux Bootstrap/xeh1.hex | 0 xeh1.s => Linux Bootstrap/xeh1.s | 0 notes.org | 40 +++++++++++++++++++ .../stage0_monitor.hex | 0 stage0_monitor.s => stage0/stage0_monitor.s | 0 .../stage1_disk_copier.s | 0 .../stage1_hex_compiler.s | 0 .../stage1_hex_editor.s | 0 stage1_loader.hex => stage1/stage1_loader.hex | 0 stage1_loader.s => stage1/stage1_loader.s | 0 .../stage1_raw_writer.s | 0 19 files changed, 40 insertions(+) rename exec_enable.hex => Linux Bootstrap/exec_enable.hex (100%) rename exec_enable.s => Linux Bootstrap/exec_enable.s (100%) rename hex.c => Linux Bootstrap/hex.c (100%) rename hex0.hex => Linux Bootstrap/hex0.hex (100%) rename hex0.s => Linux Bootstrap/hex0.s (100%) rename read.hex => Linux Bootstrap/read.hex (100%) rename read.s => Linux Bootstrap/read.s (100%) rename test.sh => Linux Bootstrap/test.sh (100%) rename xeh1.hex => Linux Bootstrap/xeh1.hex (100%) rename xeh1.s => Linux Bootstrap/xeh1.s (100%) rename stage0_monitor.hex => stage0/stage0_monitor.hex (100%) rename stage0_monitor.s => stage0/stage0_monitor.s (100%) rename stage1_disk_copier.s => stage1/stage1_disk_copier.s (100%) rename stage1_hex_compiler.s => stage1/stage1_hex_compiler.s (100%) rename stage1_hex_editor.s => stage1/stage1_hex_editor.s (100%) rename stage1_loader.hex => stage1/stage1_loader.hex (100%) rename stage1_loader.s => stage1/stage1_loader.s (100%) rename stage1_raw_writer.s => stage1/stage1_raw_writer.s (100%) diff --git a/exec_enable.hex b/Linux Bootstrap/exec_enable.hex similarity index 100% rename from exec_enable.hex rename to Linux Bootstrap/exec_enable.hex diff --git a/exec_enable.s b/Linux Bootstrap/exec_enable.s similarity index 100% rename from exec_enable.s rename to Linux Bootstrap/exec_enable.s diff --git a/hex.c b/Linux Bootstrap/hex.c similarity index 100% rename from hex.c rename to Linux Bootstrap/hex.c diff --git a/hex0.hex b/Linux Bootstrap/hex0.hex similarity index 100% rename from hex0.hex rename to Linux Bootstrap/hex0.hex diff --git a/hex0.s b/Linux Bootstrap/hex0.s similarity index 100% rename from hex0.s rename to Linux Bootstrap/hex0.s diff --git a/read.hex b/Linux Bootstrap/read.hex similarity index 100% rename from read.hex rename to Linux Bootstrap/read.hex diff --git a/read.s b/Linux Bootstrap/read.s similarity index 100% rename from read.s rename to Linux Bootstrap/read.s diff --git a/test.sh b/Linux Bootstrap/test.sh similarity index 100% rename from test.sh rename to Linux Bootstrap/test.sh diff --git a/xeh1.hex b/Linux Bootstrap/xeh1.hex similarity index 100% rename from xeh1.hex rename to Linux Bootstrap/xeh1.hex diff --git a/xeh1.s b/Linux Bootstrap/xeh1.s similarity index 100% rename from xeh1.s rename to Linux Bootstrap/xeh1.s diff --git a/notes.org b/notes.org index 3b9c056..11d79a1 100644 --- a/notes.org +++ b/notes.org @@ -51,3 +51,43 @@ This repository contains a hex compiler written for Linux in hex and assembly as well as a platform independent C implementation. Then to complete the build process write to the master boot record of a floppy disk. Or should you desire simply use qemu to boot the compiled file directly. +* Creation journal +** Linux bootstrap +The initial prototyping was done on linux with the goal of not +requiring anything other than the linux kernel. +However it was pointed out to me that should a trusting trust attack be in the compiled kernel, +there would be no way to even trust the binaries produced by these programs. +That being said they may be of some use to you. + +** Stage 0 +Lacking a good basis for reducing the trusting trust attack, it was decided to reduce the scope down. +By writing the stage 0 code in commented hex, it becomes possible for universal cross compilation and verification. +The only real problem is that the commented hex has to be manually validated [An insanely painful process] and +each and every single platform has to perform the exact same tasks. +Since all such projects have to start somewhere, I have choosen to do it myself and with the 8088. + +To make my work easier, I first created the working code in 16bit assembly. Then after testing is validated, +I begin the pain staking process of manually converting the code to hex [With usually a dozen bugs along the way]. + +What I however require is someone with a completely alien platform verify the compiled hex for the stage0_monitor. +Which has the following checksum values: +md5: 9e29544f0220636437741cb5092cc411 +sha1: b26c72762d2f77d8634cb532d581c1e76adceb3f +sha256: 045ef96e1c8fb011cba89f268f823c06b21f91270fb9afb0af42a1ac8c3ee44b + +If your compiled hex is different in any way, please let me know as the process should produce bit idential binaries. + +** Stage 1 +Stage 1 attempts to save myself from alot of manual typing and the inevitable errors that occur. +It simply provides the functionality required to produce 32KB or smaller binaries from Commented Hex files. +This is a minor stopping point of functionality that provides a stable nub for our much more ambitious stages that come later. + +The editors lack the ability to correct mistakes and always writes a 64KB file onto the B: floppy. +The loader is so stupid is only loads 64KB from the A: Floppy and doesn't even prompt the user. + +However despite those stupid limitations, they have saved alot of manual work compared to stage0. +Having these binaries are a huge step forward compared to not having them but they assume you don't make mistakes. + +** Stage 2 +Stage 2 will be introducing enhancements to Stage 1 programs that allow you to fix the problems you accidentially introduce. +We will also begin to introduce programs that make software development alot easier. diff --git a/stage0_monitor.hex b/stage0/stage0_monitor.hex similarity index 100% rename from stage0_monitor.hex rename to stage0/stage0_monitor.hex diff --git a/stage0_monitor.s b/stage0/stage0_monitor.s similarity index 100% rename from stage0_monitor.s rename to stage0/stage0_monitor.s diff --git a/stage1_disk_copier.s b/stage1/stage1_disk_copier.s similarity index 100% rename from stage1_disk_copier.s rename to stage1/stage1_disk_copier.s diff --git a/stage1_hex_compiler.s b/stage1/stage1_hex_compiler.s similarity index 100% rename from stage1_hex_compiler.s rename to stage1/stage1_hex_compiler.s diff --git a/stage1_hex_editor.s b/stage1/stage1_hex_editor.s similarity index 100% rename from stage1_hex_editor.s rename to stage1/stage1_hex_editor.s diff --git a/stage1_loader.hex b/stage1/stage1_loader.hex similarity index 100% rename from stage1_loader.hex rename to stage1/stage1_loader.hex diff --git a/stage1_loader.s b/stage1/stage1_loader.s similarity index 100% rename from stage1_loader.s rename to stage1/stage1_loader.s diff --git a/stage1_raw_writer.s b/stage1/stage1_raw_writer.s similarity index 100% rename from stage1_raw_writer.s rename to stage1/stage1_raw_writer.s