Skip to content
Snippets Groups Projects
Commit 6d9d6d2e authored by Martyn Welch's avatar Martyn Welch Committed by Emanuele Aina
Browse files

Tweak How to Build Your Own Kernel as example for code highlighting


Removing default code highlighting requires us to explicitly mark code we
wish to be highlighted. Tweak howtobuildyourownkernel.md to act as a show
case of how to do this.

Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
parent f125a68d
No related branches found
No related tags found
1 merge request!221Use Hugo's Chroma highlighter rather than Highlight.js
Pipeline #250007 passed
......@@ -222,8 +222,10 @@ copy in the generated patch:
Add the following to the end of `debian/patches/series`:
# Trivial driver example
apertis/example/0001-Add-trivial-driver.patch
``` bash
# Trivial driver example
apertis/example/0001-Add-trivial-driver.patch
```
These changes need to be committed into the git repository:
......@@ -262,7 +264,9 @@ specific to a sub-architecture build.
We will treat the trivial driver as architecture independent and build
it as a module. Add the following to the end of `debian/config/config`:
CONFIG_TRIVIAL=m
``` bash numberLines
CONFIG_TRIVIAL=m
```
This change will need committing:
......@@ -288,11 +292,13 @@ use for this to the command with the `-l` option.
The changelog (`debian/changelog`) should be opened in an editor and the
changes made described, for example:
linux (4.19.20-1co5dev1) apertis; urgency=medium
``` text numberLines
linux (4.19.20-1co5dev1) apertis; urgency=medium
* Add and enable trivial driver example
* Add and enable trivial driver example
-- Martyn Welch <martyn.welch@collabora.co.uk> Wed, 24 Apr 2019 09:55:43 +0100
-- Martyn Welch <martyn.welch@collabora.co.uk> Wed, 24 Apr 2019 09:55:43 +0100
```
This should also be committed to git:
......@@ -309,28 +315,30 @@ required for the build installed:
The following script can be used to perform the build (save as
`build-debian-kernel`):
#!/bin/sh
set -x
PARALLEL=$(/usr/bin/nproc)
export DEB_BUILD_PROFILES="pkg.linux.notools nodoc noudeb cross nopython"
export DEB_BUILD_OPTIONS=parallel=$PARALLEL
if [ -n "$1" ] ; then
ARCH="-a$1"
else
ARCH=""
fi
gbp buildpackage \
--git-ignore-branch --git-overlay \
--git-prebuild='debian/rules debian/control || true' \
--git-builder='debuild -eDEBIAN_KERNEL_USE_CCACHE=1 -i -I' \
--git-export-dir='~/build' \
--git-tarball-dir='~/tarballs' \
${ARCH} \
-B -d -uc -us
``` bash numberLines
#!/bin/sh
set -x
PARALLEL=$(/usr/bin/nproc)
export DEB_BUILD_PROFILES="pkg.linux.notools nodoc noudeb cross nopython"
export DEB_BUILD_OPTIONS=parallel=$PARALLEL
if [ -n "$1" ] ; then
ARCH="-a$1"
else
ARCH=""
fi
gbp buildpackage \
--git-ignore-branch --git-overlay \
--git-prebuild='debian/rules debian/control || true' \
--git-builder='debuild -eDEBIAN_KERNEL_USE_CCACHE=1 -i -I' \
--git-export-dir='~/build' \
--git-tarball-dir='~/tarballs' \
${ARCH} \
-B -d -uc -us
```
It can be run with the required architecture as a command line option.
This will limit the build to the supplied architecture, rather than
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment