From Fedora Project Wiki

m (1 revision(s))
 
(8 intermediate revisions by 7 users not shown)
Line 1: Line 1:
The following metadata was found in MoinMoin that could not be converted
The following metadata was found in MoinMoin that could not be converted
to a useful value in MediaWiki:
to a useful value in MediaWiki:
Line 7: Line 5:


* %: define buildid .local
* %: define buildid .local
2/6/2011 RAF - Recommend in the "build the kernel" option: since you told us to rename .local to .mycustomkernel (or what have you), just tell us to go build the firmware right away.  As it is now, you have to get down to the "install the kernel" section before I realized that I had to rebuild the firmware.
2/6/2011 RAF - In "install the new kernel," suggest putting the paragraph, "If you changed the name of your kernel as requested,..." in order first, above the one-liner that just installs the kernel.  For the one-liner, say "If you just rebuilt the kernel only, do this..."
2/6/2011 RAF - The full kernel build process took 1hr 45min on a OptiPlex 755 w/reasonably fast SATA drive and dual core processor.
10-apr-2011 aakolov - should the pure vanilla kernel be built the same way or there is a special approach for that ?
--[[User:Smouch|Smouch]] ([[User talk:Smouch|talk]]) 11:45, 21 February 2015 (UTC)I would really like to see a page describing how to do non-fedora specific kernel development on a Fedora machine.
IOW, I wish to be able submit patches into the non-Fedora specific kernel development tree - you know, torvalds git repo - but, am constantly fighting to reconcile the generic instructions (for example: [http://kernelnewbies.org/KernelBuild]) and performing testing of those modifications on my Fedora machine.  For some reason, the two sets of instructions (this and that) are somehow subtly conflicting.
=== DNF vs. YUM ===
[[User:Ilmostro|Ilmostro]] ([[User talk:Ilmostro|talk]])
I'm not sure when/why the references to pre-Fedora22 systems were removed and replaced with '''dnf-specific''' instructions.  It would be wise to leave '''yum-specific''' instructions as well, even if it's for historical purposes.
=== Outdated? ===
I think that ".$subver" should be removed and patches should be created using ''git format-patch'', otherwise build fails. Sections 3.3, 3.4 and 3.5 should be updated. [[User:Frafra|Frafra]] ([[User talk:Frafra|talk]]) 13:34, 23 December 2015 (UTC)
: [[User:Eha|Eha]] ([[User talk:Eha|talk]]) 11:19, 24 January 2016 (UTC) I agree, I have tried to build a kernel with the reiser4 patch and the guide completely misses on how to get it to compile.<br> It fails due to the format of the patch, which isn't a 'git' patch (and nowhere is it mentioned on the Howto).
=== Proposed Changes ===
[[User:Eha|Eha]] ([[User talk:Eha|talk]]) 11:19, 24 January 2016 (UTC) The following is what I found during my attempt to build a kernel with <code>reiser4-for-4.3.0.patch</code> (I have not changed the Wiki as I'm not sure I am on the right track to get it to build):
* In section 3.5 it says: 'The patch then needs to be applied..' <br> I could not find any place where the ApplyPatch was called in the <code>kernel.spec</code> file, and it seems to be done 'automatically' as long as the patch is listed in the patch section of <code>kernel.spec</code> - so these lines can be removed.
* A description of how to convert an 'ordinary' diff generated patch to a git patch
** An example on this may be a good idea, here the <code>reiser4-for-4.3.0.patch</code> could be used (but it's a bit large, so maybe some smaller patch would be better).
* Add a section describing the actual disk space requirements to build the kernel<br>It is hard to guess, and you can only see that you didn't have enough, if you have enough the build process removes a number of intermediate files, so it doesn't leave any clues of what you need.<br> I found that a partition with 20475272 1k blocks was NOT enough when I used ext3 filesystem (using reiserfs, it provided apx 1.1GB more available, and was enough to build - without pae and zen).
== Seems outdated/incomplete ==
The information here seems rather outdated/incomplete. As an example, the patches do not seem to be automatically applied. I saw a comment about `ApplyPatch` not being called anywhere in `kernel.spec`, but `ApplyOptionalPatch` is. Additionally there is some extra git setup that is needed unless you want to get some strange errors. This forum post summarises it pretty neatly, and with the proper level of annoyance at the documentation: https://forum.level1techs.com/t/compile-fedora-kernel-the-fedora-way/149242
I wrote a quick guide on how to compile a custom patched kernel for fedora 34 over here. I do not know how to update this page here so if anyone has the time and energy to update this documentation, future tinkerers could be spared some headache.
My small guide:
https://odysee.com/@mumblingdrunkard:7/20210405-fedora-patch-compile-and-install-kernel:0
Or if you want the AsciiDoc source:
[[File:Asciidoc source of above article.asciidoc|thumb|AsciiDoc source]]

Latest revision as of 19:21, 9 April 2021

The following metadata was found in MoinMoin that could not be converted to a useful value in MediaWiki:

  • : END OF PATCH APPLICATIONS
  • %: define buildid .local

2/6/2011 RAF - Recommend in the "build the kernel" option: since you told us to rename .local to .mycustomkernel (or what have you), just tell us to go build the firmware right away. As it is now, you have to get down to the "install the kernel" section before I realized that I had to rebuild the firmware.

2/6/2011 RAF - In "install the new kernel," suggest putting the paragraph, "If you changed the name of your kernel as requested,..." in order first, above the one-liner that just installs the kernel. For the one-liner, say "If you just rebuilt the kernel only, do this..."

2/6/2011 RAF - The full kernel build process took 1hr 45min on a OptiPlex 755 w/reasonably fast SATA drive and dual core processor.

10-apr-2011 aakolov - should the pure vanilla kernel be built the same way or there is a special approach for that ?

--Smouch (talk) 11:45, 21 February 2015 (UTC)I would really like to see a page describing how to do non-fedora specific kernel development on a Fedora machine. IOW, I wish to be able submit patches into the non-Fedora specific kernel development tree - you know, torvalds git repo - but, am constantly fighting to reconcile the generic instructions (for example: [1]) and performing testing of those modifications on my Fedora machine. For some reason, the two sets of instructions (this and that) are somehow subtly conflicting.

DNF vs. YUM

Ilmostro (talk) I'm not sure when/why the references to pre-Fedora22 systems were removed and replaced with dnf-specific instructions. It would be wise to leave yum-specific instructions as well, even if it's for historical purposes.

Outdated?

I think that ".$subver" should be removed and patches should be created using git format-patch, otherwise build fails. Sections 3.3, 3.4 and 3.5 should be updated. Frafra (talk) 13:34, 23 December 2015 (UTC)

Eha (talk) 11:19, 24 January 2016 (UTC) I agree, I have tried to build a kernel with the reiser4 patch and the guide completely misses on how to get it to compile.
It fails due to the format of the patch, which isn't a 'git' patch (and nowhere is it mentioned on the Howto).

Proposed Changes

Eha (talk) 11:19, 24 January 2016 (UTC) The following is what I found during my attempt to build a kernel with reiser4-for-4.3.0.patch (I have not changed the Wiki as I'm not sure I am on the right track to get it to build):

  • In section 3.5 it says: 'The patch then needs to be applied..'
    I could not find any place where the ApplyPatch was called in the kernel.spec file, and it seems to be done 'automatically' as long as the patch is listed in the patch section of kernel.spec - so these lines can be removed.
  • A description of how to convert an 'ordinary' diff generated patch to a git patch
    • An example on this may be a good idea, here the reiser4-for-4.3.0.patch could be used (but it's a bit large, so maybe some smaller patch would be better).
  • Add a section describing the actual disk space requirements to build the kernel
    It is hard to guess, and you can only see that you didn't have enough, if you have enough the build process removes a number of intermediate files, so it doesn't leave any clues of what you need.
    I found that a partition with 20475272 1k blocks was NOT enough when I used ext3 filesystem (using reiserfs, it provided apx 1.1GB more available, and was enough to build - without pae and zen).

Seems outdated/incomplete

The information here seems rather outdated/incomplete. As an example, the patches do not seem to be automatically applied. I saw a comment about ApplyPatch not being called anywhere in kernel.spec, but ApplyOptionalPatch is. Additionally there is some extra git setup that is needed unless you want to get some strange errors. This forum post summarises it pretty neatly, and with the proper level of annoyance at the documentation: https://forum.level1techs.com/t/compile-fedora-kernel-the-fedora-way/149242

I wrote a quick guide on how to compile a custom patched kernel for fedora 34 over here. I do not know how to update this page here so if anyone has the time and energy to update this documentation, future tinkerers could be spared some headache.

My small guide: https://odysee.com/@mumblingdrunkard:7/20210405-fedora-patch-compile-and-install-kernel:0

Or if you want the AsciiDoc source: File:Asciidoc source of above article.asciidoc