[elbe-users] elbe v12.2 debianize fails to produce working ./debian files

ew.foe at nassur.net ew.foe at nassur.net
Mon Feb 3 21:28:26 CET 2020


Hello,

these days I had the opportunity to retry "elbe debianize" on a
somewhat updated kernel.

host: debian 10 (buster), new clean install
elbe: version 12.2 from linutronix repo
kernel source: linux-4.19.94.tar.xz, patch-4.19.94-rt38.patch.xz
plus local patches adding configuration files, no code changes.

During serveral attempts I found that
: dpkg-buildpackge -a armhf
fails due to small errors in ./debian/rules

First attempt failed at dh_auto_test:

So I added an empty "override_dh_auto_clean:" target. --- Maybe this
is no error at all an I just misread the log.

Then the build failed to create dtb files:
>   Kernel: arch/arm/boot/uImage is ready
> make[3]: Leaving directory  
> '/var/cache/elbe/d8830783-f58f-411c-8e79-cdd71f894308/pdebuilder/current/debian/build'
> make[2]: Leaving directory  
> '/var/cache/elbe/d8830783-f58f-411c-8e79-cdd71f894308/pdebuilder/current'
> if testarm = arm -o arm = arm64; then           make -j`nproc`  
> ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-  
> KERNELRELEASE=4.19.94-rt38-foe3-elbe LOADADDR=0x8000  
> INSTALL_MOD_PATH=/var/cache/elbe/d8830783-f58f-411c-8e79-cdd71f894308/pdebuilder/current/debian/tmp INSTALL_HDR_PATH=/var/cache/elbe/d8830783-f58f-411c-8e79-cdd71f894308/pdebuilder/current/debian/tmp/usr INSTALL_PATH=/var/cache/elbe/d8830783-f58f-411c-8e79-cdd71f894308/pdebuilder/current/debian/tmp/boot INSTALL_DTBS_PATH=/var/cache/elbe/d8830783-f58f-411c-8e79-cdd71f894308/pdebuilder/current/debian/tmp/usr/lib/linux-image-4.19.94-rt38-foe3-elbe O=/var/cache/elbe/d8830783-f58f-411c-8e79-cdd71f894308/pdebuilder/current/debian/build -j4 dtbs;    
> fi
> /bin/sh: 1: testarm: not found
> make[1]: Leaving directory  
> '/var/cache/elbe/d8830783-f58f-411c-8e79-cdd71f894308/pdebuilder/current'
>    dh_auto_test
>         make -j1 test
> make[1]: Entering directory  
> '/var/cache/elbe/d8830783-f58f-411c-8e79-cdd71f894308/pdebuilder/current'

I manually added "dtbs" to the line for uImage and modules. This is
not a solution, however, the build proceeds ...
... and fails on "firmware_install". I have seen this before. So I
removed the corresponding entry in
linux-image-4.19.94-rt38-foe3-elbe.install

Upon second inspection the line
> if testarm = arm -o arm = arm64; then ...
seems to me a) missing a blank "if test arm ..." and possibly b) the
lefthand "arm" in the two comparisons looks like an expanded Variable. So
I suspect it should read something like
> if test $(VAR) = arm -o $(VAR) = arm64; then ...

dpkg-buildpackage then fails on dh_strip --- which might be caused by
crossbuilding on amd64 for armhf.

>    dh_strip
> arm-linux-gnueabihf-objcopy:debian/linux-headers-4.19.94-rt38-foe3-elbe/usr/src/linux-headers-4.19.94-rt38-foe3-elbe/scripts/bin2c: file format not  
> recognized
> dh_strip: arm-linux-gnueabihf-objcopy --only-keep-debug  
> --compress-debug-sections  
> debian/linux-headers-4.19.94-rt38-foe3-elbe/usr/src/linux-headers-4.19.94-rt38-foe3-elbe/scripts/bin2c debian/.debhelper/linux-headers-4.19.94-rt38-foe3-elbe/dbgsym-root/usr/lib/debug/.build-id/88/c3a438874e9a6a6b0cf983eb00fbc87f593391.debug returned exit code  
> 1


So at this point I submitted the build to elbe. Unfortunately this
takes > 1 hour instead of 15 Minutes for dpkg-buildpackage, but alas,
I think I found enough "typos".
: elbe pbuilder build --project $PROJECT

Please find my diff below.

So if someone could confirm this (any kernel would do imho), such that
it can be fixed, I would highly appreciate that. Thank you!


Cheers,
Erich

       #+end_quote
       #+begin_src diff
waeldee at debian10:/space/waeldee/tmp-images/03_linux-4.19-foe3$ diff  
-Naur ./debian-elbe/ ./debian
diff -Naur ./debian-elbe/linux-image-4.19.94-rt38-foe3-elbe.install  
./debian/linux-image-4.19.94-rt38-foe3-elbe.install
--- ./debian-elbe/linux-image-4.19.94-rt38-foe3-elbe.install     
2020-01-27 15:09:03.983977327 +0100
+++ ./debian/linux-image-4.19.94-rt38-foe3-elbe.install 2020-01-27  
15:09:11.875977346 +0100
@@ -1,5 +1,4 @@
  ./boot/*
  ./lib/modules/*/modules.*
  ./lib/modules/*/kernel/*
-./lib/firmware/*
  ./usr/lib/*
diff -Naur ./debian-elbe/rules ./debian/rules
--- ./debian-elbe/rules 2020-01-24 13:30:16.424516696 +0100
+++ ./debian/rules      2020-01-27 16:51:21.123991487 +0100
@@ -41,6 +41,8 @@

  #export DH_VERBOSE=1

+override_dh_auto_test:
+
  override_dh_auto_clean:
         mkdir -p debian/build
         rm -f debian/files
@@ -54,15 +56,17 @@
  override_dh_auto_build:
         rm -rf include/config
         $(MAKE) $(MAKE_OPTS) uImage modules
-       if testarm = arm -o arm = arm64; then           make -j`nproc`  
$(MAKE_OPTS) dtbs;       fi
+       $(MAKE) $(MAKE_OPTS) dtbs
+       # if testarm = arm -o arm = arm64; then           make  
-j`nproc` $(MAKE_OPTS) dtbs;       fi

  override_dh_auto_install:
         mkdir -p $(MOD_PATH) $(FW_PATH) $(HDR_PATH) $(KERNEL_PATH)  
$(DTBS_PATH)
         $(MAKE) $(MAKE_OPTS) uinstall
         $(MAKE) $(MAKE_OPTS) INSTALL_MOD_STRIP=1 modules_install
-       if test $(in_kernel_firmware) -eq 1; then                
$(MAKE) $(MAKE_OPTS) firmware_install;  fi
+       if test $(in_kernel_firmware) -eq 1; then                
$(MAKE) $(MAKE_OPTS) firmware_install;  fi
         $(MAKE) $(MAKE_OPTS) headers_install
-       if test arm = arm -o arm = arm64; then          make  
$(MAKE_OPTS) dtbs_install;         fi
+       $(MAKE) $(MAKE_OPTS) dtbs_install
+       # if test arm = arm -o arm = arm64; then                make  
$(MAKE_OPTS) dtbs_install;         fi
         # Build kernel header package
         rm -f "$(TMP_DIR)/lib/modules/$(REL)/build"  
"$(TMP_DIR)/lib/modules/$(REL)/source"
         find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl >  
$(DEB_DIR)/hdrsrcfiles
       #+end_src





More information about the elbe-users mailing list