Rebuilding Debian's kernel

(loosely following https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#s-common-official)

pbuilder environment

Install pbuiler and a couple of helper packages:
apt install pbuilder eatmydata pigz build-essentialubuntu-archive-keyring debian-keyring debian-archive-keyring devscripts 

Edit or copy the attached pbuilderrc to /etc/pbuilderrc

Set-up first build environment, e.g.
DIST=buster ARCH=amd64 pbuilder create

Test build

Suppose we wanted to rebuild gzip:
mkdir -p /srv/pbuilder/sources/gzip
cd /srv/pbuilder/sources/gzip
dget -d  http://deb.debian.org/debian/pool/main/g/gzip/gzip_1.9-3.dsc
DIST=buster ARCH=amd64 pbuilder build gzip_1.9-3.dsc

The should build the packages which can then be found under /srv/pbuilder/buster-amd64/results, e.g.
-rw-r--r-- 1 root root 103480 Jul  9 06:00 gzip-dbgsym_1.9-3_amd64.deb
-rw-r--r-- 1 root root 121648 Jul  9 06:00 gzip-win32_1.9-3_all.deb
-rw-r--r-- 1 root root  14420 Jul  9 05:59 gzip_1.9-3.debian.tar.xz
-rw-r--r-- 1 root root   1077 Jul  9 05:59 gzip_1.9-3.dsc
-rw-r--r-- 1 root root   5887 Jul  9 06:00 gzip_1.9-3_amd64.buildinfo
-rw-r--r-- 1 root root   2078 Jul  9 06:00 gzip_1.9-3_amd64.changes
-rw-r--r-- 1 root root 128180 Jul  9 06:00 gzip_1.9-3_amd64.deb

Rebuild Debian's kernel

Debian's kernel builds are a bit special, i.e. let's try the interactive way
DIST=buster ARCH=amd64 pbuilder login
sed -i 's/^#deb-src/deb-src/' /etc/apt/sources.list
apt update
apt -y install build-essential fakeroot devscripts
apt-get -y build-dep linux
cd /build
apt-get -y source linux
cd linux-*
# [to be continued]
-- CarstenAulbert - 09 Jul 2019

Topic attachments
I Attachment Action Size Date Who Comment
pbuilderrcEXT pbuilderrc manage 3 K 09 Jul 2019 - 05:36 CarstenAulbert  
This topic: ATLAS > webHome > KernelRebuildPbuilder
Topic revision: 09 Jul 2019, CarstenAulbert
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback