This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Issue cross-compiling Raspberry Pi kernel for BLE Border Router

Hello there,

I've been following a guide Installing a 6LoWPAN enabled Linux kernel and required modules as a part of setting up a BLE 6LoWPAN border router on Raspberry Pi.

I'm using the cross-compiling option on my virtual machine with Ubuntu. So far, I've successfully managed to compile the kernel and modules (go through parts 1-5 in the Cross-Compilation section of tutorial). As a note, it was also necessary to install several additional packages using apt-get, which is not mentioned in the guide, namely bison, flex and libssl-dev.

However I'm stuck on the next step regarding generation .deb packages. Process execution always stalls indefinitely in the same place and doesn't return. I've tested this on several virtual machines and also on the cloud server. 

Testing commands like htop say that at this point, original make-kpkg process is sleeping and there are no other running processes regarding this task.

Here are the logs I get:

root:~/raspbian/kernel/linux# DEB_HOST_ARCH=armhf fakeroot make-kpkg --append-to-version my-raspi-debbie --revision=1.0 --ARCH=arm --cross-compile ${CCPREFIX} kernel_headers -j5
exec make kpkg_version=13.018+nmu1 -f /usr/share/kernel-package/ruleset/minimal.mk debian DEBIAN_REVISION=1.0  APPEND_TO_VERSION=my-raspi-debbie  KPKG_ARCH=arm   CROSS_COMPILE=/root/raspbian/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
====== making target debian/stamp/conf/minimal_debian [new prereqs: ]======
This is kernel package version 13.018+nmu1.
test -d debian             || mkdir debian
test ! -e stamp-building || rm -f stamp-building
install -p -m 755 /usr/share/kernel-package/rules debian/rules
for file in ChangeLog  Control  Control.bin86 config templates.in rules; do                                      \
            cp -f  /usr/share/kernel-package/$file ./debian/;                               \
        done
cp: cannot stat '/usr/share/kernel-package/ChangeLog': No such file or directory
for dir  in Config docs examples ruleset scripts pkg po;  do                                      \
          cp -af /usr/share/kernel-package/$dir  ./debian/;                                 \
        done
test -f debian/control || sed         -e 's/=V/4.19.59my-raspi-debbie/g'  \
                -e 's/=D/1.0/g'         -e 's/=A/armhf/g'  \
        -e 's/=SA//g'  \
        -e 's/=I//g'                                \
        -e 's/=CV/4.19/g'                           \
        -e 's/=M/Unknown Kernel Package Maintainer <[email protected]>/g'                         \
        -e 's/=ST/linux/g'      -e 's/=B/arm/g'    \
                -e 's/=R//g'    /usr/share/kernel-package/Control > debian/control
test -f debian/changelog ||  sed -e 's/=V/4.19.59my-raspi-debbie/g'       \
            -e 's/=D/1.0/g'        -e 's/=A/armhf/g'       \
            -e 's/=ST/linux/g'     -e 's/=B/arm/g'         \
            -e 's/=M/Unknown Kernel Package Maintainer <[email protected]>/g'                            \
             /usr/share/kernel-package/changelog > debian/changelog
chmod 0644 debian/control debian/changelog
test -d ./debian/stamp || mkdir debian/stamp
make -f debian/rules debian/stamp/conf/kernel-conf
make[1]: Entering directory '/root/raspbian/kernel/linux'
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
====== making target debian/stamp/conf/kernel-conf [new prereqs: ]======
make EXTRAVERSION=my-raspi-debbie  CROSS_COMPILE=/root/raspbian/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- ARCH=arm \
                    oldconfig;
make[2]: Entering directory '/root/raspbian/kernel/linux'
scripts/kconfig/conf  --oldconfig Kconfig
#
# configuration written to .config
#
make[2]: Leaving directory '/root/raspbian/kernel/linux'
make EXTRAVERSION=my-raspi-debbie  CROSS_COMPILE=/root/raspbian/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- ARCH=arm prepare
make[2]: Entering directory '/root/raspbian/kernel/linux'
scripts/kconfig/conf  --syncconfig Kconfig
  CALL    scripts/checksyscalls.sh
