docs: minor change
This commit is contained in:
parent
c97a637ecd
commit
2d48606692
|
@ -1,16 +1,23 @@
|
|||
;; File: bootinfo.inc
|
||||
|
||||
;; Struct: BootInfoRange
|
||||
struc BootInfoRange {
|
||||
.base dd ?
|
||||
.legth dd ?
|
||||
}
|
||||
|
||||
;; Struct: BootInfo
|
||||
;;
|
||||
;; StupidOS boot protocol structure
|
||||
struc BootInfo {
|
||||
.mmap dd 4*2*40 dup(0)
|
||||
.kernel_start dd ?
|
||||
.kernel_size dd ?
|
||||
}
|
||||
|
||||
;; Section: Globals
|
||||
|
||||
;; Constant: BOOTINFO_MEMORY_LIMIT
|
||||
BOOTINFO_MEMORY_LIMIT = 0xFFFFF000
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
;; File: fat12.inc
|
||||
|
||||
ATTR_READ_ONLY = 0x01
|
||||
ATTR_HIDDEN = 0x02
|
||||
ATTR_SYSTEM = 0x04
|
||||
ATTR_VOLUME_ID = 0x08
|
||||
ATTR_DIRECTORY = 0x10
|
||||
ATTR_ARCHIVE = 0x20
|
||||
|
||||
;; Struct: fat_entry
|
||||
struc fat_entry
|
||||
{
|
||||
.name db 8 dup ?
|
||||
|
@ -24,6 +18,22 @@ struc fat_entry
|
|||
}
|
||||
defn fat_entry
|
||||
|
||||
;; Constants: Attributes
|
||||
;; ATTR_READ_ONLY - Read-only
|
||||
;; ATTR_HIDDEN - Hidden
|
||||
;; ATTR_SYSTEM - System
|
||||
;; ATTR_VOLUME_ID - Volume label
|
||||
;; ATTR_DIRECTORY - Subdirectory
|
||||
;; ATTR_ARCHIVE - Archive
|
||||
ATTR_READ_ONLY = 0x01
|
||||
ATTR_HIDDEN = 0x02
|
||||
ATTR_SYSTEM = 0x04
|
||||
ATTR_VOLUME_ID = 0x08
|
||||
ATTR_DIRECTORY = 0x10
|
||||
ATTR_ARCHIVE = 0x20
|
||||
|
||||
;; Section: Globals
|
||||
|
||||
;; Function: fat_load_root
|
||||
fat_load_root:
|
||||
mov ax, DISK_BUFFER/0x10
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
;; File: macro.inc
|
||||
|
||||
;; Macro: defn name
|
||||
macro defn name
|
||||
{
|
||||
virtual at 0
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
; copy/pasted from https://wiki.osdev.org/A20_Line
|
||||
; .... sorry I was lazy :x
|
||||
;; File: a20.inc
|
||||
;; copy/pasted from https://wiki.osdev.org/A20_Line
|
||||
;; .... sorry I was lazy :x
|
||||
|
||||
;; Function: a20_get_state
|
||||
a20_get_state:
|
||||
pushf
|
||||
push si
|
||||
|
@ -47,7 +49,7 @@ a20_get_state:
|
|||
.BufferBelowMB: db 0
|
||||
.BufferOverMB db 0
|
||||
|
||||
|
||||
;; Function: a20_query_support
|
||||
a20_query_support:
|
||||
push bx
|
||||
clc
|
||||
|
@ -67,6 +69,7 @@ a20_query_support:
|
|||
pop bx
|
||||
ret
|
||||
|
||||
;; Function: a20_enable_keyboard_controller
|
||||
a20_enable_keyboard_controller:
|
||||
cli
|
||||
|
||||
|
@ -109,8 +112,11 @@ a20_enable_keyboard_controller:
|
|||
jz .wait_io2
|
||||
ret
|
||||
|
||||
; out:
|
||||
; cf - set on error
|
||||
;; Function: a20_enable
|
||||
;;
|
||||
;; Out:
|
||||
;; CF - set on error
|
||||
;;
|
||||
a20_enable:
|
||||
clc ; clear cf
|
||||
pusha
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
multiboot_header:
|
||||
mb_header MultibootHeader multiboot_header
|
||||
|
||||
;; Function: _start
|
||||
;; Loader entry point.
|
||||
_start:
|
||||
cmp eax, MULTIBOOT_MAGIC
|
||||
je multiboot
|
||||
|
|
|
@ -56,6 +56,7 @@ struc VesaModeInfo
|
|||
.Reserved2 db 206 dup(?)
|
||||
}
|
||||
|
||||
;; Function: video_setup
|
||||
video_setup:
|
||||
mov si, szMsgDetectVideo
|
||||
call bios_log
|
||||
|
|
|
@ -11,4 +11,9 @@ fi
|
|||
|
||||
DESTDIR=${BUILDDIR}/iso
|
||||
|
||||
mkdir -p "${OBJ}"
|
||||
|
||||
(cd "${OBJ}"; get_grub)
|
||||
|
||||
|
||||
make
|
||||
|
|
|
@ -10,5 +10,15 @@ fi
|
|||
. ./releasetools/image.functions
|
||||
|
||||
DESTDIR=${BUILDDIR}/floppy
|
||||
|
||||
export DESTDIR
|
||||
|
||||
mkdir -p "${BUILDDIR}" "${OBJ}"
|
||||
|
||||
mkdir -p "${DESTDIR}/boot"
|
||||
|
||||
create_stpdboot_ini "${DESTDIR}/boot"
|
||||
|
||||
make
|
||||
|
||||
echo ""
|
||||
echo "floppy image at $(pwd)/${IMG}"
|
||||
|
|
|
@ -11,10 +11,21 @@ fi
|
|||
. ./releasetools/image.defaults
|
||||
. ./releasetools/image.functions
|
||||
|
||||
DESTDIR=${BUILDDIR}/hd
|
||||
export DESTDIR
|
||||
|
||||
if [ -f "${IMG}" ]
|
||||
then
|
||||
rm -f "${IMG}"
|
||||
fi
|
||||
|
||||
mkdir -p "${BUILDDIR}" "${OBJ}"
|
||||
|
||||
mkdir -p "${DESTDIR}/boot"
|
||||
|
||||
create_stpdboot_ini "${DESTDIR}/boot"
|
||||
|
||||
make
|
||||
|
||||
echo ""
|
||||
echo "Disk image at $(pwd)/${IMG}"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
: "${BUILDDIR=.build}"
|
||||
: "${BUILDDIR=$(pwd)/.build}"
|
||||
: "${OBJ=${BUILDDIR}/obj}"
|
||||
: "${DESTDIR=${BUILDDIR}/dist}"
|
||||
: "${TOOLSDIR=$(pwd)/.tools}"
|
||||
|
|
|
@ -19,12 +19,18 @@ menuentry "StupidOS" {
|
|||
EOF
|
||||
)"
|
||||
|
||||
echo "$grub_cfg" > "$target"
|
||||
echo "$grub_cfg" > "${target}/grub.cfg"
|
||||
}
|
||||
|
||||
get_grub()
|
||||
{
|
||||
echo
|
||||
local version="2.12"
|
||||
local url="https://ftp.gnu.org/gnu/grub/grub-${version}.tar.gz"
|
||||
|
||||
wget "${url}"
|
||||
tar -xvf "grub-${version}.tar.gz"
|
||||
|
||||
(cd "grub-${version}"; ./configure --prefix="${TOOLSDIR}" && make install)
|
||||
}
|
||||
|
||||
create_efi_image()
|
||||
|
@ -32,3 +38,15 @@ create_efi_image()
|
|||
echo
|
||||
}
|
||||
|
||||
create_stpdboot_ini()
|
||||
{
|
||||
local target="$1"
|
||||
local stupid_ini="$(cat <<EOF
|
||||
CMDLINE=consdev=com0
|
||||
MODULE=dummy.mod
|
||||
MODULE=dummy2.mod
|
||||
EOF
|
||||
)"
|
||||
|
||||
echo "$stupid_ini" > "${target}/stupid.ini"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue