forked from Aren/BMOSP
1
0
Fork 0

Добавлен запуск с cdrom

This commit is contained in:
Aren Elchinyan 2023-10-26 23:11:38 +03:00
parent 2ba30e85c6
commit 15123ef5da
6 changed files with 43 additions and 34 deletions

View File

@ -2,9 +2,11 @@ name: Release Build
on:
workflow_dispatch:
branches-ignore: [ "pages" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
@ -21,28 +23,28 @@ jobs:
git config --global user.email "github@github.com"
git config --global user.name "Build bot"
- name: install depends
run: sudo apt install clang-format python3 git gdisk gcc g++ xorriso make mtools curl dos2unix
- name: install limine
run: |
git clone https://github.com/limine-bootloader/limine.git --branch=v5.x-branch-binary --depth=1
- name: install depends
run: sudo apt install clang-format python3 git gdisk gcc g++ xorriso make mtools curl dos2unix
- name: install limine
run: |
git clone https://github.com/limine-bootloader/limine.git --branch=v5.x-branch-binary --depth=1
- name: build
run: |
dos2unix *.sh
chmod +x build.sh
./build.sh
- name: build
run: |
dos2unix *.sh
chmod +x build.sh
./build.sh
- name: Add and commit files
uses: EndBug/add-and-commit@v9
with:
add: 'x86_64-kernel.elf x86_64-mseos.hdd'
author_name: Bot
author_email: bot@example.com
commit: --signoff
message: Update
new_branch: binary
pathspec_error_handling: ignore
push: true
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Add and commit files
uses: EndBug/add-and-commit@v9
with:
add: 'x86_64-kernel.elf x86_64-mseos.hdd'
author_name: Bot
author_email: bot@example.com
commit: --signoff
message: Update
new_branch: binary
pathspec_error_handling: ignore
push: true
github_token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,3 +1,3 @@
#define VERSION_MAJOR 0
#define VERSION_MINOR 1
#define VERSION_BUILD 297
#define VERSION_BUILD 299

View File

@ -162,7 +162,8 @@ void cpu_init( ) {
}
cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
fb_printf("Максимально поддерживаемая функция CPUID = 0x%x (%u)\n", eax, eax);
fb_printf("Максимально поддерживаемая функция CPUID = 0x%x (%u)\n", eax,
eax);
cpuid(0x80000001, &eax, &ebx, &ecx, &edx);
@ -187,11 +188,13 @@ void cpu_init( ) {
}
if ((edx >> 11) & 1) { fb_printf("SYSCALL/SYSRET подерживаются!\n"); }
// if ((edx >> 26) & 1) { fb_printf("Гигабайтные страницы подерживаются!\n"); }
// if ((edx >> 26) & 1) { fb_printf("Гигабайтные страницы
// подерживаются!\n"); }
if ((edx >> 29) & 1) { fb_printf("AMD64 поддерживается!\n"); }
// if ((edx >> 30) & 1) { fb_printf("\"3DNow!\" поддерживается!\n"); }
// if ((edx >> 31) & 1) { fb_printf("\"Extended 3DNow!\" поддерживается!\n"); }
// if ((edx >> 31) & 1) { fb_printf("\"Extended 3DNow!\"
// поддерживается!\n"); }
if ((ecx >> 6) & 1) { fb_printf("SSE4a поддерживается!\n"); }
if ((ecx >> 7) & 1) { fb_printf("Смещенный режим SSE поддерживается!\n"); }

View File

@ -64,7 +64,8 @@ void fb_init( ) {
}
// Отрисовка буффера по координатам (полезно для картинок)
void fb_print_buf(uint64_t x, uint64_t y, uint64_t h, uint64_t w, uint32_t *buf) {
void fb_print_buf(uint64_t x, uint64_t y, uint64_t h, uint64_t w,
uint32_t *buf) {
for (uint64_t j = 0; j < h; j++) {
for (uint64_t i = 0; i < w; i++) {
uint64_t where = (i + x) + (j + y) * width;

View File

@ -71,10 +71,11 @@ void mod_init( ) {
for (uint64_t i = 0; i < module_count; i++) {
module_ptr = module_response->modules[i];
fb_printf("[%d] %s [%s] 0x%x\n", i, module_ptr->path, module_ptr->cmdline,
module_ptr->address);
fb_printf("->Размер: %u, тип носителя: %u, индекс раздела: %u\n", module_ptr->size,
module_ptr->media_type, module_ptr->partition_index);
fb_printf("[%d] %s [%s] 0x%x\n", i, module_ptr->path,
module_ptr->cmdline, module_ptr->address);
fb_printf("->Размер: %u, тип носителя: %u, индекс раздела: %u\n",
module_ptr->size, module_ptr->media_type,
module_ptr->partition_index);
#if 0
fb_printf("[%d] %s [%s] 0x%x\n", i, module_ptr->path,
module_ptr->cmdline, module_ptr->address);
@ -94,8 +95,9 @@ void mod_init( ) {
}
if (!tool_starts_with(module_ptr->cmdline, "[MOD]")) { continue; }
modules_count++;
uint64_t (*module_init)(env_t *env) = (module_info_t * (*)(env_t * env))
elf_entry(module_ptr->address, module_ptr->size);
uint64_t (*module_init)(env_t * env) =
(module_info_t * (*)(env_t * env))
elf_entry(module_ptr->address, module_ptr->size);
fb_printf("\t->Точка входа: 0x%x\n", module_init);

1
run.sh
View File

@ -1,5 +1,6 @@
#!/bin/sh
qemu-system-x86_64 -name "БМПОС" -cpu max -m 1G -smp 1 -hda bmosp.hdd --no-reboot
#qemu-system-x86_64 -name "БМПОС" -cpu max -m 1G -smp 1 -cdrom bmosp.iso -boot d --no-reboot
#qemu-system-x86_64 -name "БМПОС" -cpu max -m 1G -smp 1 -bios ovmf/OVMF.fd -hda bmosp.hdd -d int --no-reboot
#qemu-system-x86_64 -name "БМПОС" -cpu host -m 1G -smp 1 -bios ovmf/OVMF.fd -hda bmosp.hdd
#qemu-system-x86_64 -name "БМПОС" -enable-kvm -cpu host -m 6G -smp 1 -bios ovmf/OVMF.fd -hda bmosp.hdd -d int --no-reboot