[elbe-users] elbe v7/pbuilder: some tweaks needed to build kernel package

Kurt Kanzenbach kurt at linutronix.de
Wed May 15 16:10:37 CEST 2019


Hi,

On Wed, May 15, 2019 at 12:29:46PM +0200, ew.foe at nassur.net wrote:
> Hello all,
>
> since it took me considerable time to get through this, I'd like
> to share this information.

thank you for sharing this.

>
> 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.

It seems like all of these are bugs in elbe debianize. I've posted
patches for the issues 1, 2 and 3. However, the firmware problem is
tricky, because whether make firmware_install is available or not
depends on the kernel version.

>
>
> Maybe I did something wrong when setting up the pbuilder instance.

Actually you didn't. I could reproduce these problems here.

> So any insight would be greatly appreciated. Thanks!
>
>
> Cheers,
> Erich

Thanks,
Kurt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.linutronix.de/pipermail/elbe-users/attachments/20190515/86fe54ad/attachment.sig>


More information about the elbe-users mailing list