From owner-freebsd-current@freebsd.org Sun Jan 15 18:30:51 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67A4CCB16F1 for ; Sun, 15 Jan 2017 18:30:51 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 487B51639 for ; Sun, 15 Jan 2017 18:30:51 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 44F28CB16F0; Sun, 15 Jan 2017 18:30:51 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4491ECB16EF for ; Sun, 15 Jan 2017 18:30:51 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D15C91636; Sun, 15 Jan 2017 18:30:50 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x231.google.com with SMTP id r126so132031886wmr.0; Sun, 15 Jan 2017 10:30:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8gVPH95sumN8Rh7lm0kK6bueadNZp2M6ttT3Su8UZ6I=; b=kOoPxNR5dt1/Lpg2WJb+Paca1OshtlGpb5OUiS+AheVtTRODjDDjS4qFmaw2J7/v0G c4AyP8AQW+2/CSklVvuOuYKbNYCJGP0YXTFvSpQJcR6uTtzsJcbVdbF+keSjsxxyiDcs HVc3sJXpqtgolh3mugP95c/cgJIXuIehV6ev1zqJOWA5N7Lkx4+xPOcK6DLNWt1zi7nG y9hqchj29RnxeeAfyja8yvE4SofZj4aNePMvKYH+H+sIzif7ZJNxt59ZuV67gZk71scO 1FS+OnNfWSDQs2+ESJOlxz/LqbfMfAYp6boLf8cLV+BQ3+kA84PTHrQwzW6V4Qf6LC/w i2yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8gVPH95sumN8Rh7lm0kK6bueadNZp2M6ttT3Su8UZ6I=; b=BpR1aqbM3w0DwK+dcqJd2DWgLlTDMGf0S1kLm+C6iaJNc9RDCjhzSNzR8VgEx5vj1Q 7QPk+Wk9SkhUuH6RimH3zzAbdI4CgKJyeHLelcKt4ruqLOQsn+pF/keaZB4Hv0zB/tBn vSXuTckHq+hceSDXiDxRhlCWbrhsDRF861YZaFtPcYbqbz+oDB4KHwfL/GvWheIbl4eS 6r3IK9wJYD0z9ZvCKXDHaSGW/ov9j6tva2s6B66/xX4dSSCPy6eX3LeCm6eSovTTLYxb cP+xf5rzQP9BwxYtyt4HPw5nNYj2dCpRAG4Aotu4w39zMXlYjpFw8rcoo5qiumE8z2cj zrKQ== X-Gm-Message-State: AIkVDXJzxDmqouIPekeGnpHrh+EZiVrg+vgptku67IEJYovqU2gNpaAzr9+PbzDeDV/Q+pSFAC7XAMXDiRBX0A== X-Received: by 10.28.165.130 with SMTP id o124mr8891277wme.129.1484505048451; Sun, 15 Jan 2017 10:30:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.82.162 with HTTP; Sun, 15 Jan 2017 10:30:47 -0800 (PST) In-Reply-To: <20170115180858.19f828bf@kalimero.tijl.coosemans.org> References: <20170115180858.19f828bf@kalimero.tijl.coosemans.org> From: Adrian Chadd Date: Sun, 15 Jan 2017 10:30:47 -0800 Message-ID: Subject: Re: Installing opt_*.h kernel headers To: Tijl Coosemans Cc: "current@freebsd.org" , Alexey Dokuchaev Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jan 2017 18:30:51 -0000 hi, As much as I'd like to see everything be default-options and ABI compliant, things like INET/INET6 throw that assumption under the bus a bit. (Yes, I'd love to see INET/INET6 be .ko's..) So yes, I'd like to see a solution to this too. I think installing the kernel config for the running kernel somewhere would be nice. No, not /usr/include, because you want it cycled /with/ the kernel you just installed. We already have the problem with /usr/lib/debug/ and where it puts kernel modules. We already have the 'one file' option, it's called 'kernel config', and so maybe: * store the kernel config with the built kernel; * have config patched to 'just' generate the .h files from the given config, and * let the build system use that if needed? However - it all feels terrible. Ideally (hah), there'd be separate submodules for vt/syscons and the modules would combine appropriately to provide increasing functionality - but that's a lot to ask given the complexity of the current system. 2c, -adrian On 15 January 2017 at 09:08, Tijl Coosemans wrote: > Hi, > > The latest version of x11/nvidia-driver contains a call to a syscons > function which is only available if the kernel config contains device > sc (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216050). The call > doesn't seem to be critical so I'd like to patch it like this: > > +#include "opt_syscons.h" > ... > +#ifdef DEV_SC > syscons stuff here > +#endif > > And add opt_syscons.h to SRCS in the module Makefile. > > This doesn't work however because sys/conf/kmod.mk creates empty opt_*.h > files in the module build directory. Only when KERNBUILDDIR is set does > it create opt_*.h files as symlinks to the same file in KERNBUILDDIR. > This means that to build this port correctly users would have to have a > kernel build directory (even if they just need the nvidia driver and > don't otherwise build kernels) and the ports tree would need some way to > find it (using KERNCONF etc.). > > It would be better if these opt_*.h files were installed along with the > kernel. Somewhere in /usr/include or /boot/kernel(.old)? Perhaps > concatenated into one file? Then kmod.mk could create symlinks to this > file if KERNBUILDDIR is undefined. Building a module directly from > sys/modules would then also just work without .if !defined(KERNBUILDDIR) > magic that several Makefiles contain. > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"