make[2]: Leaving directory '/root/raspbian/kernel/linux'
echo done > debian/stamp/conf/kernel-conf
make[1]: Leaving directory '/root/raspbian/kernel/linux'
make -f debian/rules debian/stamp/conf/full-changelog
make[1]: Entering directory '/root/raspbian/kernel/linux'
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
====== making target debian/stamp/conf/full-changelog [new prereqs: ]======
for file in ChangeLog  Control  Control.bin86 config templates.in rules; do                             \
     cp -f  /usr/share/kernel-package/$file ./debian/;                  \
done
cp: cannot stat '/usr/share/kernel-package/ChangeLog': No such file or directory
for dir  in Config docs examples ruleset scripts pkg po;        do                              \
   cp -af /usr/share/kernel-package/$dir  ./debian/;                            \
done
install -p -m 755 /usr/share/kernel-package/rules debian/rules
sed         -e 's/=V/4.19.59my-raspi-debbie-v7+/g'  \
                -e 's/=D/1.0/g'         -e 's/=A/armhf/g'  \
        -e 's/=SA//g'  \
        -e 's/=I//g'                                \
        -e 's/=CV/4.19/g'                           \
        -e 's/=M/Unknown Kernel Package Maintainer <[email protected]>/g'                         \
        -e 's/=ST/linux/g'      -e 's/=B/arm/g'    \
                -e 's/=R//g'  /usr/share/kernel-package/Control > debian/control
sed -e 's/=V/4.19.59my-raspi-debbie-v7+/g' -e 's/=D/1.0/g'            \
    -e 's/=A/armhf/g' -e 's/=M/Unknown Kernel Package Maintainer <[email protected]>/g' \
    -e 's/=ST/linux/g'   -e 's/=B/arm/g'              \
        /usr/share/kernel-package/changelog > debian/changelog
chmod 0644 debian/control debian/changelog
make -f debian/rules debian/stamp/conf/kernel-conf
make[2]: Entering directory '/root/raspbian/kernel/linux'
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
make[2]: 'debian/stamp/conf/kernel-conf' is up to date.
make[2]: Leaving directory '/root/raspbian/kernel/linux'
make[1]: Leaving directory '/root/raspbian/kernel/linux'
echo done > debian/stamp/conf/minimal_debian
exec debian/rules  DEBIAN_REVISION=1.0  APPEND_TO_VERSION=my-raspi-debbie  KPKG_ARCH=arm  CROSS_COMPILE=/root/raspbian/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-  kernel_headers
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable

root@Tonko:~/raspbian/kernel/linux# # DEB_HOST_ARCH=armhf fakeroot make-kpkg --append-to-version my-raspi-debbie --revision=1.0 --ARCH=arm --cross-compile ${CCPREFIX} --initrd kernel_image kernel_headers -j5
Error: Unknown target k
use --targets to display help on valid targets.
root@Tonko:~/raspbian/kernel/linux# DEB_HOST_ARCH=armhf fakeroot make-kpkg --append-to-version my-raspi-debbie --revision=1.0 --ARCH=arm --cross-compile ${CCPREFIX} --initrd kernel_image kernel_headers -j5
exec make kpkg_version=13.018+nmu1 -f /usr/share/kernel-package/ruleset/minimal.mk debian DEBIAN_REVISION=1.0  APPEND_TO_VERSION=my-raspi-debbie  KPKG_ARCH=arm   CROSS_COMPILE=/root/raspbian/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-  INITRD=YES
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
====== making target debian/stamp/conf/minimal_debian [new prereqs: ]======
This is kernel package version 13.018+nmu1.
test -d debian             || mkdir debian
test ! -e stamp-building || rm -f stamp-building
install -p -m 755 /usr/share/kernel-package/rules debian/rules
for file in ChangeLog  Control  Control.bin86 config templates.in rules; do                                      \
            cp -f  /usr/share/kernel-package/$file ./debian/;                               \
        done
cp: cannot stat '/usr/share/kernel-package/ChangeLog': No such file or directory
for dir  in Config docs examples ruleset scripts pkg po;  do                                      \
          cp -af /usr/share/kernel-package/$dir  ./debian/;                                 \
        done
test -f debian/control || sed         -e 's/=V/4.19.59my-raspi-debbie/g'  \
                -e 's/=D/1.0/g'         -e 's/=A/armhf/g'  \
        -e 's/=SA//g'  \
        -e 's/=I//g'                                \
        -e 's/=CV/4.19/g'                           \
        -e 's/=M/Unknown Kernel Package Maintainer <[email protected]>/g'                         \
        -e 's/=ST/linux/g'      -e 's/=B/arm/g'    \
                -e 's/=R/initramfs-tools | linux-initramfs-tool,/g'    /usr/share/kernel-package/Control > debian/control
