liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit aecc44aaa0e86ebc573527fa1bc09ab4dd384f89
parent 1042be912c8831c26c8ac2b0cba5b2d1000c968f
Author: Daniel Barlow <dan@telent.net>
Date:   Sat, 23 Dec 2023 15:32:59 +0000

run-liminix-vm: --flag parameter passes arg straight to qemu

Diffstat:
Mpkgs/run-liminix-vm/run-liminix-vm.fnl | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pkgs/run-liminix-vm/run-liminix-vm.fnl b/pkgs/run-liminix-vm/run-liminix-vm.fnl @@ -44,8 +44,10 @@ ["--lan" spec & rest] (assoc (parse-args rest) :lan spec) ["--wan" spec & rest] (assoc (parse-args rest) :wan spec) ["--command-line" cmd & rest] (assoc (parse-args rest) :command-line cmd) + ["--flag" flag & rest] (let [o (parse-args rest)] + (assoc o :flags (doto o.flags (table.insert flag)))) [kernel rootfsimg] - { :kernel kernel :rootfs (pad-file rootfsimg (* 16 1024)) } + { :flags [] :kernel kernel :rootfs (pad-file rootfsimg (* 16 1024)) } )) (fn pad-u-boot [options] @@ -114,6 +116,7 @@ (-> [] (appendm (. bin options.arch)) (appendm ["-echr" "16"]) + (appendm options.flags) (appendm (if options.phram-address [ "-m" "272"