Download: queueing.h

Downloading: queueing.h Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs

"Monamacaz amahuan nicpia oncan ca hueyhuey caxtolli niman tepitoton matlactli".
The books I own should be sold, there are some fifteen very large and some ten small ones.

...

"Auh mochintin ynin que teteuhctin amo omazicamat ynin tlachihualiz. Ipampa inicuac ocalla que ynixiocaxtiltecah mochi opoliuhque ynin tlacuilol amahuan"
But of the feats of all these personalities there is nothing because the Spanish scum destroyed all the books of chronicles.

From the above phrase, it is evident the Nahuatl word caxtolli represents the number 15. So yes, this post was about utilizing the last Debian packaging for Linux kernel 5.5 series, i.e., 5.5.13, and applying upstream delta patches to bring it up to 5.5.15. However, as I was writing this post kernel 5.5.16 became available --which is what I will aim to patch and, subsequently, I will 'Add support for ZSTD-compressed kernel and initramfs' via a customized patch. And lastly, I will apply reiser4 for 5.5.5 patch --which still applies smoothly over kernel 5.5.15 and hopefully 5.5.16 &#59;) and build our hacked kernel.

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
git clone tag debian/5.5.13-2

As illustrated above, I began by creating a directory for the task, relative to current directory, and changed my location into it:

Shell

mkdir --verbose tekitl-5.5.x/build-caxtolli
cd tekitl-5.5.x/build-caxtolli

I cloned locally the Debian Sid (unstable) debian/5.5.13-2 tagged branch which provides the Debian Packaging for Linux 5.5.13:

Shell

git clone -b debian/5.5.13---single-branch https://anonscm.debian.org/git/kernel/linux.git

and followed by creating a new branch:

Shell

git switch -c metztli-5.5.caxtolli-ome

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
fetching linux kernel, delta patches, and verification files
Now we need to fetch the Linux kernel 5.5.13 -- to satisfy our previously cloned Debian packaging for kernel 5.5.13-2 -- as well as the necessary upstream delta patches to bring our kernel up to 5.5.caxtolli_omce, or equivalently, 5.5.16.

Shell

cd ..
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.5.13.tar.xz \
https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.5.13.tar.sign \
https://cdn.kernel.org/pub/linux/kernel/v5.x/incr/patch-5.5.13-14.xz \
https://cdn.kernel.org/pub/linux/kernel/v5.x/incr/patch-5.5.14-15.xz \
https://cdn.kernel.org/pub/linux/kernel/v5.x/incr/patch-5.5.15-16.xz \
https://cdn.kernel.org/pub/linux/kernel/v5.x/incr/sha256sums.asc

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Verify fetched Linux kernel and patch sources.
And, as illustrated above, proceed to verify our downloaded resources:

Shell

