From e779848fddc4d5e77b26cd6cb0b7a23f705a5213 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jackpot51@gmail.com>
Date: Mon, 28 Feb 2022 17:38:21 -0700
Subject: [PATCH] Adjust initfs removed binaries, copy bootloader to filesystem

---
 mk/filesystem.mk |  3 ++-
 mk/initfs.mk     | 16 +++++++++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/mk/filesystem.mk b/mk/filesystem.mk
index ff77151..1bfdb4b 100644
--- a/mk/filesystem.mk
+++ b/mk/filesystem.mk
@@ -1,4 +1,4 @@
-build/filesystem.bin: filesystem.toml build/kernel prefix
+build/filesystem.bin: filesystem.toml build/bootloader.bin build/kernel prefix
 	cargo build --manifest-path cookbook/Cargo.toml --release
 	cargo build --manifest-path installer/Cargo.toml --release
 	cargo build --manifest-path redoxfs/Cargo.toml --release
@@ -11,6 +11,7 @@ build/filesystem.bin: filesystem.toml build/kernel prefix
 	sleep 2
 	pgrep redoxfs
 	cp $< build/filesystem/filesystem.toml
+	cp build/bootloader.bin build/filesystem/bootloader
 	cp build/kernel build/filesystem/kernel
 	cp -r $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/include build/filesystem/include
 	cp -r $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/lib build/filesystem/lib
diff --git a/mk/initfs.mk b/mk/initfs.mk
index 69aa1f0..c3e5eda 100644
--- a/mk/initfs.mk
+++ b/mk/initfs.mk
@@ -1,4 +1,18 @@
-INITFS_RM_BINS=alxd e1000d ihdad ixgbed pcspkrd redoxfs-ar redoxfs-mkfs rtl8168d usbctl
+INITFS_RM_BINS=\
+	alxd \
+	bgad \
+	e1000d \
+	ihdad \
+	ixgbed \
+	pcspkrd \
+	redoxfs-ar \
+	redoxfs-mkfs \
+	rtl8168d \
+	usbctl \
+	usbhidd \
+	usbscsid \
+	vboxd \
+	xhcid
 
 build/initfs.tag: initfs.toml prefix
 	cargo build --manifest-path cookbook/Cargo.toml --release