patches and low-level development discussion
 help / color / mirror / code / Atom feed
* [PATCH] vm: link /sbin to /usr/bin
@ 2025-06-05 12:08 Alyssa Ross
  2025-06-05 14:11 ` Puck Meerburg
  2025-06-09  9:51 ` Alyssa Ross
  0 siblings, 2 replies; 5+ messages in thread
From: Alyssa Ross @ 2025-06-05 12:08 UTC (permalink / raw)
  To: devel; +Cc: Yureka

This is necessary because the kernel tries to load modules by running
/sbin/modprobe.  This should fix Intel wireless cards in netvm.  It's
then important to disable Busybox init because /sbin/init takes
precedence over our /etc/init.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
 img/app/Makefile       | 2 +-
 img/app/default.nix    | 1 +
 img/app/sbin           | 1 +
 vm/sys/net/Makefile    | 2 +-
 vm/sys/net/default.nix | 1 +
 vm/sys/net/sbin        | 1 +
 6 files changed, 6 insertions(+), 2 deletions(-)
 create mode 120000 img/app/sbin
 create mode 120000 vm/sys/net/sbin

diff --git a/img/app/Makefile b/img/app/Makefile
index 5ea023e..c827fd3 100644
--- a/img/app/Makefile
+++ b/img/app/Makefile
@@ -60,7 +60,7 @@ VM_FIFOS = etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/fifo
 
 # These are separate because they need to be included, but putting
 # them as make dependencies would confuse make.
-VM_LINKS = bin etc/ssl/certs/ca-certificates.crt
+VM_LINKS = bin etc/ssl/certs/ca-certificates.crt sbin
 
 VM_BUILD_FILES = build/etc/s6-rc
 
diff --git a/img/app/default.nix b/img/app/default.nix
index 6e423f6..a196205 100644
--- a/img/app/default.nix
+++ b/img/app/default.nix
@@ -24,6 +24,7 @@ let
           CONFIG_FEATURE_IP_ADDRESS y
           CONFIG_FEATURE_IP_LINK y
           CONFIG_FEATURE_IP_ROUTE y
+          CONFIG_INIT n
           CONFIG_IP y
         '';
       })
diff --git a/img/app/sbin b/img/app/sbin
new file mode 120000
index 0000000..1e881ed
--- /dev/null
+++ b/img/app/sbin
@@ -0,0 +1 @@
+usr/bin
\ No newline at end of file
diff --git a/vm/sys/net/Makefile b/vm/sys/net/Makefile
index 35da669..436ca6e 100644
--- a/vm/sys/net/Makefile
+++ b/vm/sys/net/Makefile
@@ -43,7 +43,7 @@ VM_DIRS = dev etc/s6-linux-init/env run proc sys var/lib/connman
 
 # These are separate because they need to be included, but putting
 # them as make dependencies would confuse make.
-VM_LINKS = bin lib var/run
+VM_LINKS = bin lib sbin var/run
 
 VM_BUILD_FILES = build/etc/s6-rc
 
diff --git a/vm/sys/net/default.nix b/vm/sys/net/default.nix
index 69f9564..b5873eb 100644
--- a/vm/sys/net/default.nix
+++ b/vm/sys/net/default.nix
@@ -22,6 +22,7 @@ let
     (busybox.override {
       extraConfig = ''
         CONFIG_DEPMOD n
+        CONFIG_INIT n
         CONFIG_INSMOD n
         CONFIG_LSMOD n
         CONFIG_MODINFO n
diff --git a/vm/sys/net/sbin b/vm/sys/net/sbin
new file mode 120000
index 0000000..1e881ed
--- /dev/null
+++ b/vm/sys/net/sbin
@@ -0,0 +1 @@
+usr/bin
\ No newline at end of file

base-commit: b5dab0eea25e24531ac856985b8f79ef38c06366
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-06-09  9:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-05 12:08 [PATCH] vm: link /sbin to /usr/bin Alyssa Ross
2025-06-05 14:11 ` Puck Meerburg
2025-06-05 14:20   ` Alyssa Ross
2025-06-05 14:21     ` Puck Meerburg
2025-06-09  9:51 ` Alyssa Ross

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).