xz -dc linux-5.5.13.tar.xz gpg --verify linux-5.5.13.tar.sign -
for i in $(ls patch*xz); do grep $(sha256sum $i cut -d' ' -f1sha256sums.ascdone

We then select the kernel source XZ compressed file and create a sym link in the form expected by Debian Packaging and follow by changing back into our linux directory:

Shell

ln -s linux-5.5.13.tar.xz linux_5.5.13.orig.tar.xz
cd linux

As this reiser4 hack is going to be essentially a Debian Buster backports, we need to replace the GCC-9 compiler string in the Sid (unstable) Debian Packaging configuration files, to a lower compiler version GCC-8. I create file ../chingaGCC8.amatl where I will place a list of the Debian packaging target files to modify:

Shell

cat >>../chingaGCC8.amatl<<EOF
debian/config/amd64/defines
debian/config/arm64/defines
debian/config/armel/defines
debian/config/armhf/defines
debian/config/defines
debian/config/hppa/defines
debian/config/i386/defines
debian/config/s390x/defines
debian/templates/control.extra.in
EOF

And proceed with the GCC8 text string modifications for Buster backports:

Shell

for i in $(< ../chingaGCC8.amatl); do sed -'s/gcc-9/gcc-8/g' $idone
Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Preparing debian/config/amd64/defines for Buster backports
Additionally, since we know we will be building our kernel for AMD64 architecture, we may want to disable debug-info in relevant defines just below the heading [build]:

Shell

sed -'/^\[build\]/a debug-info: false' debian/config/amd64/defines

And below the [relations] heading we add the Debian developers' Buster backports specific directive:

Shell

sed -'/^\[relations\]/a gcc-8: gcc-8 (>= 8-20180123-1~) <!stage1 !cross !pkg.linux.nokernel>, gcc-8-x86-64-linux-gnu (>= 8-20180123-1~) <!stage1 cross !pkg.linux.nokernel>' debian/config/amd64/defines

As illustrated in screenshot above --where the cursor is located in the xvi text editor-- we perform one last modification to debian/config/amd64/defines by changing signed-code to false.

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Preparing debian/config/amd64/defines for Buster backports for AMD64
Side note: In the illustrations, I am calling xvi tiny text editor from the file iztaccihuatl, i.e., 'white woman' in Nahuatl -- an allusion to the white snow covering a dormant volcanic mountain which resembles a sleeping female (Russian, in this instance) -- which contents save me some typing:

Shell

Eterm -g 100x33+0+-"IztacCihuatl ihuan Popocatepetl: $1" -t get---exec xvi $1

Although not strictly necessary -- unless, of course, we are also building this kernel for i386 architecture -- we proceed similarly to modify debian/config/i386/defines. We begin by setting signed-code: false,

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Preparing debian/config/i386/defines for Buster backports i386 architecture

and proceed by inserting the Debian developers' Buster backports directive immediately below relations header:

Shell

sed -'/^\[relations\]/a gcc-8: gcc-8 (>= 8-20180123-1~) <!stage1 !cross !pkg.linux.nokernel>, gcc-8-i686-linux-gnu (>= 8-20180123-1~) <!stage1 cross !pkg.linux.nokernel>' debian/config/i386/defines

Subsequently, we use sed to set [686-pae_build] header and debug-info: false either below existing text string pattern: ^hardware-long.*not supporting:

Shell

sed -'/^hardware-long.*not supporting/a \\n\[686-pae_build\]\ndebug-info: false' debian/config/i386/defines

exclusive or above the [686_description] header text string pattern:

Shell

sed -'/\[686-pae_description\]/i \[686-pae_build\]\ndebug-info: false\n' debian/config/i386/defines

Finally, we can use wc -l find out how many lines exist in debian/templates/control.extra.in:

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Preparing debian/templates/control.extra.in Buster backports for i386

Shell

wc -l debian/templates/control.extra.in

and visually we can locate the Package: linux-compiler-gcc-8-x86 relevant line in debian/templates/control.extra.in .
Realizing it is in the third block of text in the file -- which contains 26 lines -- I can insert Debian developers' text string (>= 8-20180123-1~) for Buster backports for i386 either by using the xvi tiny text editor and/or by using sed as:

Shell

sed -'16,24s/gcc-8,/gcc-8 (>= 8-20180123-1~),/' debian/templates/control.extra.in

Enabling Reiser4 in Debian Packaging for Linux kernel 5.5.13-2

Subsequently, we need to create and/or modify appropriate configuration files to create a reiser4 module. Indeed, I have expounded on the procedure in prior blogs; however, upstream Debian Packaging maintainer(s) alter their code and we must figure out what changed.

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
sed
Using sed we add reiser4 as module in debian/config/config, by inserting a blank line after existing capitalized text string CONFIG_COREDUMP=y:

Shell

sed -'/^CONFIG_COREDUMP/a \\n##\n## file: fs/reiser4/Kconfig\n##\nCONFIG_REISER4_FS=m' debian/config/config
Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
debian/config/config
then we locate the capitalized text string CONFIG_NUMA_BALANCING_DEFAULT_ENABLED and revert its default, y, to n, i.e.,
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=n

Note: this settting was modified to y by Debian kernel maintainers beginning with Debian packaging for linux 4.15.x. Subsequently, my Linux host running with that modification rendered my local build of VirtualBox type 2 hypervisor unable to format in reiser4 filesystem any of the virtual machines it created. Furthermore, any pre-existing reiser4 -formated virtual machine(s) would hang during operation and potentially introduces corruption.

Although your mileage may vary (YMMV), I can not overemphasize the importance of the configuration setting referenced above when the aim is to create and run reiser4 virtual machines.

We continue by creating an empty file to satisfy kernel-wedge and it does not complaint about 'duplicates'.

Shell

touch debian/installer/ignore-dups

and tell Debian packaging to create reiser4 modules for amd64 and i386 architectures:

Shell

echo "#include <reiser4-modules>" debian/installer/modules/amd64/reiser4-modules \
tee debian/installer/modules/i386/reiser4-modules

...including for the Debian Installer (d-i)

Shell

echo "reiser4" debian/installer/modules/reiser4-modules
Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Inserting reiser4 block to debian/installer/package-list
One blank line below the JFS code block, we use sed to insert our reiser4 block:

Shell

sed -'/^\sThis.*JFS filesystem/a \\nPackage: reiser4-modules\
Depends: kernel-image, crc-modules, compress-modules\
Priority: extra\
Description: Reiser4 filesystem support\
\ This package contains the Reiser4 filesystem module for the kernel.'\
 debian/installer/package-list

By now we have created and/or modified these files which will enhance with reiser4 the Debian packaging for linux 5.5.13-2:

  • debian/config/config
  • debian/installer/ignore-dups
  • debian/installer/modules/amd64/reiser4-modules
  • debian/installer/modules/i386/reiser4-modules
  • debian/installer/modules/reiser4-modules
  • debian/installer/package-list

The above modifications are enough to enable Debian packaging to create reiser4 module support for Debian Buster backports for AMD64 architecture, of course, after we apply the corresponding reiser4 patch to our linux source tree --later. Additionally, although I have not built for i386 architecture, the above modifications will likely work as well.

We finish this section by creating a patch: reiser4-gcc8-for-debian-packaging-5.5.13-2.patch (attached at end of post) after specifying my Ynic cecni (First) commit:

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
git format-patch --stdout -1 > ../reiser4-gcc8-for-debian-packaging-5.5.13-2.patch

Shell

git add .
git commit --"Ynic cecni adding reiser4 / GCC8 support for Debian packaging for Debian Buster backports for AMD64/i386."
git format-patch --stdout -> ../reiser4-gcc8-for-debian-packaging-5.5.13-2.patch

Only if we will ‘Add support for ZSTD-compressed kernel and initramfs'

Fact is the debian build halts if we do not strip compress-modules from our Debian packaging because the ensuing patch modifies Zstd decompression from being a Debian packaging module to being built into the kernel.

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Zstd-compressed kernel and initramfs
Thus, we begin by deleting the character string ', compress-modules' reference from all the module blocks in the last file we modified:

Shell

sed -'s/, compress-modules//g' debian/installer/package-list
Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Zstd-compressed kernel and initramfs
Then proceed to match the pattern Package: compress-modules, delete line, as well as the next 5 lines below which compose the module block:

Shell

sed -'/^P.*compress-modules/,+5 d' debian/installer/package-list
Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Remove compress-modules files from Debian packaging source tree
Now we remove any compress-modules files in our Debian packaging source tree:

Shell

for i in $(find debian/ -iname "*compress?modules*"); do rm -v $idone

Preparing our initial Linux kernel 5.5.13 with Debian packaging for 5.5.13-2.

We will strip WireGuard and related crypto backport support from the debian/patches/series until we have applied all the kernel incremental patches. Thus we make a backup of debian/patches/series first:

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Strip WireGuard and related crypto backport from debian/patches/series

Shell

cp -iv debian/patches/series ../.
sed -'/^#\sWireGuard.*/,+12 d' debian/patches/series

Then invoke Debian packaging magic to acquire, patch, and 'debianize' the linux kernel 5.5.13 XZ compressed archive we had downloaded previously:

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
debian/rules orig

Shell

debian/rules orig

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
debian/rules orig
Debian packaging decompresses and untars the upstream linux 5.5.13 source onto ../orig/linux-5.5.13 prior to patching... debianizing source tree into our current directory.

We should expect a couple of errors during the next Debian packaging incantation:

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
debian/rules debian/control

Shell

debian/rules debian/control

And finish this session with Debian packaging sourceing incantation:

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
fakeroot debian/rules source

Shell

fakeroot debian/rules source

Applying upstream delta patches onto a partially debianized  linux source tree at our current directory.

We can test the application of ../patch-5.5.13-14.xz by specifying --dry-run option to patch utility:

Shell

xz -dc ../patch-5.5.13-14.xz patch --dry-run --fuzz=-p1

Analyzing the output we can tell that kernel/bpf/verifier.c kernel/bpf/verifier.c has already been debianized, i.e., patched in this instance. Thus, in order for the incremental patch to be applied smoothly, we can overwrite the debianized file with an original from the ../orig/linux-5.5.13 --the backup will allow us to compare the differences after we apply the incremental patch. Subsequently, we may decide to discard the backup file --especially if diff utility shows no differences:

Shell

cp -bvf --suffix=Debianized ../orig/linux-5.5.13/kernel/bpf/verifier.c kernel/bpf/verifier.c

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Copying over debianized file with original and applying delta 5.5.13-14 increment
An additional note: an .orig extension will be concatenated to files which the patch does not match the target exactly. As this is a hack over a partially debianized kernel source, we will have a few; from man patch output we can specify

--no-backup-if-mismatch
Do not back up a file if the patch does not match the file exactly and if backups are not otherwise requested. This is the default if patch is conforming to POSIX.

However, it is always instructive to compare the backups with the patched files as we may detect some glaring irregularities which will affect the build, stability, and/or functioning, of our kernel. In this particular post, notwithstanding, I already engaged in some educated overview and I will specify the POSIX conforming option when patching so as to save some time doing side-to-side comparisons.

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Applying delta 5.5.13-14 increment should end smoothly.

Shell

xz -dc ../patch-5.5.13-14.xz patch --no-backup-if-mismatch --fuzz=-p1

We proceed to select and apply the next delta 5.5.14-15 increment --it applies smoothly &#66;&#41;

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Applying delta 5.5.14-15 increment patch

Shell

xz -dc ../patch-5.5.14-15.xz patch --fuzz=-p1

Next, as I was to apply final delta 5.5.15-16 increment available from upstream, I realize that there is a latest addition, patch-5.5.16-17.xz!
I download it and check its integrity:
Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Fetching latest upstream Linux delta patch-5.5.16-17.xz and subsequently applying patch-5.5.15-16

Shell

cd ..
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/incr/patch-5.5.16-17.xz
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/incr/sha256sums.asc
grep $(sha256sum patch-5.5.16-17.xz cut -d' ' -f1sha256sums.asc.1
cd -

And pick up where I had left off: apply the next delta 5.5.15-16 increment --it applies smoothly &#66;&#41; &#66;&#41; too!

Shell

xz -dc ../patch-5.5.15-16.xz patch --fuzz=-p1

and finish off by applying the latest upstream delta patch 5.5.16-17 increment that we just downloaded:

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Applying delta patch-5.5.16-17 increment; last available as of this post.

Shell

xz -dc ../patch-5.5.16-17.xz patch --no-backup-if-mismatch --fuzz=-p1

WireGuard backport for Debian packaging for 5.5.13-2: long option one(1)

We can now apply WireGuard backports that we had previously stripped from debian/patches/series. Editing our previously saved ../series file by deleting all text except for WireGuard patch numbered entries and subsequently writing our modifications to the file wg.amatl, we can do something like...

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Create wg.amatl file from our backed up at ../series leaving only WireGuard patches
Notwithstanding, be aware that there is a file that stops the build procedure -- as it seems was not updated by the Debian kernel maintainers: drivers/net/wireguard/queueing.h

For the WireGuard backport patch(es) -- which was initially hacked for Debian 5.5.13-2 -- to apply smoothly we need to fetch two(2) files from the original linux 5.5.13 source tree:

lib/crypto/chacha20poly1305-selftest.c
arch/arm64/crypto/chacha-neon-glue.c

and we will overwrite the ones modified by our ensuing application range of patches-5.5.13-17. If we write those two(2) files as content in in file ../original-wg.amatl then we can copy over the files from ../orig/linux-5.5.13/ onto our current linux directory and at the same time appending a suffix PatchedRecent to our corresponding backups. We will compare them at the end of the procedure.

Shell

for i in $(< ../original-wg.amatl); do cp -bvf --suffix=PatchedRecent ../orig/linux-5.5.13/$i $idone

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Applying WireGuard backports for 5.5.x from Debian packaging for 5.5.13-2

Shell

for i in $(< ../wg.amatl); do cat debian/patches/$i patch --no-backup-if-mismatch --fuzz=-p1done

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Applied WireGuard backport for 5.5.x and removed redundant backup files
Hence, the WireGuard backport for Debian packaging for 5.5.13-2 applied smoothly; we verify that the two replacement files discussed previously show no differences --accordingly, we delete our two(2) backups.

Finally, replace drivers/net/wireguard/queueing.h with updated queueing.h (attached below)
Thus, assuming we place queueing.h at our parent directory:

Shell

cp -vf ../queueing.h drivers/net/wireguard/queueing.h

Exclusive OR: WireGuard backport for 5.5.16(-17): Option two(2)

Forget about the lengthy Debian procedure described in option one(1) above and just download linux-5.5.16-WireGuard.patch
-- attached below -- as it will apply smoothly onto our current linux 5.5.17.
Again, assuming we place linux-5.5.16-WireGuard.patch at our parent directory, we could instead have patched as:

Shell

cat ../linux-5.5.16-WireGuard.patch patch --fuzz=-p1

If Zstd-compressed kernel and initramfs

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Overwriting drivers/net/wireguard/queueing.h and applying Zstd-compressed kernel and initramfs
Either fetch from [PATCH v4 0/8] Add support for ZSTD-compressed kernel... and create your own hack OR get it from here: zstd-for-kernel-v5.5.16.patch attached below) but we assume patch is located at our parent directory, then:

Shell

cat ../zstd-for-kernel-v5.5.16.patch patch --fuzz=-p1

CAUTION: the next sed one liner will replace the default kernel gzip compression method for that of Zstd.

Shell

sed -'s/default KERNEL_GZIP/default KERNEL_ZSTD/' init/Kconfig

04/27/2020 We make sure our new default overrules any others by explicitly stating it in debian/config/config
Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Using sed to set CONFIG_KERNEL_ZSTD=y in debian/config/config

Shell

sed -'/^CONFIG_RD_LZ4/a CONFIG_RD_ZSTD=y\n\n##\n## file: init/Kconfig\n##\nCONFIG_KERNEL_ZSTD=y' debian/config/config

Make sure that your initramfs-tools package supports Zstd; in other words, you must install a priori Zstd and Zstd -enabled initramfs-tools. For instance here is a quick hack where we backport Sid Package: initramfs-tools 0.136 for Debian Buster backports by applying initramfs-tools-core: Enable zstandard support -based metztli-initramfs-tools-0.136-zstd-default-compressor.patch (attached below, as well):
zstd_1.4.4+dfsg-3.1_amd64.deb                  zstd_1.4.4+dfsg-3.1_amd64.deb.SHA256SUM
initramfs-tools_0.136+nmu1_all.deb             initramfs-tools_0.136+nmu1_all.deb.SHA256SUM
initramfs-tools-core_0.136+nmu1_all.deb     initramfs-tools-core_0.136+nmu1_all.deb.SHA256SUM
Zstd optional:
libzstd1_1.4.4+dfsg-3.1_amd64.deb               libzstd1_1.4.4+dfsg-3.1_amd64.deb.SHA256SUM
libzstd-dev_1.4.4+dfsg-3.1_amd64.deb          libzstd-dev_1.4.4+dfsg-3.1_amd64.deb.SHA256SUM

Applying reiser4 for 5.5.5 patch onto our partially debianized linux 5.5.17 source tree.

Download reiser4-for-linux-5.x/reiser4-for-5.5.5.patch.gz into our parent directory.

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Applying reiser4 for 5.5.5 patch onto our linux kernel 5.5.17
And apply patch:

Shell

gzip -dc ../reiser4-for-5.5.5.patch.gz patch --no-backup-if-mismatch --fuzz=-p1

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Finished applying reiser4 for 5.5.5 patch onto our linux kernel 5.5.17
It should end with no errors nor generate .rej extension files.

We should now modify a couple of configuration files for our Debian packaging. First, I summon iztaccihuatl -- which in turn calls xvi to edit; and we will concatenate the string '+reiser4.0.2' to the ABI number:

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Concatenate +reiser4.0.2 to ABI number in debian/config/defines

Shell

iztaccihuatl debian/config/defines

I peek into debian/changelog:

Shell

head debian/changelog

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
Using dch -v to modify kernel version in debian/changelog
and proceed to correct the kernel version --remember this is a hack where we are using Debian packaging for linux 5.5.13-2 as base -- and we have patched the kernel in delta increments in the range of 5.5.14-17. Indeed, we are also concatenating +reiser4.0.2 string (but -D metztli is totally optional )

Shell

dch -v 5.5.17-2+reiser4.0.2 -D metztli

the above Debian incantation will summon whatever text editor is your default. Once you are done with your annotations, save and quit your editor. Above illustration was taken after I had quit my default text editor and saved my annotations. We continue...

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
debian/rules debian/control
As in prior occasion earlier in this post, we should expect a couple of 'intentional' output errors by invoking the next debian incantation.

Shell

debian/rules debian/control

...but we should only expect one(1) output error after the following debian magic string directive &#59;&#68;

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
fakeroot debian/rules debian/control-real

Shell

fakeroot debian/rules debian/control-real

For the next -- previous to last debian incantation -- it may be desired to redirect the output and potential errors, if any, into a file to analyze afterwards. It is a fact that if any errors are logged the build will fail:

Shell

fakeroot make -f debian/rules.gen setup_amd64_none_amd64

04-28-2020 Updated during more recent build of 5.5.caxtolli∙nahui (5.5.19) to illustrate more detailed log.
NOTE 04/27/2020 due to applying prior command 75, above command 82 will yield a couple of warnings; please disregard:

.config:4934:warning: override: KERNEL_ZSTD changes choice state

Debian packaging has created the kernel .config. Hmmm...

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
make -C debian/build/build_amd64_none_amd64 xconfig
As seen in illustration above, from time to time Debian packaging will override default KERNEL_ZSTD but we can modify debian/build/build_amd64_none_amd64/.config as: 04/27/2020  By explicitly stating our directive(s) in debian/config/config (see prior command 75), the illustration immediately above and next command 83 are likely redundant:

Shell

make -C debian/build/build_amd64_none_amd64 xconfig

VERY IMPORTANT! Starting with linux kernel 5.5.16 we must modify Debian packaging by adding the following compiler directive at the end of the target file. Failing to do so will stop the build procedure.

Exposing Hacks for ZSTD -compressed Metztli Reiser4 / Debian Buster bps Linux 5.5.caxtolli∙omome and initramfs
sed appending newline and LDLIBS += -lcap at debian/rules.d/tools/power/x86/turbostat/Makefile end of file

Shell

sed -'$a\\nLDLIBS += -lcap' debian/rules.d/tools/power/x86/turbostat/Makefile

We are ready to build our kernel the 'Debian way'... Tlayecuel : Поехали : Let's go!

Shell

dpkg-buildpackage --us -uc -jX -T binary-arch,binary-indep

where X represents...

Number of jobs allowed to be run simultaneously, number of jobs matching the number of online processors if auto is specified (since dpkg 1.17.10), or unlimited number if jobs is not specified, equivalent to the make(1) option of the same name (since dpkg 1.14.7, long option since dpkg 1.18.8)

(read man dpkg-buildpackage for additional info)

∙∙∙

Metztli Reiser4 Linux kernel macuilli.macuilli.caxtolli∙omome (5.5.17) with Zstd-compressed kernel and initramfs build completes &#66;&#41;


hyperv-daemons_5.5.17-2+reiser4.0.2_amd64.deb
hyperv-daemons_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
hyperv-daemons-dbgsym_5.5.17-2+reiser4.0.2_amd64.deb
hyperv-daemons-dbgsym_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
libbpf0_5.5.17-2+reiser4.0.2_amd64.deb
libbpf0_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
libbpf0-dbgsym_5.5.17-2+reiser4.0.2_amd64.deb
libbpf0-dbgsym_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
libbpf-dev_5.5.17-2+reiser4.0.2_amd64.deb
libbpf-dev_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
libcpupower1_5.5.17-2+reiser4.0.2_amd64.deb
libcpupower1_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
libcpupower1-dbgsym_5.5.17-2+reiser4.0.2_amd64.deb
libcpupower1-dbgsym_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
libcpupower-dev_5.5.17-2+reiser4.0.2_amd64.deb
libcpupower-dev_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
libtraceevent1_5.5.17-2+reiser4.0.2_amd64.deb
libtraceevent1_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
libtraceevent1-dbgsym_5.5.17-2+reiser4.0.2_amd64.deb
libtraceevent1-dbgsym_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
libtraceevent1-plugin_5.5.17-2+reiser4.0.2_amd64.deb
libtraceevent1-plugin_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
libtraceevent1-plugin-dbgsym_5.5.17-2+reiser4.0.2_amd64.deb
libtraceevent1-plugin-dbgsym_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
libtraceevent-dev_5.5.17-2+reiser4.0.2_amd64.deb
libtraceevent-dev_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-compiler-gcc-8-x86_5.5.17-2+reiser4.0.2_amd64.deb
linux-compiler-gcc-8-x86_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-config-5.5_5.5.17-2+reiser4.0.2_amd64.deb
linux-config-5.5_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-cpupower_5.5.17-2+reiser4.0.2_amd64.deb
linux-cpupower_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-cpupower-dbgsym_5.5.17-2+reiser4.0.2_amd64.deb
linux-cpupower-dbgsym_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-doc_5.5.17-2+reiser4.0.2_all.deb
linux-doc_5.5.17-2+reiser4.0.2_all.deb.SHA256SUM
linux-doc-5.5_5.5.17-2+reiser4.0.2_all.deb
linux-doc-5.5_5.5.17-2+reiser4.0.2_all.deb.SHA256SUM
linux-headers-5.5.0-1+reiser4.0.2-all_5.5.17-2+reiser4.0.2_amd64.deb
linux-headers-5.5.0-1+reiser4.0.2-all_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-headers-5.5.0-1+reiser4.0.2-all-amd64_5.5.17-2+reiser4.0.2_amd64.deb
linux-headers-5.5.0-1+reiser4.0.2-all-amd64_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-headers-5.5.0-1+reiser4.0.2-amd64_5.5.17-2+reiser4.0.2_amd64.deb
linux-headers-5.5.0-1+reiser4.0.2-amd64_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-headers-5.5.0-1+reiser4.0.2-cloud-amd64_5.5.17-2+reiser4.0.2_amd64.deb
linux-headers-5.5.0-1+reiser4.0.2-cloud-amd64_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-headers-5.5.0-1+reiser4.0.2-common_5.5.17-2+reiser4.0.2_all.deb
linux-headers-5.5.0-1+reiser4.0.2-common_5.5.17-2+reiser4.0.2_all.deb.SHA256SUM
linux-headers-amd64_5.5.17-2+reiser4.0.2_amd64.deb
linux-headers-amd64_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-headers-cloud-amd64_5.5.17-2+reiser4.0.2_amd64.deb
linux-headers-cloud-amd64_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-image-5.5.0-1+reiser4.0.2-amd64_5.5.17-2+reiser4.0.2_amd64.deb
linux-image-5.5.0-1+reiser4.0.2-amd64_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-image-5.5.0-1+reiser4.0.2-cloud-amd64_5.5.17-2+reiser4.0.2_amd64.deb
linux-image-5.5.0-1+reiser4.0.2-cloud-amd64_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-image-amd64_5.5.17-2+reiser4.0.2_amd64.deb
linux-image-amd64_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-image-cloud-amd64_5.5.17-2+reiser4.0.2_amd64.deb
linux-image-cloud-amd64_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-kbuild-5.5_5.5.17-2+reiser4.0.2_amd64.deb
linux-kbuild-5.5_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-kbuild-5.5-dbgsym_5.5.17-2+reiser4.0.2_amd64.deb
linux-kbuild-5.5-dbgsym_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-libc-dev_5.5.17-2+reiser4.0.2_amd64.deb
linux-libc-dev_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-perf_5.5.17-2+reiser4.0.2_amd64.deb
linux-perf_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-perf-5.5_5.5.17-2+reiser4.0.2_amd64.deb
linux-perf-5.5_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-perf-5.5-dbgsym_5.5.17-2+reiser4.0.2_amd64.deb
linux-perf-5.5-dbgsym_5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
linux-source_5.5.17-2+reiser4.0.2_all.deb
linux-source_5.5.17-2+reiser4.0.2_all.deb.SHA256SUM
linux-source-5.5_5.5.17-2+reiser4.0.2_all.deb
linux-source-5.5_5.5.17-2+reiser4.0.2_all.deb.SHA256SUM
linux-support-5.5.0-1+reiser4.0.2_5.5.17-2+reiser4.0.2_all.deb
linux-support-5.5.0-1+reiser4.0.2_5.5.17-2+reiser4.0.2_all.deb.SHA256SUM
usbip_2.0+5.5.17-2+reiser4.0.2_amd64.deb
usbip_2.0+5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM
usbip-dbgsym_2.0+5.5.17-2+reiser4.0.2_amd64.deb
usbip-dbgsym_2.0+5.5.17-2+reiser4.0.2_amd64.deb.SHA256SUM


References: Виктория Одинцова : Viktoriya Odintcovo ~ Viki- Xochiquetzal's Instagram

Linux: Using sed to insert lines before or after a match

sed - perform only first (nth) matched replacement?

sed insert line with spaces to a specific line

Remove line containing certain string and the following line

SED: insert text after the last line?


DISCLAIMER&#58;&#80; although due diligence has been applied, this resource is made available for testing/evaluation purposes on an AS IS basis. The procedure only reflects my own modifications, my limited testing, and the potential user(s) who execute(s) the procedures assumes all risks.

Please do not hold me or Metztli Information Technology (and/or its associates) responsible if the information provided here does not achieve the desired result. The information is provided AS IS and with the hope that it may be useful to the Internet community --especially those open-minded individuals interested in Reiser4 continued development.

Notwithstanding, There is no implicit or explicit guarantee that the information presented here is accurate --even though due diligence was exercised during the procedure. Accordingly, if an user(s) decide to implement the procedure or shell commands described here she, he, or them, do so at her, his, or their own risk. You have been forewarned.

Metztli IT, but not other entities, reserves the right to modify the content -- to correct and/or elucidated procedure(s), for instance -- and/or even delete all or partial, including blog post, without previous notice.