Bug 211419 - [NEW PORT] misc/linux-kernel: Build customized Linux kernels
Summary: [NEW PORT] misc/linux-kernel: Build customized Linux kernels
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords: feature, patch
Depends on:
Blocks:
 
Reported: 2016-07-28 09:49 UTC by Tobias Kortkamp
Modified: 2016-08-14 09:20 UTC (History)
2 users (show)

See Also:


Attachments
linux-kernel.shar (165.73 KB, text/plain)
2016-07-28 09:49 UTC, Tobias Kortkamp
tobik: maintainer-approval+
Details
linux-kernel.shar (167.91 KB, text/plain)
2016-07-29 07:04 UTC, Tobias Kortkamp
tobik: maintainer-approval+
Details
linux-kernel.shar (167.89 KB, text/plain)
2016-08-10 13:57 UTC, Tobias Kortkamp
tobik: maintainer-approval+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Kortkamp freebsd_committer 2016-07-28 09:49:10 UTC
Created attachment 173064 [details]
linux-kernel.shar

Build customized Linux kernels in the ports tree.  You can provide your own Linux configuration files with the LINUX_KCONFIG make variable and the port supports running Linux' menuconfig (among other targets) via `make _menuconfig`.

Poudriere testbuilds on FreeBSD 9.3/amd64, 10.3/amd64 are fine.  portlint -AC has this to say:

WARN: Makefile: [133]: possible direct use of command "patch" found. use ${PATCH} instead.
WARN: Makefile: using hyphen in PORTNAME. consider using PKGNAMEPREFIX and/or PKGNAMESUFFIX.
0 fatal errors and 2 warnings found.

The first warning is a false positive.  Considering there are various ports with hyphens in their name I ignored it, but I'm not opposed to renaming the port if this is wanted.

I'm planning on tracking the most recent stable kernel, which is 4.6.5 at the moment.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-28 10:12:02 UTC
Thanks Tobias

Can we look at a slightly better COMMENT and pkg-descr, perhaps describing why one might want to install or use it (particularly if you have some use cases in mind)
Comment 2 Tobias Kortkamp freebsd_committer 2016-07-29 07:04:31 UTC
Created attachment 173087 [details]
linux-kernel.shar

Updated pkg-descr, introduced 2 new options to skip (or not) installation of kernel modules and firmware files, and enabled building on FreeBSD/i386 (though only for 32-Bit kernels).

Unsure what to do about COMMENT.  Seems fine to me as is.  Suggestions welcome.
Comment 3 Kurt Jaeger freebsd_committer 2016-08-01 06:13:35 UTC
testbuilds are fine. What about putting it below emulators/ instead of misc/ ?
Comment 4 Tobias Kortkamp freebsd_committer 2016-08-10 13:57:02 UTC
Created attachment 173508 [details]
linux-kernel.shar

Update to 4.6.6 (Changes: https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.6.6).  Also moved it to devel/ as suggested by Mathieu Arnold.

Poudriere testport on FreeBSD {9.3/i386,10.2/amd64} ok
Comment 5 Kurt Jaeger freebsd_committer 2016-08-14 07:00:59 UTC
testbuilds@work
Comment 6 Kurt Jaeger freebsd_committer 2016-08-14 09:20:34 UTC
Committed, thanks!
Comment 7 commit-hook freebsd_committer 2016-08-14 09:20:34 UTC
A commit references this bug:

Author: pi
Date: Sun Aug 14 09:20:23 UTC 2016
New revision: 420185
URL: https://svnweb.freebsd.org/changeset/ports/420185

Log:
  New port: devel/linux-kernel

  The Linux kernel.

  This port is a building block for creating custom Linux appliances in
  FreeBSD as part of your regular package build without a Linux VM or
  jail.

  Provide your own Linux kernel configuration file via the LINUX_KCONFIG
  make variable, or create your own via support of Linux' config tools.

  The default configuration comes with QEMU/KVM guest support.

  WWW: https://www.kernel.org/

  PR:		211419
  Submitted by:	Tobias Kortkamp <t@tobik.me>
  Reviewed by:	koobs

Changes:
  head/devel/Makefile
  head/devel/linux-kernel/
  head/devel/linux-kernel/Makefile
  head/devel/linux-kernel/distinfo
  head/devel/linux-kernel/files/
  head/devel/linux-kernel/files/patch-Documentation_DocBook_media_Makefile
  head/devel/linux-kernel/files/patch-arch_x86_Makefile
  head/devel/linux-kernel/files/patch-arch_x86_tools_relocs.c
  head/devel/linux-kernel/files/patch-freebsd-build-support_include_bits_auxv.h
  head/devel/linux-kernel/files/patch-freebsd-build-support_include_elf.h
  head/devel/linux-kernel/files/patch-scripts_kconfig_lxdialog_check-lxdialog.sh
  head/devel/linux-kernel/files/patch-scripts_package_buildtar
  head/devel/linux-kernel/pkg-descr