Could you please help me in resolving the "arch/arm/lib/vectors.S:87: Error: no such instruction: `b reset' ?"

Liu Wang liuw at supermicro.com
Thu Jan 18 02:26:28 CET 2024


Hi Fabio,

Thank you for your help.

Switching to "arm-gnu-toolchain-13.2.Rel1-x86-64-arm-none-eabi" seems a fix for :
...gnueabihf-gcc: cannot execute binary file: Exec format error...

Sincerely,
Liu Wang
---------------------------
liuw at liuw-SYS-E100-12T-H:~/Downloads/u-boot$ make
scripts/kconfig/conf
 --syncconfig Kconfig
  CFG     u-boot.cfg
  GEN    
include/autoconf.mk
  GEN    
include/autoconf.mk.dep
  UPD    
include/generated/version_autogenerated.h
  UPD    
include/generated/timestamp_autogenerated.h
  CC     
lib/asm-offsets.s
  UPD    
include/generated/generic-asm-offsets.h
  CC     
arch/arm/lib/asm-offsets.s
  HOSTCC 
tools/mkenvimage.o
  HOSTLD 
tools/mkenvimage
  HOSTCC 
tools/aisimage.o
  HOSTCC 
tools/atmelimage.o
  HOSTCC 
tools/common/fdt_region.o
  HOSTCC 
tools/common/bootm.o
  HOSTCC 
tools/default_image.o
  HOSTCC 
tools/lib/fdtdec_common.o
  HOSTCC 
tools/lib/fdtdec.o
  HOSTCC 
tools/common/image.o
  HOSTCC 
tools/imagetool.o
  HOSTCC 
tools/imximage.o
  HOSTCC 