test -f debian/changelog ||  sed -e 's/=V/4.19.59my-raspi-debbie/g'       \
            -e 's/=D/1.0/g'        -e 's/=A/armhf/g'       \
            -e 's/=ST/linux/g'     -e 's/=B/arm/g'         \
            -e 's/=M/Unknown Kernel Package Maintainer <[email protected]>/g'                            \
             /usr/share/kernel-package/changelog > debian/changelog
chmod 0644 debian/control debian/changelog
test -d ./debian/stamp || mkdir debian/stamp
make -f debian/rules debian/stamp/conf/kernel-conf
make[1]: Entering directory '/root/raspbian/kernel/linux'
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
====== making target debian/stamp/conf/kernel-conf [new prereqs: ]======
make EXTRAVERSION=my-raspi-debbie  CROSS_COMPILE=/root/raspbian/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- ARCH=arm \
                    oldconfig;
make[2]: Entering directory '/root/raspbian/kernel/linux'
scripts/kconfig/conf  --oldconfig Kconfig
#
# configuration written to .config
#
make[2]: Leaving directory '/root/raspbian/kernel/linux'
make EXTRAVERSION=my-raspi-debbie  CROSS_COMPILE=/root/raspbian/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- ARCH=arm prepare
make[2]: Entering directory '/root/raspbian/kernel/linux'
scripts/kconfig/conf  --syncconfig Kconfig
  CALL    scripts/checksyscalls.sh
make[2]: Leaving directory '/root/raspbian/kernel/linux'
echo done > debian/stamp/conf/kernel-conf
make[1]: Leaving directory '/root/raspbian/kernel/linux'
make -f debian/rules debian/stamp/conf/full-changelog
make[1]: Entering directory '/root/raspbian/kernel/linux'
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
====== making target debian/stamp/conf/full-changelog [new prereqs: ]======
for file in ChangeLog  Control  Control.bin86 config templates.in rules; do                             \
     cp -f  /usr/share/kernel-package/$file ./debian/;                  \
done
cp: cannot stat '/usr/share/kernel-package/ChangeLog': No such file or directory
for dir  in Config docs examples ruleset scripts pkg po;        do                              \
   cp -af /usr/share/kernel-package/$dir  ./debian/;                            \
done
install -p -m 755 /usr/share/kernel-package/rules debian/rules
sed         -e 's/=V/4.19.59my-raspi-debbie-v7+/g'  \
                -e 's/=D/1.0/g'         -e 's/=A/armhf/g'  \
        -e 's/=SA//g'  \
        -e 's/=I//g'                                \
        -e 's/=CV/4.19/g'                           \
        -e 's/=M/Unknown Kernel Package Maintainer <[email protected]>/g'                         \
        -e 's/=ST/linux/g'      -e 's/=B/arm/g'    \
                -e 's/=R/initramfs-tools | linux-initramfs-tool,/g'  /usr/share/kernel-package/Control > debian/control
sed -e 's/=V/4.19.59my-raspi-debbie-v7+/g' -e 's/=D/1.0/g'            \
    -e 's/=A/armhf/g' -e 's/=M/Unknown Kernel Package Maintainer <[email protected]>/g' \
    -e 's/=ST/linux/g'   -e 's/=B/arm/g'              \
        /usr/share/kernel-package/changelog > debian/changelog
chmod 0644 debian/control debian/changelog
make -f debian/rules debian/stamp/conf/kernel-conf
make[2]: Entering directory '/root/raspbian/kernel/linux'
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
make[2]: 'debian/stamp/conf/kernel-conf' is up to date.
make[2]: Leaving directory '/root/raspbian/kernel/linux'
make[1]: Leaving directory '/root/raspbian/kernel/linux'
echo done > debian/stamp/conf/minimal_debian
exec debian/rules  DEBIAN_REVISION=1.0  APPEND_TO_VERSION=my-raspi-debbie  KPKG_ARCH=arm  CROSS_COMPILE=/root/raspbian/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-  INITRD=YES  kernel_image kernel_headers
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-architecture: warning: specified GNU system type arm-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable

Parents Reply Children
No Data
Related