diff --git a/docs/how-to/develop-customize/build-kernel.md b/docs/how-to/develop-customize/build-kernel.md index 2a16ab4..898fe71 100644 --- a/docs/how-to/develop-customize/build-kernel.md +++ b/docs/how-to/develop-customize/build-kernel.md @@ -33,59 +33,7 @@ Otherwise, skip ahead to {ref}`how-to-build-kernel-obtain-source`. To build an Ubuntu kernel, you will need to enable the necessary source repositories in the `sources.list` or `ubuntu.sources` file. -````{only} docx -+ Noble Numbat 24.04 (and newer) - - Add "deb-src" to the `Types:` line in the `/etc/apt/sources.list.d/ubuntu.sources` file. - - ```{code-block} shell - Types: deb deb-src - URIs: http://archive.ubuntu.com/ubuntu - Suites: noble noble-updates noble-backports - Components: main universe restricted multiverse - Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg - ``` - -+ Mantic Minotaur 23.10 (and older) - - Check that you have the following entries in the `/etc/apt/sources.list` - file. If not, add or uncomment these lines for your Ubuntu release. - - ```{code-block} shell - deb-src http://archive.ubuntu.com/ubuntu jammy main - deb-src http://archive.ubuntu.com/ubuntu jammy-updates main - ``` -```` - -``````{only} default -`````{tab-set} -````{tab-item} Noble Numbat 24.04 (and newer) - -Add "deb-src" to the `Types:` line in the `/etc/apt/sources.list.d/ubuntu.sources` file. - -```{code-block} shell -:emphasize-lines: 1 - -Types: deb deb-src -URIs: http://archive.ubuntu.com/ubuntu -Suites: noble noble-updates noble-backports -Components: main universe restricted multiverse -Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg -``` -```` - -````{tab-item} Mantic Minotaur 23.10 (and older) - -Check that you have the following entries in the `/etc/apt/sources.list` -file. If not, add or uncomment these lines for your Ubuntu release. - -```{code-block} shell -deb-src http://archive.ubuntu.com/ubuntu jammy main -deb-src http://archive.ubuntu.com/ubuntu jammy-updates main -``` -```` -````` -`````` +See {file}`` for details. (how-to-build-kernel-install-packages)= ### Install required packages diff --git a/docs/how-to/source-code/enable-source-repositories.md b/docs/how-to/source-code/enable-source-repositories.md new file mode 100644 index 0000000..4c9f3c1 --- /dev/null +++ b/docs/how-to/source-code/enable-source-repositories.md @@ -0,0 +1,70 @@ +# How to enable kernel source package repositories + +If you want to build or modify an Ubuntu kernel package from source, you will first need the kernel source code. +This is provided via `deb-src` - a line in the {file}`sources.list` or {file}`ubuntu.sources` file that points to repositories containing source packages instead of pre-built binaries. +`deb-src` will need to be enabled on your build machine. + +## Enable `deb-src` + +````{only} docx ++ Noble Numbat 24.04 (and newer) + + Add "deb-src" to the `Types:` line in the `/etc/apt/sources.list.d/ubuntu.sources` file. + + ```{code-block} shell + Types: deb deb-src + URIs: http://archive.ubuntu.com/ubuntu + Suites: noble noble-updates noble-backports + Components: main universe restricted multiverse + Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg + ``` + ++ Mantic Minotaur 23.10 (and older) + + Check that you have the following entries in the `/etc/apt/sources.list` + file. If not, add or uncomment these lines for your Ubuntu release. + + ```{code-block} shell + deb-src http://archive.ubuntu.com/ubuntu jammy main + deb-src http://archive.ubuntu.com/ubuntu jammy-updates main + ``` +```` + +``````{only} default +`````{tab-set} +````{tab-item} Noble Numbat 24.04 (and newer) + +Add "deb-src" to the `Types:` line in the `/etc/apt/sources.list.d/ubuntu.sources` file. + +```{code-block} shell +:emphasize-lines: 1 + +Types: deb deb-src +URIs: http://archive.ubuntu.com/ubuntu +Suites: noble noble-updates noble-backports +Components: main universe restricted multiverse +Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg +``` +```` + +````{tab-item} Mantic Minotaur 23.10 (and older) + +Check that you have the following entries in the `/etc/apt/sources.list` +file. If not, add or uncomment these lines for your Ubuntu release. + +```{code-block} shell +deb-src http://archive.ubuntu.com/ubuntu jammy main +deb-src http://archive.ubuntu.com/ubuntu jammy-updates main +``` +```` +````` +`````` + +## Update package list + +Once you have updated {file}`sources.list` or {file}`ubuntu.sources`, update the package list for the changes to take effect: + +```{code-block} shell +sudo apt update +``` + diff --git a/docs/how-to/source-code/index.md b/docs/how-to/source-code/index.md index 5dcac03..5c2b979 100644 --- a/docs/how-to/source-code/index.md +++ b/docs/how-to/source-code/index.md @@ -8,4 +8,5 @@ preparing the kernel before the build process. :maxdepth: 1 Obtain kernel source using Git -``` \ No newline at end of file +Enable kernel source package repositories +```