From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Thorsten Leemhuis <linux@leemhuis.info>,
Jonathan Corbet <corbet@lwn.net>
Cc: Randy Dunlap <rdunlap@infradead.org>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
regressions@lists.linux.dev
Subject: Re: [PATCH v3] docs: describe how to quickly build a trimmed kernel
Date: Mon, 6 Mar 2023 11:14:30 +0700 [thread overview]
Message-ID: <ZAVopho26SPotT6v@debian.me> (raw)
In-Reply-To: <1a788a8e7ba8a2063df08668f565efa832016032.1678021408.git.linux@leemhuis.info>
[-- Attachment #1: Type: text/plain, Size: 2681 bytes --]
On Sun, Mar 05, 2023 at 02:04:44PM +0100, Thorsten Leemhuis wrote:
> +.. _patching_sbs:
> +
> + * In case you want to apply a kernel patch, do so now. Often a command like
> + this will do the trick::
> +
> + patch -p1 < ../proposed-fix.patch
> +
> + If the ``-p1`` is actually needed, depends on how the patch was created; in
> + case it does not apply thus try without it.
> +
> + If you cloned the sources with git and anything goes sideways, run ``git
> + reset --hard`` to undo any changes to the sources.
Alternatively, if you have ``b4`` installed, you can prepare the patch
with ``b4 am -l <message-id of the patch>``. The -l option adds a Link:
to lore.kernel.org for the patch. Apply the resulting patch with
``git am``.
It is often wise to branch-off from mainline before applying patches, to
keep the remote-tracking mainline pristine. Create a branch with ``git
checkout -b <branch name>``.
> +Changes merged into the mainline repository are only synced to the master branch
> +of the Linux stable repository every few hours. This lag most of the time is
> +not something to worry about; but in case you really need the latest code, just
> +add the mainline repo as additional remote and checkout the code from there::
> +
> + git remote add mainline \
> + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> + git fetch mainline
> + git checkout --detach mainline/master
You will most likely change the tracking remote for your master branch
to mainline by ``git branch --set-upstream-to=mainline/master``.
> +The step-by-step guide uses the default make targets (e.g. 'bzImage' and
> +'modules' on x86) to build the image and the modules of your kernel, which later
> +steps of the guide then install. You instead can also directly build everything
> +and directly package it up by using one of the following targets:
> +
> + * ``make -j $(nproc --all) bindeb-pkg`` to generate a deb package
> +
> + * ``make -j $(nproc --all) binrpm-pkg`` to generate a rpm package
> +
> + * ``make -j $(nproc --all) tarbz2-pkg`` to generate a bz2 compressed tarball
I used to try compiling kernel in rpm-based systems (at that time
CentOS). make binrpm-pkg generates kernel headers, image, and sanitized
kernel headers for libc packages. These three packages have to be
installed together. However, the generated libc headers package most
likely overwrite distro-installed one, thus rebuilding the world is
necessary. I mind of that significant overhead, so I proceed to manually
install the kernel.
Thanks.
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-03-06 4:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-05 13:04 [PATCH v3] docs: describe how to quickly build a trimmed kernel Thorsten Leemhuis
2023-03-06 4:14 ` Bagas Sanjaya [this message]
2023-03-06 6:03 ` Thorsten Leemhuis
2023-03-06 4:19 ` Bagas Sanjaya
2023-03-06 5:40 ` Thorsten Leemhuis
2023-03-06 8:57 ` Bagas Sanjaya
2023-03-06 9:07 ` Thorsten Leemhuis
2023-03-07 2:57 ` Bagas Sanjaya
2023-03-09 14:42 ` Greg KH
2023-03-14 18:35 ` Jonathan Corbet
2023-03-15 4:17 ` Bagas Sanjaya
2023-03-15 9:28 ` Thorsten Leemhuis
2023-03-16 18:27 ` Jonathan Corbet
2023-03-22 13:47 ` Thorsten Leemhuis
2023-03-23 17:24 ` Jonathan Corbet
2023-03-23 17:37 ` Thorsten Leemhuis
2023-03-23 18:08 ` Jonathan Corbet
2023-03-15 4:19 ` Bagas Sanjaya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZAVopho26SPotT6v@debian.me \
--to=bagasdotme@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@leemhuis.info \
--cc=lukas.bulwahn@gmail.com \
--cc=rdunlap@infradead.org \
--cc=regressions@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).