Fixed OpenRC and booted into /sbin/init
This commit is contained in:
parent
6a9c9665a6
commit
2c1bf51a91
@ -1,4 +1,6 @@
|
||||
#!/bin/sh -e
|
||||
CFLAGS="-O3 -march=skylake -pipe"
|
||||
CXXFLAGS="$CFLAGS"
|
||||
THREADS=$(nproc)
|
||||
|
||||
mkdir -p build
|
||||
@ -252,6 +254,10 @@ sed -i "/^install.*\/src\/shared\/version\".*/d" ./tools/meson_final.sh
|
||||
# NOTE: One of the shell scripts OpenRC uses to install requires a DESTDIR, so
|
||||
# we simply say the root is / in this case. ~ahill
|
||||
DESTDIR=/ muon -C build install
|
||||
# FIXME: Not sure why, but OpenRC doesn't take over /sbin/init like it should.
|
||||
# As a workaround, let's create the symlinks manually. ~ahill
|
||||
ln -s openrc-init /sbin/init
|
||||
ln -s openrc-shutdown /sbin/shutdown
|
||||
cd ..
|
||||
|
||||
# nasm Build
|
||||
|
||||
15
configure-image.sh
Normal file
15
configure-image.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh -e
|
||||
mkdir -p /etc/tinyramfs
|
||||
echo "root=/dev/vda2" > /etc/tinyramfs/config
|
||||
echo "root_type=xfs" >> /etc/tinyramfs/config
|
||||
# FIXME: Setting monolith to true is a workaround since tinyramfs searches for
|
||||
# /sbin/kmod, which doesn't work since kmod is installed under /bin.
|
||||
# While kmod *should* be moved under /sbin, tinyramfs also shouldn't
|
||||
# hard-code paths like that, so we need a way to patch this going
|
||||
# forward. Without a proper patch, kernel modules cannot be added to the
|
||||
# initramfs, which will cause issues with drivers later on. ~ahill
|
||||
echo "monolith=true" >> /etc/tinyramfs/config
|
||||
# TODO: This is a terrible way to detect the kernel version, since anything
|
||||
# else under /lib/modules will cause this to break, such as having
|
||||
# multiple kernel versions present. ~ahill
|
||||
tinyramfs -k $(ls /lib/modules) /boot/initramfs
|
||||
Loading…
x
Reference in New Issue
Block a user