Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 1 addition & 53 deletions docs/how-to/develop-customize/build-kernel.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}`</how-to/source-code/enable-source-repositories>` for details.

(how-to-build-kernel-install-packages)=
### Install required packages
Expand Down
70 changes: 70 additions & 0 deletions docs/how-to/source-code/enable-source-repositories.md
Original file line number Diff line number Diff line change
@@ -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
```

3 changes: 2 additions & 1 deletion docs/how-to/source-code/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ preparing the kernel before the build process.
:maxdepth: 1

Obtain kernel source using Git <obtain-kernel-source-git>
```
Enable kernel source package repositories <enable-source-repositories>
```
Loading