From 654a856e3c13bfa7a2bde1ca1d6153854139fad9 Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Mon, 8 Jun 2026 13:24:17 +1200 Subject: Make busybox static and start trying to make it not fail with the 'm' and 'resolv' libraries --- nix/busybox.nix | 4 +++- nix/busybox_config | 2 +- nix/iso.nix | 8 +++++++- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'nix') diff --git a/nix/busybox.nix b/nix/busybox.nix index f78ebeb..dab76a8 100644 --- a/nix/busybox.nix +++ b/nix/busybox.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, linuxHeaders }: +{ stdenv, fetchgit, linuxHeaders, mlib }: stdenv.mkDerivation { name = "busybox-yerba"; @@ -7,6 +7,8 @@ stdenv.mkDerivation { rev = "1_36_1"; hash = "sha256-lK8jlq1g2X9AhscZDiPf43koNbdMFYiLSAb9Y/OETnU="; }; + buildInputs = [ linuxHeaders mlib ]; + nativeBuildInputs = [ linuxHeaders mlib ]; preConfigure = '' cp ${./busybox_config} .config ''; diff --git a/nix/busybox_config b/nix/busybox_config index 95e639a..f600ad4 100644 --- a/nix/busybox_config +++ b/nix/busybox_config @@ -40,7 +40,7 @@ CONFIG_FEATURE_SYSLOG=y # # Build Options # -# CONFIG_STATIC is not set +CONFIG_STATIC=y # CONFIG_PIE is not set # CONFIG_NOMMU is not set # CONFIG_BUILD_LIBBUSYBOX is not set diff --git a/nix/iso.nix b/nix/iso.nix index 36cabf0..ab56ad9 100644 --- a/nix/iso.nix +++ b/nix/iso.nix @@ -6,11 +6,17 @@ stdenv.mkDerivation { buildInputs = [ xorriso ]; nativeBuildInputs = [ xorriso ]; buildPhase = '' + mkdir -p $out mkdir -p iso/boot/limine mkdir -p iso/EFI/BOOT mkdir -p iso/yerba - cp ${linux} iso/boot/bzImage + cp ${kernel} iso/boot/bzImage cp ${initramfs} iso/boot/initramfs.cpio.gz + cp ${../limine.conf} iso/boot/limine/limine.conf + cp ${limine}/limine-bios.sys ${limine}/limine-bios-cd.bin ${limine}/limine-uefi-cd.bin iso/boot/limine/ + cp ${limine}/BOOTX64.EFI ${limine}/BOOTIA32.EFI iso/EFI/BOOT/ + cp ${rootfs} iso/yerba/rootfs.squashfs + xorriso -as mkisofs -R -r -J -b boot/limine/limine-bios-cd.bin -no-emul-boot -boot-load-size 4 -boot-info-table -hfsplus -apm-block-size 2048 --efi-boot boot/limine/limine-uefi-cd.bin -efi-boot-part --efi-boot-image --protective-msdos-label iso -o $out/yerba-linux.iso ''; installPhase = '' echo "iso built" -- cgit v1.2.3