On Wed, 16 May 2018 20:39:02 +0530
Manas Mangaonkar <manasmangaonkar(a)gmail.com> wrote:
> Yes, if someone wishes to build and maintain that kernel.
How difficult is this ? newbie, sophmore cse student but would like
to give this a shot if this isn't too difficult.Want to start
contributing.
I build a custom kernel from the src.rpm with a patch to random.c to add
code so that my hardware RNG is used to reseed the chacha20 PRNG on a
periodic basis. That is similar, if easier, to what you would have to
do to maintain a different kernel. The first time would be a bear, then
after that it would just be repeating the procedure.
I use the older rpmbuild method, so I'm not sure how that agrees with
the currently recommended method. Here goes. This is long, and a lot
of the details are missing.
Install the rpmbuild packages.
Run rpmbuild-setuptree to build the rpmbuild directory tree in your
home directory.
Go to koji and get the kernel src.rpm
Run rpm -ivh to install it to the rpmbuild directory.
I then use screen to have a bunch of terms available, so I'm not
constantly having to switch directories, but you could just switch
between a bunch of virtual consoles.
Go into the ~/rpmbuild/SPECS directory. You'll see kernel.spec in
there.
Run rpmbuild -bp kernel.spec to expand the source.
When it is done, go into the ~/rpmbuild/BUILD/kernel[]/linux[]/
directory. Since fedora now builds all kernels from a git repository,
it is necessary to build patches for them from that git repository.
It's a PITA, but necessary.
Run git add .
Run git commit -a
Just add a throwaway comment and save.
Run git status.
Everything should be up to date.
Run git config user.name "blah"
Run git config user.email "blah(a)blah.com"
Run git branch clear to create a new branch for the clear linux kernel.
Run git checkout clear to set that as the working branch.
This is more complicated than I need, since you are basically creating
a patch from the fedora kernel to the clear kernel. Delete everything
in the branch except the hidden .git directory.
Grab the clear linux source tree and put it into the clear branch you
just cleaned up. tar? git pull?
Run git add .
Run git commit -a.
Put in a comment and save.
Run git status to be sure the branch is clean.
Run git format-patch clear-linux
Put the resulting patch in ~/rpmbuild/SOURCES with a unique numerical
prefix.
Put the patch name in ~/rpmbuild/SPECS/kernel.spec just before END OF
PATCHES.
Run rpmbuild -bb kernel.spec
You will have the kernel rpm files in ~/rpmbuild/RPMS/x86_64
The gotchas are left as an exercise for the reader (if you are a
newbie, there will be lots of them). :-) And it's rough, there is a
lot of optimization that I left out.
So it's a lot of work, but a great learning experience if you are up
for it.