Добавлен запуск с cdrom
This commit is contained in:
parent
2ba30e85c6
commit
15123ef5da
|
@ -2,9 +2,11 @@ name: Release Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
branches-ignore: [ "pages" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -21,28 +23,28 @@ jobs:
|
||||||
git config --global user.email "github@github.com"
|
git config --global user.email "github@github.com"
|
||||||
git config --global user.name "Build bot"
|
git config --global user.name "Build bot"
|
||||||
|
|
||||||
- name: install depends
|
- name: install depends
|
||||||
run: sudo apt install clang-format python3 git gdisk gcc g++ xorriso make mtools curl dos2unix
|
run: sudo apt install clang-format python3 git gdisk gcc g++ xorriso make mtools curl dos2unix
|
||||||
|
|
||||||
- name: install limine
|
- name: install limine
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/limine-bootloader/limine.git --branch=v5.x-branch-binary --depth=1
|
git clone https://github.com/limine-bootloader/limine.git --branch=v5.x-branch-binary --depth=1
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
dos2unix *.sh
|
dos2unix *.sh
|
||||||
chmod +x build.sh
|
chmod +x build.sh
|
||||||
./build.sh
|
./build.sh
|
||||||
|
|
||||||
- name: Add and commit files
|
- name: Add and commit files
|
||||||
uses: EndBug/add-and-commit@v9
|
uses: EndBug/add-and-commit@v9
|
||||||
with:
|
with:
|
||||||
add: 'x86_64-kernel.elf x86_64-mseos.hdd'
|
add: 'x86_64-kernel.elf x86_64-mseos.hdd'
|
||||||
author_name: Bot
|
author_name: Bot
|
||||||
author_email: bot@example.com
|
author_email: bot@example.com
|
||||||
commit: --signoff
|
commit: --signoff
|
||||||
message: Update
|
message: Update
|
||||||
new_branch: binary
|
new_branch: binary
|
||||||
pathspec_error_handling: ignore
|
pathspec_error_handling: ignore
|
||||||
push: true
|
push: true
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -1,3 +1,3 @@
|
||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 1
|
#define VERSION_MINOR 1
|
||||||
#define VERSION_BUILD 297
|
#define VERSION_BUILD 299
|
||||||
|
|
|
@ -162,7 +162,8 @@ void cpu_init( ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
|
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);
|
cpuid(0x80000001, &eax, &ebx, &ecx, &edx);
|
||||||
|
|
||||||
|
@ -187,11 +188,13 @@ void cpu_init( ) {
|
||||||
}
|
}
|
||||||
if ((edx >> 11) & 1) { fb_printf("SYSCALL/SYSRET подерживаются!\n"); }
|
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 >> 29) & 1) { fb_printf("AMD64 поддерживается!\n"); }
|
||||||
// if ((edx >> 30) & 1) { fb_printf("\"3DNow!\" поддерживается!\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 >> 6) & 1) { fb_printf("SSE4a поддерживается!\n"); }
|
||||||
if ((ecx >> 7) & 1) { fb_printf("Смещенный режим SSE поддерживается!\n"); }
|
if ((ecx >> 7) & 1) { fb_printf("Смещенный режим SSE поддерживается!\n"); }
|
||||||
|
|
||||||
|
|
|
@ -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 j = 0; j < h; j++) {
|
||||||
for (uint64_t i = 0; i < w; i++) {
|
for (uint64_t i = 0; i < w; i++) {
|
||||||
uint64_t where = (i + x) + (j + y) * width;
|
uint64_t where = (i + x) + (j + y) * width;
|
||||||
|
|
14
kernel/mod.c
14
kernel/mod.c
|
@ -71,10 +71,11 @@ void mod_init( ) {
|
||||||
|
|
||||||
for (uint64_t i = 0; i < module_count; i++) {
|
for (uint64_t i = 0; i < module_count; i++) {
|
||||||
module_ptr = module_response->modules[i];
|
module_ptr = module_response->modules[i];
|
||||||
fb_printf("[%d] %s [%s] 0x%x\n", i, module_ptr->path, module_ptr->cmdline,
|
fb_printf("[%d] %s [%s] 0x%x\n", i, module_ptr->path,
|
||||||
module_ptr->address);
|
module_ptr->cmdline, module_ptr->address);
|
||||||
fb_printf("->Размер: %u, тип носителя: %u, индекс раздела: %u\n", module_ptr->size,
|
fb_printf("->Размер: %u, тип носителя: %u, индекс раздела: %u\n",
|
||||||
module_ptr->media_type, module_ptr->partition_index);
|
module_ptr->size, module_ptr->media_type,
|
||||||
|
module_ptr->partition_index);
|
||||||
#if 0
|
#if 0
|
||||||
fb_printf("[%d] %s [%s] 0x%x\n", i, module_ptr->path,
|
fb_printf("[%d] %s [%s] 0x%x\n", i, module_ptr->path,
|
||||||
module_ptr->cmdline, module_ptr->address);
|
module_ptr->cmdline, module_ptr->address);
|
||||||
|
@ -94,8 +95,9 @@ void mod_init( ) {
|
||||||
}
|
}
|
||||||
if (!tool_starts_with(module_ptr->cmdline, "[MOD]")) { continue; }
|
if (!tool_starts_with(module_ptr->cmdline, "[MOD]")) { continue; }
|
||||||
modules_count++;
|
modules_count++;
|
||||||
uint64_t (*module_init)(env_t *env) = (module_info_t * (*)(env_t * env))
|
uint64_t (*module_init)(env_t * env) =
|
||||||
elf_entry(module_ptr->address, module_ptr->size);
|
(module_info_t * (*)(env_t * env))
|
||||||
|
elf_entry(module_ptr->address, module_ptr->size);
|
||||||
|
|
||||||
fb_printf("\t->Точка входа: 0x%x\n", module_init);
|
fb_printf("\t->Точка входа: 0x%x\n", module_init);
|
||||||
|
|
||||||
|
|
1
run.sh
1
run.sh
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/sh
|
#!/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 -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 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 "БМПОС" -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
|
#qemu-system-x86_64 -name "БМПОС" -enable-kvm -cpu host -m 6G -smp 1 -bios ovmf/OVMF.fd -hda bmosp.hdd -d int --no-reboot
|
Loading…
Reference in New Issue