[elbe-users] elbe v7/pbuilder: some tweaks needed to build kernel package
ew.foe at nassur.net
ew.foe at nassur.net
Wed May 15 12:29:46 CEST 2019
Hello all,
since it took me considerable time to get through this, I'd like
to share this information.
I'm building a kernel package using
- linux-4.19.37.tar.xz
- patch-4.19.37-rt19.patch.xz
- 3 local patches to add configuration and device tree files, the
details of which are unimportant to the findings below.
- elbe version 7
- elbe debianize and
- elbe pbuilder
entries during "elbe debianize"
[Hide Quoted Text]
Name: elbe
Version: 1.0
Arch: armhf
TAB
Format: native
TAB
Release: testing (== buster)
TAB
Maintainer: Erich Waelde
Mail: ...my email...
TAB
Loadaddress: 0x8000
defconfig: foerster_zynq_foe3_defconfig
Image Format: uImage
TAB
CROSS_COMPILE arm-linux-gnueabihf-
Kernelversion 4.19.37-rt19-foe3
I needed to tweak files in the generated ./debian folder in the
following way:
1. debian/changelog
the package-name-version in the first line is wrong:
: -linux-elbe-4.19.37-rt19-foe3
: +linux-4.19.37-rt19-foe3-elbe
2. rename files
: mv ./debian/linux-image-elbe-4.19.37-rt19-foe3.install \
./debian/linux-image-4.19.37-rt19-foe3-elbe.install
: mv ./debian/linux-headers-elbe-4.19.37-rt19-foe3.install \
./debian/linux-headers-4.19.37-rt19-foe3-elbe.install
These two changes fix the error message
: dpkg-source: error: source package has two conflicting values - \
: linux-4.19.37-rt19-foe3-elbe and linux-elbe-4.19.37-rt19-foe3
3. debian/control
: -Build-Depends: debhelper (>= 9), bc, libelf-dev
: +Build-Depends: debhelper (>= 9), bc, libelf-dev, u-boot-tools, flex,
bison
u-boot-tools were missing before (elbe-v2.5), but now (elbe-v7)
flex and bison were needed, too.
This fixes the error messages
: /bin/sh: 1: flex: not found
: /bin/sh: 1: bison: not found
4. lib/firmware
I had to add an empty file to please make during the "install"
phase.
: mkdir lib/firmware
: touch lib/firmware/zz_file_to_please_make
This fixes the error message
: dh_install
: dh_install: Cannot find (any matches for) "./lib/firmware/*" (tried
in ., debian/tmp)
: : dh_install: linux-image-4.19.37-rt19-foe3 missing files:
./lib/firmware/*
: dh_install: missing files, aborting
*2 days later* I removed "make firmware_install" from debian/rules,
and the line mentioning ./lib/firmware from
debian/linux-image-4.19.37-rt19-foe3-elbe.install
This made the build process succeed twice.
Changes 1. and 2. point to a bug in elbe, imho. The generated names do
not match the content of e.g. debian/prerm
: run-parts --arg="4.19.37-rt19-foe3-elbe" \
: --arg="/boot/vmlinuz-4.19.37-rt19-foe3-elbe" /etc/kernel/prerm.d
Changes 3. and 4. I'm not sure, whether this is to be "fixed" in elbe.
Maybe I did something wrong when setting up the pbuilder instance. So
any insight would be greatly appreciated. Thanks!
Cheers,
Erich
my patch for reference
$ cat 0004-FOE-tweak-debian.patch
Index: linux-4.19.37-rt19/debian/changelog
===================================================================
--- linux-4.19.37-rt19.orig/debian/changelog
+++ linux-4.19.37-rt19/debian/changelog
@@ -1,5 +1,8 @@
-linux-elbe-4.19.37-rt19-foe3 (1.0) testing; urgency=medium
+linux-4.19.37-rt19-foe3-elbe (1.0) testing; urgency=medium
* generated by elbe debianize
+ * 0001-FOE-add-zynq-foe3-defconfig.patch --- create a foerster default
config (zynq-7000)
+ * 0002-FOE-add-devicetree-files-for-iscp2-bmv2.patch --- create device
trees for iscp2: Ianus compute platform bmv2: Basis Modul V2
+ * 0003-FOE-add-devicetree-file-for-trenz.patch --- create device tree
file for trenz: TE0724-02 module
-- Erich Waelde <waelde.erich at foerstergroup.de> Fri, 10 May 2019
10:16:06 +0200
Index: linux-4.19.37-rt19/debian/control
===================================================================
--- linux-4.19.37-rt19.orig/debian/control
+++ linux-4.19.37-rt19/debian/control
@@ -2,7 +2,7 @@ Source: linux-4.19.37-rt19-foe3-elbe
Section: kernel
Priority: optional
Maintainer: Erich Waelde <waelde.erich at foerstergroup.de>
-Build-Depends: debhelper (>= 9), bc, libelf-dev
+Build-Depends: debhelper (>= 9), bc, libelf-dev, u-boot-tools, flex,
bison
Standards-Version: 3.8.4
Homepage: http://www.kernel.org/
Index:
linux-4.19.37-rt19/debian/linux-headers-4.19.37-rt19-foe3-elbe.install
===================================================================
--- /dev/null
+++ linux-4.19.37-rt19/debian/linux-headers-4.19.37-rt19-foe3-elbe.install
@@ -0,0 +1,2 @@
+./lib/modules/*/build
+./usr/src/*
Index:
linux-4.19.37-rt19/debian/linux-headers-elbe-4.19.37-rt19-foe3.install
===================================================================
---
linux-4.19.37-rt19.orig/debian/linux-headers-elbe-4.19.37-rt19-foe3.install
+++ /dev/null
@@ -1,2 +0,0 @@
-./lib/modules/*/build
-./usr/src/*
Index:
linux-4.19.37-rt19/debian/linux-image-4.19.37-rt19-foe3-elbe.install
===================================================================
--- /dev/null
+++ linux-4.19.37-rt19/debian/linux-image-4.19.37-rt19-foe3-elbe.install
@@ -0,0 +1,5 @@
+./boot/*
+./lib/modules/*/modules.*
+./lib/modules/*/kernel/*
+./lib/firmware/*
+./usr/lib/*
Index:
linux-4.19.37-rt19/debian/linux-image-elbe-4.19.37-rt19-foe3.install
===================================================================
---
linux-4.19.37-rt19.orig/debian/linux-image-elbe-4.19.37-rt19-foe3.install
+++ /dev/null
@@ -1,5 +0,0 @@
-./boot/*
-./lib/modules/*/modules.*
-./lib/modules/*/kernel/*
-./lib/firmware/*
-./usr/lib/*
More information about the elbe-users
mailing list