You are not logged in.

#1 2018-07-13 11:50:04

Linux2Brain
Member
Registered: 2018-03-05
Posts: 23

cross compiling for armv7

Hi folks,

I'm trying to cross-compile u-boot-rockchip on my arch linux system, kernel 4.17.5-1 x86_64, toolchain arm-unknown-linux-gnueabihf- setup according to the cross compile wiki, but I get multiple error messages about missing compiler-gcc8.h:

make ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnueabihf- menuconfig
Generating include/autoconf.mk
In file included from /home/martin/Downloads/xcompile/u-boot-rockchip/include/linux/compiler.h:40,
                 from /home/martin/Downloads/xcompile/u-boot-rockchip/include/linux/byteorder/little_endian.h:12,
                 from /home/martin/Downloads/xcompile/u-boot-rockchip/arch/arm/include/asm/byteorder.h:29,
                 from /home/martin/Downloads/xcompile/u-boot-rockchip/include/compiler.h:112,
                 from /home/martin/Downloads/xcompile/u-boot-rockchip/include/image.h:19,
                 from include/common.h:100:
/home/martin/Downloads/xcompile/u-boot-rockchip/include/linux/compiler-gcc.h:93:1: fatal error: linux/compiler-gcc8.h: No such file or directory
 #include gcc_header(__GNUC__)
 ^~~~
compilation terminated.

The following gcc packages are installed:

core/gcc 8.1.1+20180531-1 (base-devel)
core/gcc-libs 8.1.1+20180531-1 (base) 

I'm using the ARMv7l hard-float linked in the wiki.

How can I fix this  ? smile

Last edited by Linux2Brain (2018-07-13 11:54:42)

Offline

#2 2018-07-13 17:07:42

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,417
Website

Re: cross compiling for armv7

Mod note: Not a programming or scripting issue, moving to Other Architectures.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2018-07-13 18:11:55

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: cross compiling for armv7

When I cross compile, I ssh into the target machine (armv7 or aarch64) and run distcc on my x86_64 box.  Is that an option?  The AUR contains the Arch ARM toolchain: https://aur.archlinux.org/packages/dist … rm-armv7h/


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2018-07-31 08:59:17

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: cross compiling for armv7

As OP I'm on the same band wagon. Trying to compile for RockChip3288 on a Tinker Board.
What to set up to the master in order to compile the kernel?
I've tried to set a cross compiling, but is most like OP, but I downloaded this kernel. I'd like to fix the WiFi AP function.

I could boot the ALARM, by the help of a debian kernel (TinkerOS or Armbian), but I can't get the ALarm kernel working.
Then If I boot Alarm, as I mentioned, I don't have WiFi at all. It seems that the firmware is missing. Also some problem to get the wired connection working and internet sharing, so I can't do much further.

Last edited by TheSaint (2018-11-10 00:33:39)


do it good first, it will be faster than do it twice the saint wink

Offline

#5 2018-11-09 23:07:25

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: cross compiling for armv7

There is also an ARM toolchain in the official repo arm-none-eabi-gcc


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#6 2018-11-10 00:45:02

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: cross compiling for armv7

I solved my problem to cross compile, but I strangely found some dependencies which are mutually exclusive, but requested.
So to get arm-linux-gnueabihf-gcc it's required to install arm-linux-gnueabihf-gcc-stage1 that later must supersede by arm-linux-gnueabihf-gcc-stage2, with a relevant volume of megabytes.


do it good first, it will be faster than do it twice the saint wink

Offline

Board footer

Powered by FluxBB