0

I have a raspberrypi 3B and want to compile and install a new kernel on it, but I only have an arch linux(x86_64) host to compile it on.

Following the official documentation I get stuck trying to crosscompile the kernel, it seems I'm missing the correct crosscompiler.

❯ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig
scripts/Kconfig.include:39: compiler 'arm-linux-gnueabihf-gcc' not found
make[1]: *** [scripts/kconfig/Makefile:88: bcm2709_defconfig] Error 1
make: *** [Makefile:603: bcm2709_defconfig] Error 2

The problem is that I don't know what to install, the package suggested in the documentation crossbuild-essential-armhf doesn´t seem to exist in the official repositories neither in the AUR.

Does it have another name in the arch repositories? I installed arm-none-eabi-gcc but it doesn't seem to be what i need. Looking into the arch wiki I found this page and it didn't help much but it gave me the impression that I need to build and compile my own crosscompiler. Is this the case? There are no readily available arm crosscompilers in arch linux?

Also, once I do manage to cross compile it, will I have problems with the different versions of packages (e.g. glibc) in arch vs in raspbian? if so, is there an easy way to deal with this?

Any help would be greatly appreciated

EDIT: Looking at what these packages are, it seems like what I really need is gcc-arm-linux-gnueabihf but this is also not present on pacman. The closest thing I can find is arm-linux-gnueabihf-gcc in the AUR but I fail to compile it because I need the stage 1 cross compiler, which also fails for other reasons. I feel like this is something that shouldn't exist solely in the aur, am I missing something obvious in the pacman repositories?

2
  • 1
    crossbuild-essential-armhf seems to be a meta package aimed at listing (in the package itself and as its dependencies) the packages needed for cross-compiling. You may be able to find out the full list of needed packages by inspecting the relevant page on debian.org.
    – fra-san
    Jun 18, 2021 at 21:18
  • thank you @fra-san . Looking at the packages I need the ` gcc-arm-linux-gnueabihf` but it is also not present on pacman. The closest thing I can find is arm-linux-gnueabihf-gcc in the AUR but I fail to compile it because i need the stage 1 cross compiler, which also fails for other reasons. I feel like this is something that shouldn't exist solely in the aur, I feel like I must be missing something obvious in the pacman repositories
    – barzilay
    Jun 19, 2021 at 1:54

0

You must log in to answer this question.