From 6d9d6d2edcab1d1ed7acdaf08636fcd72ecdc99c Mon Sep 17 00:00:00 2001 From: Martyn Welch <martyn.welch@collabora.com> Date: Fri, 23 Apr 2021 18:32:30 +0100 Subject: [PATCH] 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: Martyn Welch <martyn.welch@collabora.com> --- content/guides/howtobuildyourownkernel.md | 64 +++++++++++++---------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/content/guides/howtobuildyourownkernel.md b/content/guides/howtobuildyourownkernel.md index 6df4fa620..ac326c460 100644 --- a/content/guides/howtobuildyourownkernel.md +++ b/content/guides/howtobuildyourownkernel.md @@ -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 -- GitLab