diff options
| author | Arslaan Pathan <[email protected]> | 2026-06-08 19:59:29 +1200 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-06-08 19:59:29 +1200 |
| commit | 93f35914637f53007f4fddb4d64069612c7b2b2f (patch) | |
| tree | 5bb92695711b46eb919852f3a3458bf9ea76a1d2 | |
| parent | 18ee85b9efe6ab31db652e9a9f919603ca5edd4b (diff) | |
| download | yerbalinux-93f35914637f53007f4fddb4d64069612c7b2b2f.tar.xz yerbalinux-93f35914637f53007f4fddb4d64069612c7b2b2f.zip | |
Fix init issue and work on making graphical tty show
| -rw-r--r-- | initramfs_init | 13 | ||||
| -rw-r--r-- | nix/linux_config | 12 | ||||
| -rw-r--r-- | nix/rootfs.nix | 8 |
3 files changed, 28 insertions, 5 deletions
diff --git a/initramfs_init b/initramfs_init index ef327ce..b1aface 100644 --- a/initramfs_init +++ b/initramfs_init @@ -35,8 +35,19 @@ echo "[yerba-initramfs/init] Mounted tmpfs at /mnt/overlay and created upper, wo mount -t overlay overlay -o lowerdir=/mnt/root,upperdir=/mnt/overlay/upper,workdir=/mnt/overlay/work /mnt/overlay/merged echo "[yerba-initramfs/init] Mounted OverlayFS at /mnt/overlay/merged" +if [ ! -c /dev/console ]; then + echo "[yerba-initramfs/init] console device not found, creating" + mknod -m 600 /dev/console c 5 1 +fi + + +if [ ! -c /dev/tty0 ]; then + echo "[yerba-initramfs/init] tty0 device not found, creating" + mknod -m 620 /dev/tty0 c 4 0 +fi + echo "[yerba-initramfs/init] Switching to overlay root..." -exec switch_root /mnt/overlay/merged /sbin/init +exec switch_root /mnt/overlay/merged /init echo "[yerba-initramfs/init] switch_root failed, dropping to shell" exec /bin/sh diff --git a/nix/linux_config b/nix/linux_config index aa9d8d8..951358e 100644 --- a/nix/linux_config +++ b/nix/linux_config @@ -3405,7 +3405,7 @@ CONFIG_DRM_PANEL=y # end of Drivers for system framebuffers # CONFIG_DRM_APPLETBDRM is not set -# CONFIG_DRM_BOCHS is not set +CONFIG_DRM_BOCHS=y # CONFIG_DRM_CIRRUS_QEMU is not set # CONFIG_DRM_GM12U320 is not set # CONFIG_DRM_UDL is not set @@ -5471,3 +5471,13 @@ CONFIG_ARCH_USE_MEMTEST=y CONFIG_IO_URING_ZCRX=y CONFIG_IO_URING_BPF=y + +CONFIG_FB=y +CONFIG_FB_SIMPLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_DRM=y +CONFIG_DRM_SIMPLEDRM=y +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y diff --git a/nix/rootfs.nix b/nix/rootfs.nix index fc5d321..d463af7 100644 --- a/nix/rootfs.nix +++ b/nix/rootfs.nix @@ -1,15 +1,17 @@ -{ stdenv, fetchgit, busybox, squashfsTools }: +{ stdenv, fetchgit, busybox, squashfsTools, linuxHeaders }: stdenv.mkDerivation { name = "rootfs-yerba"; src = ./.; buildInputs = [ squashfsTools ]; - nativeBuildInputs = [ squashfsTools ]; + nativeBuildInputs = [ squashfsTools linuxHeaders ]; buildPhase = '' mkdir -p rootfs mkdir -p rootfs/{bin,sbin,etc,proc,sys,dev,home,var,usr,root,mnt,tmp} cp -a ${busybox}/_install/. rootfs/ - # this says permission denied, cant be bothered to debug, let's just hope we can chroot to /sbin/init in the initramfs and it works? + chmod -R u+w rootfs + ln -sf bin/busybox rootfs/init + ln -sf bin/busybox rootfs/sbin/init # ln -sf sbin/init rootfs/init echo "proc /proc proc defaults 0 0" > rootfs/etc/fstab echo "sysfs /sys sysfs defaults 0 0" >> rootfs/etc/fstab |
