From b78025586b5b28043c8db40b9ed250b245edc2d6 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 23 Jan 2018 15:42:02 -0600 Subject: [PATCH 1/2] busybox: don't use utmp/wtmp on musl since they won't work anyway https://wiki.musl-libc.org/faq.html#Q:-Why-is-the-utmp/wtmp-functionality-only-implemented-as-stubs? --- pkgs/os-specific/linux/busybox/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/busybox/default.nix b/pkgs/os-specific/linux/busybox/default.nix index a8d5ab48ac21..e35c50450539 100644 --- a/pkgs/os-specific/linux/busybox/default.nix +++ b/pkgs/os-specific/linux/busybox/default.nix @@ -1,11 +1,13 @@ { stdenv, lib, buildPackages, fetchurl, fetchpatch , enableStatic ? false , enableMinimal ? false -, useMusl ? false, musl +, useMusl ? stdenv.hostPlatform.libc == "musl", musl , extraConfig ? "" , buildPlatform, hostPlatform }: +assert stdenv.hostPlatform.libc == "musl" -> useMusl; + let configParser = '' function parseconfig { @@ -24,6 +26,10 @@ let } ''; + libcConfig = lib.optionalString useMusl '' + CONFIG_FEATURE_UTMP n + CONFIG_FEATURE_WTMP n + ''; in stdenv.mkDerivation rec { @@ -69,6 +75,7 @@ stdenv.mkDerivation rec { ${extraConfig} CONFIG_CROSS_COMPILER_PREFIX "${stdenv.cc.targetPrefix}" + ${libcConfig} EOF make oldconfig From 329db7b49053245875e79fbc3dbe26755759dce8 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 23 Jan 2018 15:42:36 -0600 Subject: [PATCH 2/2] busybox: bump copybuf 4kB -> 64kB --- pkgs/os-specific/linux/busybox/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/os-specific/linux/busybox/default.nix b/pkgs/os-specific/linux/busybox/default.nix index e35c50450539..5a485cdcf9fe 100644 --- a/pkgs/os-specific/linux/busybox/default.nix +++ b/pkgs/os-specific/linux/busybox/default.nix @@ -73,6 +73,9 @@ stdenv.mkDerivation rec { # Set paths for console fonts. CONFIG_DEFAULT_SETFONT_DIR "/etc/kbd" + # Bump from 4KB, much faster I/O + CONFIG_FEATURE_COPYBUF_KB 64 + ${extraConfig} CONFIG_CROSS_COMPILER_PREFIX "${stdenv.cc.targetPrefix}" ${libcConfig}