1

[fresh virtual box vm, using ubuntu 20.04, all updates made during install]

I just try to run make bcmrpi_defconfig on a linux kernel git repository

patched for RT :

wget https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/4.19/patch-4.19.127-rt55.patch.gz
zcat patch-4.19.127-rt55.patch.gz | patch -p1

but it say it cannot find the arm compiler...

phil@rt-linux-pi:~/linux$ /home/phil/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc
bash: /home/phil/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian
/bin/arm-linux-gnueabihf-gcc: No such file or directory

phil@rt-linux-pi:~/linux$ ls /home/phil/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc -lha
lrwxrwxrwx 1 phil phil 29 Jun 25 22:58 /home/phil/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc -> arm-linux-gnueabihf-gcc-4.8.3

I now realize arm-linux-gnueabihf-gcc is nowhere to be found on the system

I get this error :

make bcmrpi_defconfig
/bin/sh: 1: /home/phil/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: not found
/bin/sh: 1: /home/phil/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: not found
./scripts/gcc-version.sh: 26: /home/phil/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: not found
./scripts/gcc-version.sh: 27: /home/phil/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: not found
./scripts/gcc-version.sh: 29: /home/phil/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: not found
./scripts/gcc-version.sh: 26: /home/phil/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: not found
./scripts/gcc-version.sh: 27: /home/phil/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: not found
./scripts/gcc-version.sh: 29: /home/phil/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: not found
init/Kconfig:17: syntax error
init/Kconfig:16: invalid option
./scripts/clang-version.sh: 15: /home/phil/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: not found
./scripts/gcc-plugin.sh: 11: /home/phil/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: not found
make[1]: *** [scripts/kconfig/Makefile:104: bcmrpi_defconfig] Error 1
make: *** [Makefile:534: bcmrpi_defconfig] Error 2

I tried :

  • installing build essentials

  • I installed these packages : libncurses-dev flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf

  • I moded the PATH variable :

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/phil/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/

thanks for the time you'll spend on this question

regards

I follow this tutorial : http://www.frank-durr.de/?p=203

  • First off you have to install all required packages.From the error it's clear that you haven't bison in your system. And how did you install the ARM version of GCC ? Is the directory /home/phil/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin in your $PATH environment variable ? Try echo $PATH. – Parsa Mousavi Jun 25 at 21:52
  • I edited my questions with things you mentioned, yet , if I run the file compiler manualy it says 'no such file or directory', but it is there, as a soft link and in my PATH ... – user3455897 Jun 26 at 9:12
  • I think it's better to install the gcc from repository.Then it will go to the standard directories and you'll be able to run it with ease.Follow this guide. – Parsa Mousavi Jun 26 at 9:13
  • but it's gcc for RPI – user3455897 Jun 26 at 9:14
  • I'll try another tutorial, this one is 'meh', and outdated – user3455897 Jun 26 at 9:15
0

the official doc explains things a bit better and in a more "recent way" of doing things

https://www.raspberrypi.org/documentation/linux/kernel/building.md

first mod and source .bashrc file and add at the end :

if [ -d "$HOME/tools/arm-bcm2708/arm-linux-gnueabihf/bin" ] ; then
    PATH="$PATH:$HOME/tools/arm-bcm2708/arm-linux-gnueabihf/bin"
fi

to build kernel do :

sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev

git clone --depth=1 --branch rpi-4.19.y https://github.com/raspberrypi/linux

cd linux
export KERNEL=kernel
make bcmrpi_defconfig

cd ..
git clone https://github.com/raspberrypi/tools ~/tools

cd linux

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs

hope this helps someone else too

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.