From 3bda60093277ec3bc94439bcc6ae3bf7cef10e78 Mon Sep 17 00:00:00 2001 From: Lunaixsky Date: Mon, 31 Mar 2025 17:39:41 +0100 Subject: [PATCH] fix potens not being set in ttyFB* device mkrootfs: ensure mkfs.* invoked with root privilege qemu.py: put extra options before the generated ones --- lunaix-os/hal/char/lxconsole.c | 8 +++----- lunaix-os/scripts/mkrootfs | 2 +- lunaix-os/scripts/qemu.py | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lunaix-os/hal/char/lxconsole.c b/lunaix-os/hal/char/lxconsole.c index aa4136a..1ac2d57 100644 --- a/lunaix-os/hal/char/lxconsole.c +++ b/lunaix-os/hal/char/lxconsole.c @@ -27,7 +27,7 @@ struct console { - struct potens_meta* tp_cap; + struct termport_potens* tp_cap; struct lx_timer* flush_timer; struct fifo_buf output; struct fifo_buf input; @@ -92,9 +92,7 @@ __lxconsole_listener(struct input_device* dev) fifo_putone(&lx_console.input, ttychr); - struct termport_potens* tpcap; - tpcap = get_potens(lx_console.tp_cap, typeof(*tpcap)); - term_notify_data_avaliable(tpcap); + term_notify_data_avaliable(lx_console.tp_cap); pwake_all(&lx_reader); done: @@ -300,7 +298,7 @@ lxconsole_spawn_ttydev(struct device_def* devdef) register_device(tty_dev, &devdef->class, "vcon"); - term_attach_potens(tty_dev, NULL, "VCON"); + lx_console.tp_cap = term_attach_potens(tty_dev, NULL, "VCON"); return 0; } diff --git a/lunaix-os/scripts/mkrootfs b/lunaix-os/scripts/mkrootfs index 5f05f01..52e56ed 100755 --- a/lunaix-os/scripts/mkrootfs +++ b/lunaix-os/scripts/mkrootfs @@ -51,7 +51,7 @@ function cleanup() { dd if=/dev/zero of="${rootfs}" count=${size_mb} bs=1M \ || cleanup tmpmnt -mkfs.${fs} -L lunaix-rootfs -r 0 "${rootfs}" \ +${prefix} mkfs.${fs} -L lunaix-rootfs -r 0 "${rootfs}" \ || cleanup tmpmnt img ${prefix} mount -o loop "${rootfs}" "${tmp_mnt}" \ diff --git a/lunaix-os/scripts/qemu.py b/lunaix-os/scripts/qemu.py index edd5cdc..592bdf8 100755 --- a/lunaix-os/scripts/qemu.py +++ b/lunaix-os/scripts/qemu.py @@ -337,6 +337,7 @@ class QEMUExec: qemu_path = os.path.join(qemu_dir_override, qemu_path) cmds = [ qemu_path, + *extras, *self.get_qemu_general_opts(), *self.get_qemu_arch_opts(), *self.get_qemu_debug_opts() @@ -345,7 +346,6 @@ class QEMUExec: for dev in self._devices: cmds += dev.get_qemu_opts() - cmds += extras logger.info(" ".join(cmds)) if dryrun: -- 2.27.0