feat(ci): early serial mirroring & headless QEMU boot verification with live screenshot
This commit is contained in:
1 parent
107fb45103
commit
73aba4f6f2
4 files changed
+64
-4
No files matched your search
+6
-3
@@ -33,6 +33,12 @@ static inline bool is_transmit_empty(void) {
|
||||
void serial_putchar(char c) {
|
||||
if (!s_com1_present) return;
|
||||
|
||||
if (c == '\n') {
|
||||
uint32_t to = 50000;
|
||||
while (!is_transmit_empty() && --to > 0) {}
|
||||
if (to > 0) outb(COM1_PORT, '\r');
|
||||
}
|
||||
|
||||
uint32_t timeout = 50000;
|
||||
while (!is_transmit_empty() && --timeout > 0) {}
|
||||
if (timeout > 0) {
|
||||
@@ -43,9 +49,6 @@ void serial_putchar(char c) {
|
||||
void serial_puts(const char* str) {
|
||||
if (!s_com1_present || !str) return;
|
||||
while (*str) {
|
||||
if (*str == '\n') {
|
||||
serial_putchar('\r');
|
||||
}
|
||||
serial_putchar(*str++);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <airlys/vga.h>
|
||||
#include <airlys/vbe.h>
|
||||
#include <airlys/serial.h>
|
||||
|
||||
static size_t vga_row;
|
||||
static size_t vga_column;
|
||||
@@ -78,6 +79,8 @@ void vga_clear(void) {
|
||||
}
|
||||
|
||||
void vga_putchar(char c) {
|
||||
serial_putchar(c);
|
||||
|
||||
if (vbe_is_hardware_framebuffer()) {
|
||||
vbe_console_putchar(c, vga_to_rgb(vga_current_color));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user