tools/imx8image.o
tools/imx8image.c:
In function ‘copy_file.constprop’:
tools/imx8image.c:414:21:
warning: ‘write’ reading 5 bytes from a region of size 4
[-Wstringop-overread]
  414 |             
   if (write(ifd, (char *)&zero, 4 - tail) != 4 - tail) {
      |             
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/imx8image.c:368:13:
note: source object ‘zero’ of size 4
  368 |         int
zero = 0;
      |            
^~~~
In file included
from ./tools/imagetool.h:21,
                
from include/imx8image.h:13,
                
from tools/imx8image.c:8:
/usr/include/unistd.h:378:16:
note: in a call to function ‘write’ declared with attribute
‘access (read_only, 2, 3)’
  378 | extern
ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |             
  ^~~~~
  HOSTCC 
tools/imx8mimage.o
tools/imx8mimage.c:
In function ‘copy_file.constprop’:
tools/imx8mimage.c:291:21:
warning: ‘write’ reading 5 bytes from a region of size 4
[-Wstringop-overread]
  291 |             
   if (write(ifd, (char *)&zero, 4 - tail) != 4 - tail) {
      |             
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/imx8mimage.c:249:13:
note: source object ‘zero’ of size 4
  249 |         int
zero = 0;
      |            
^~~~
In file included
from tools/imagetool.h:21,
                
from tools/imx8mimage.c:9:
/usr/include/unistd.h:378:16:
note: in a call to function ‘write’ declared with attribute
‘access (read_only, 2, 3)’
  378 | extern
ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |             
  ^~~~~
  HOSTCC 
tools/kwbimage.o
  HOSTCC 
tools/lpc32xximage.o
  HOSTCC 
tools/omapimage.o
  HOSTCC 
tools/pblimage.o
  HOSTCC 
tools/vybridimage.o
  HOSTCC 
tools/stm32image.o
  HOSTCC 
tools/rkcommon.o
  HOSTCC 
tools/rkimage.o
  HOSTCC 
tools/rksd.o
  HOSTCC 
tools/rkspi.o
  HOSTCC 
tools/socfpgaimage.o
  HOSTCC 
tools/common/hash.o
  HOSTCC 
tools/ublimage.o
  HOSTCC 
tools/zynqimage.o
  HOSTCC 
tools/zynqmpimage.o
  HOSTCC 
tools/zynqmpbif.o
  HOSTCC 
tools/libfdt/fdt.o
  HOSTCC 
tools/libfdt/fdt_ro.o
  HOSTCC 
tools/libfdt/fdt_wip.o
  HOSTCC 
tools/libfdt/fdt_sw.o
  HOSTCC 
tools/libfdt/fdt_rw.o
  HOSTCC 
tools/libfdt/fdt_strerror.o
  HOSTCC 
tools/libfdt/fdt_empty_tree.o
  HOSTCC 
tools/libfdt/fdt_addresses.o
  HOSTCC 
tools/libfdt/fdt_overlay.o
  HOSTCC 
tools/gpimage.o
  HOSTCC 
tools/gpimage-common.o
  HOSTCC 
tools/mtk_image.o
  HOSTCC 
tools/dumpimage.o
  HOSTLD 
tools/dumpimage
  HOSTCC 
tools/mkimage.o
  HOSTLD 
tools/mkimage
  HOSTCC 
tools/fdtgrep.o
  HOSTLD 
tools/fdtgrep
  HOSTCC 
tools/spl_size_limit
  LD     
arch/arm/cpu/built-in.o
  LD     
arch/arm/cpu//built-in.o
  AS     
arch/arm/lib/vectors.o
  AS     
arch/arm/lib/crt0.o
  AS     
arch/arm/lib/setjmp.o
  AS     
arch/arm/lib/relocate.o
  CC     
arch/arm/lib/bootm-fdt.o
  CC     
arch/arm/lib/bootm.o
In file included
from ./arch/arm/include/asm/system.h:5,
                
from ./arch/arm/include/asm/cache.h:11,
                
from arch/arm/lib/bootm.c:35:
./arch/arm/include/asm/barriers.h:32:24:
error: operator '>=' has no left operand
   32 | #if
__LINUX_ARM_ARCH__ >= 7
      |             
          ^~
./arch/arm/include/asm/barriers.h:36:26:
error: operator '==' has no left operand
   36 | #elif
__LINUX_ARM_ARCH__ == 6
      |             
            ^~
make[1]: ***
[scripts/Makefile.build:266: arch/arm/lib/bootm.o] Error 1
make: ***
[Makefile:1780: arch/arm/lib] Error 2
liuw at liuw-SYS-E100-12T-H:~/Downloads/u-boot$

-----Original Message-----
From: Liu Wang (HW) 
Sent: Wednesday, January 17, 2024 4:08 PM
To: Fabio Estevam <festevam at gmail.com>
Cc: u-boot at lists.denx.de
Subject: RE: Could you please help me in resolving the "arch/arm/lib/vectors.S:87: Error: no such instruction: `b reset' ?"

Hi Fabio,

Thank you again for your help.

Run into format error after export tool chain: 
...gnueabihf-gcc: cannot execute binary file: Exec format error...

Could you please share more ?

Sincerely,
Liu Wang
--------------------
/bin/sh: line 1: /home/liuw/armgnutoolchain132Rel1aarch64armnonelinuxgnueabihf/arm-gnu-toolchain-13.2.Rel1-aarch64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-gcc: cannot execute binary file: Exec format error
/home/liuw/armgnutoolchain132Rel1aarch64armnonelinuxgnueabihf/arm-gnu-toolchain-13.2.Rel1-aarch64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-gcc: /home/liuw/armgnutoolchain132Rel1aarch64armnonelinuxgnueabihf/arm-gnu-toolchain-13.2.Rel1-aarch64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-gcc: cannot execute binary file
/bin/sh: line 1: /home/liuw/armgnutoolchain132Rel1aarch64armnonelinuxgnueabihf/arm-gnu-toolchain-13.2.Rel1-aarch64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-gcc: cannot execute binary file: Exec format error
dirname: missing operand
Try 'dirname --help' for more information.
/bin/sh: line 1: /home/liuw/armgnutoolchain132Rel1aarch64armnonelinuxgnueabihf/arm-gnu-toolchain-13.2.Rel1-aarch64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-gcc: cannot execute binary file: Exec format error
scripts/kconfig/conf  --syncconfig Kconfig
./scripts/gcc-version.sh: line 25: /home/liuw/armgnutoolchain132Rel1aarch64armnonelinuxgnueabihf/arm-gnu-toolchain-13.2.Rel1-aarch64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-gcc: cannot execute binary file: Exec format error
./scripts/gcc-version.sh: line 26: /home/liuw/armgnutoolchain132Rel1aarch64armnonelinuxgnueabihf/arm-gnu-toolchain-13.2.Rel1-aarch64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-gcc: cannot execute binary file: Exec format error
./scripts/gcc-version.sh: line 28: /home/liuw/armgnutoolchain132Rel1aarch64armnonelinuxgnueabihf/arm-gnu-toolchain-13.2.Rel1-aarch64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-gcc: cannot execute binary file: Exec format error
  CFG     u-boot.cfg
/bin/sh: line 1: /home/liuw/armgnutoolchain132Rel1aarch64armnonelinuxgnueabihf/arm-gnu-toolchain-13.2.Rel1-aarch64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-gcc: cannot execute binary file: Exec format error
make[1]: *** [scripts/Makefile.autoconf:77: u-boot.cfg] Error 1
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.

-----Original Message-----
From: Liu Wang (HW) <liuw at supermicro.com> 
Sent: Wednesday, January 17, 2024 12:08 PM
To: Fabio Estevam <festevam at gmail.com>
Cc: u-boot at lists.denx.de
Subject: Re: Could you please help me in resolving the "arch/arm/lib/vectors.S:87: Error: no such instruction: `b reset' ?"

Hi Fabio,

Appreciate!

Sincerely,
Liu  Wang

> On Jan 17, 2024, at 10:49 AM, Fabio Estevam <festevam at gmail.com> wrote:
> 
> [CAUTION: External Mail]
> 
>> On Wed, Jan 17, 2024 at 3:25 PM Liu Wang <liuw at supermicro.com> wrote:
>> 
>> 2. You are right. I have not exported the tool chain.
>> Could you please share me a link to a readme in setting up the tool chain for Ubuntu cross build environment ?
> 
> You can do like this:
> 
> export ARCH=arm
> export CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf-
> 
> make cse_ptjob_cb3_r102_defconfig
> make


More information about the U-Boot mailing list