mirror of
https://gitlab.com/bztsrc/bootboot.git
synced 2023-02-13 20:54:32 -05:00
Minor fixes and typos
This commit is contained in:
parent
a42fd37e81
commit
c74e6d49f9
9 changed files with 19 additions and 15 deletions
|
@ -5,7 +5,7 @@ I provide pre-compiled images ready for use.
|
|||
|
||||
1. *x86_64-efi* the preferred way of booting on x86_64 architecture.
|
||||
Standard GNU toolchain and a few files from gnuefi (included).
|
||||
[bootboot.efi](https://gitlab.com/bztsrc/bootboot/raw/master/bootboot.efi) (94k), [bootboot.rom](https://gitlab.com/bztsrc/bootboot/raw/master/bootboot.rom) (93k)
|
||||
[bootboot.efi](https://gitlab.com/bztsrc/bootboot/raw/master/bootboot.efi) (94k), [bootboot.rom](https://gitlab.com/bztsrc/bootboot/raw/master/bootboot.rom) (94k)
|
||||
|
||||
2. *x86_64-bios* BIOS, Multiboot (GRUB), El Torito (CDROM), Expansion ROM and Linux boot compatible, OBSOLETE loader.
|
||||
If you want to recompile this, you'll need fasm (not included).
|
||||
|
@ -241,7 +241,7 @@ OS developers, specially for those who want to write their own file systems.
|
|||
The reference implementations support [cpio](https://en.wikipedia.org/wiki/Cpio) (all hpodc, newc and crc variants),
|
||||
[ustar](https://en.wikipedia.org/wiki/Tar_(computing)), osdev.org's [SFS](http://wiki.osdev.org/SFS),
|
||||
[James Molloy's initrd](http://www.jamesmolloy.co.uk/tutorial_html/8.-The%20VFS%20and%20the%20initrd.html)
|
||||
format and OS/Z's native [FS/Z](https://gitlab.com/bztsrc/osz/blob/master/etc/include/sys/fsZ.h) (with encryption support too).
|
||||
format and OS/Z's native [FS/Z](https://gitlab.com/bztsrc/osz/blob/master/include/sys/fsZ.h) (with encryption support too).
|
||||
Gzip compressed initrds also supported to save disk space and fasten up load time (not recommended on RPi3).
|
||||
|
||||
Example kernel
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
/* get BOOTBOOT structure */
|
||||
#include "../bootboot.h"
|
||||
// comment out this include if you don't want FS/Z support
|
||||
#include "../../osZ/etc/include/sys/fsZ.h"
|
||||
#include "../../osZ/include/sys/fsZ.h"
|
||||
|
||||
|
||||
/* aligned buffers */
|
||||
|
|
BIN
boot.bin
BIN
boot.bin
Binary file not shown.
BIN
bootboot.bin
BIN
bootboot.bin
Binary file not shown.
BIN
bootboot.efi
BIN
bootboot.efi
Binary file not shown.
BIN
bootboot.rom
BIN
bootboot.rom
Binary file not shown.
|
@ -109,7 +109,7 @@ bootboot_record:
|
|||
mov byte [lbapacket.size], 16
|
||||
mov byte [lbapacket.addr0+1], 08h ;to address 800h
|
||||
;check for lba presistance - floppy not supported any more
|
||||
;we use pendrive as removable media for a long time
|
||||
;we use USB sticks as removable media for a long time
|
||||
cmp dl, byte 80h
|
||||
jl .nolba
|
||||
.notfloppy: mov ah, byte 41h
|
||||
|
@ -144,7 +144,7 @@ bootboot_record:
|
|||
pop di
|
||||
jc @f
|
||||
;some buggy BIOSes (like bochs') fail to set carry flag and ax properly
|
||||
cmp byte [si+2], 0h
|
||||
cmp byte [spc_packet+2], 0h
|
||||
jz @f
|
||||
;lba=lba/4
|
||||
clc
|
||||
|
|
|
@ -201,8 +201,9 @@ MB_FLAGS equ 010001h
|
|||
;----------------Multiboot stub-----------------
|
||||
USE32
|
||||
multiboot_start:
|
||||
cld
|
||||
cli
|
||||
cld
|
||||
lgdt [GDT_value]
|
||||
;clear drive code, initrd ptr and environment
|
||||
xor edx, edx
|
||||
mov edi, 9000h
|
||||
|
@ -243,8 +244,6 @@ multiboot_start:
|
|||
mov CR0, eax
|
||||
xor ax, ax
|
||||
mov ds, ax ;load segment registers
|
||||
mov es, ax
|
||||
mov ss, ax
|
||||
jmp 0:realmode_start
|
||||
|
||||
;-----------realmode-protmode stub-------------
|
||||
|
@ -252,6 +251,9 @@ realmode_start:
|
|||
cli
|
||||
cld
|
||||
mov sp, 7C00h
|
||||
xor ax, ax
|
||||
mov es, ax
|
||||
mov ss, ax
|
||||
;relocate ourself from ROM to RAM if necessary
|
||||
call .getaddr
|
||||
.getaddr: pop si
|
||||
|
@ -261,8 +263,6 @@ realmode_start:
|
|||
cmp si, .getaddr
|
||||
je .noreloc
|
||||
.reloc: mov ds, ax
|
||||
xor ax, ax
|
||||
mov es, ax
|
||||
mov di, loader
|
||||
sub si, .getaddr-loader
|
||||
mov cx, (loader_end-loader)/2
|
||||
|
@ -341,9 +341,7 @@ realmode_start:
|
|||
mov eax, 80000000h
|
||||
mov ebp, eax
|
||||
inc ebp
|
||||
push bx
|
||||
cpuid
|
||||
pop bx
|
||||
cmp eax, ebp
|
||||
jb .cpuerror
|
||||
mov eax, ebp
|
||||
|
@ -506,7 +504,7 @@ getmemmap:
|
|||
cmp dword [di], 0
|
||||
jnz .notfirst
|
||||
; "allocate" memory for loader
|
||||
mov eax, 15000h
|
||||
mov eax, 14000h
|
||||
add dword [di], eax
|
||||
sub dword [di+8], eax
|
||||
;convert E820 memory type to BOOTBOOT memory type
|
||||
|
@ -1871,7 +1869,13 @@ end if
|
|||
inc word [bootboot.numcores]
|
||||
mov ax, word [bootboot.bspid]
|
||||
mov word [lapic_ids], ax
|
||||
@@:
|
||||
@@: ; remove core stacks from memory map
|
||||
xor eax, eax
|
||||
mov ax, word [bootboot.numcores]
|
||||
shl eax, 10
|
||||
mov edi, bootboot.mmap
|
||||
add dword [edi], eax
|
||||
sub dword [edi+8], eax
|
||||
|
||||
; ------- set video resolution -------
|
||||
prot_realmode
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include "../bootboot.h"
|
||||
#include "tinf.h"
|
||||
// comment out this include if you don't want FS/Z support
|
||||
#include "../../osZ/etc/include/sys/fsZ.h"
|
||||
#include "../../osZ/include/sys/fsZ.h"
|
||||
|
||||
/*** ELF64 defines and structs ***/
|
||||
#define ELFMAG "\177ELF"
|
||||
|
|
Loading…
Reference in a new issue