1
votes

I am compiling u-boot v2020.04-rc5

My Environment.

Host: 18.04.1-Ubuntu SMP

Make Version: GNU Make 4.1

Toolchain: gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi

Target: STM32F769

Steps to Replicate Issue:

Step1: git clone https://github.com/u-boot/u-boot.git

Step2: cd u-boot

Step3: git checkout v2020.04-rc5

Step4: make ARCH=arm CROSS_COMPILE=~/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi- stm32f769-disco_defconfig

Step5: enable support for UBIFS (CONFIG_CMD_UBI=y) by menuconfig

Step6: make ARCH=arm CROSS_COMPILE=~/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi-

Desired Output: build is successful. Actual Output: Error as shown below.

$ /home/sicris/Downloads/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc -Wp,-MD,fs/ubifs/.super.o.d -nostdinc -isystem /home/sicris/Downloads/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/7.5.0/include -Iinclude -I../include -I../arch/arm/include -include ../include/linux/kconfig.h -I../fs/ubifs -Ifs/ubifs -D_KERNEL_ -D_UBOOT_ -Wall -Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding -std=gnu11 -fshort-wchar -fno-strict-aliasing -fno-PIE -Os -fno-stack-protector -fno-delete-null-pointer-checks -g -fstack-usage -Wno-format-nonliteral -Werror=date-time -D_ARM_ -Wa,-mimplicit-it=always -mthumb -mthumb-interwork -mabi=aapcs-linux -mword-relocations -fno-pic -mno-unaligned-access -ffunction-sections -fdata-sections -fno-common -ffixed-r9 -msoft-float -pipe -march=armv7-m -D_LINUX_ARM_ARCH_=7 -I../../arch/arm/mach-stm32/include -I../arch/arm/mach-stm32/include -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(super)" -D"KBUILD_MODNAME=KBUILD_STR(super)" -c -o fs/ubifs/super.o ../fs/ubifs/super.c

{standard input}: Assembler messages:{standard input} :755: Error: selected processor does not support requested special purpose register – `mrs r1,cpsr'

{standard input}:757: Error: selected processor does not support requested special purpose register – msr cpsr_c,r3'{standard input} :770: Error: selected processor does not support requested special purpose register –msr cpsr_c,r1'

{standard input}:835: Error: selected processor does not support requested special purpose register – mrs r4,cpsr'{standard input} :837: Error: selected processor does not support requested special purpose register –msr cpsr_c,r2'

{standard input} :850: Error: selected processor does not support requested special purpose register – `msr cpsr_c,r4'

Notes:

  1. I tried to add "-mtune=cortex-m7" compile flag. The result is the same.

  2. I tried to add "-mcpu=cortex-m7" and "-march=armv7e-m". The result is the same.

Question:

  1. Am I missing any compile flag setting?

  2. Is there a workaround on this?

I will also post this question on the linaro developer technical support.

1
You had perfectly identified the issue. You should just rework your u-boot patch until it will be accepted, and the correct proc-arm/system.h will be included during the build process . I removed my incorrect answer, sorry for the noise.Frant
This patch from Heinrich should solve this issue.Sicris Rey Embay

1 Answers

0
votes

Try an older compiler version. From a cursory google search, you are on the right path in thinking this something to do with not specifying the architecture in the right way but you might be able to dodge around it with an older compiler version. Edit: Try exporting your ARCH and CROSS_COMPILE variables. I was able to build this using the compiler you specified from the tip of u-boot master on my 16.04 ubuntu machine. Hope this helps. Edit Edit: Also try make clean && make improper to clear any possible cruft.