Skip to content

Conversation

@octplane
Copy link
Contributor

This PR contains a few change towards MacOS support, but it's not working as I don't have enough Qemu knowledge:

  • flake.nix and flake.lock file for faster dev
  • -d flag for mkimg.sh
  • Add shell compatibility layer for MacOs (remove sudo requirement too)
  • Unzip archive to start Qemu with a folder instead of an image.

I think most things are fine as I believe the content of the archive is what's expected for smolBSD to boot.

Things work pretty ok until I start the emulator:

(nix:nix-shell-env) Hokusai:smolBSD oct$ ./startnb.sh -f etc/rescue.conf -k kernels/netbsd-SMOL -i rescue-evbarm-aarch64.img.tar
* Found tar archive rescue-evbarm-aarch64.img.tar, extracting to directory...
* Using existing directory: rescue-evbarm-aarch64.d
* using console: viocon
using QEMU version 10.1.0
* Using 9p filesystem for root from directory: rescue-evbarm-aarch64.d
[   1.0000000] NetBSD 11.99.3 (MICROVM)        Notice: this software is protected by copyright
[   1.0000000] Detecting hardware... (QBOOT    000000000000)
[   1.0174003]  done.
[   1.0174003] unknown device major 0xffffffffffffffff
[   1.1514864] unknown device major 0xffffffffffffffff
[   1.3165112] unknown device major 0xffffffffffffffff
[   1.4399309] unknown device major 0xffffffffffffffff
[   1.5709561] unknown device major 0xffffffffffffffff
...

Happy to iterate/split/abandon the PR if you don't see any interest in it ;)

@octplane octplane changed the title Macos support MacOS support Oct 26, 2025
@iMilnb
Copy link
Contributor

iMilnb commented Nov 5, 2025

First of all, thank you for your contribution!
Now about mkimg.sh running natively on macOS, it's a path I've abandoned a couple of months ago because this system has no simple support for any necessary file system (neither ext2 nor ffs), in order to use smolBSD on macOS you have to first bmake fetchimg to fetch a builder image, from there you're set to run every bit of this project on your Mac. As fot 9p, I also tried it, unfortunately its NetBSD implementation is very incomplete to use it as root fs.
While I can't merge your changes as-is, I'll cherry-pick interesting bits if you don't mind.

@octplane
Copy link
Contributor Author

octplane commented Nov 5, 2025

Sure, no problem. I tried using bmake fetchimg but failed to have a working example. Hence this rabbit-holing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants