Skip to contentSkip to conversation

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

DISCUSSION Liu Wang 2 participants 14 messages Jan 17, 2024 – Jan 24, 2024

lore
Share & tools
lore

Liu Wang

author
#0 lore raw

Sir/Madam,

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

Sincerely,
Liu Wang

liuw@liuw-SYS-E100-12T-H:~/Downloads/u-boot$ make cse_ptjob_cb3_r102_defconfig
#
# configuration written to .config
#
liuw@liuw-SYS-E100-12T-H:~/Downloads/u-boot$ make all
scripts/kconfig/conf  --syncconfig Kconfig
  CFG     u-boot.cfg
  GEN     include/autoconf.mk
  GEN     include/autoconf.mk.dep
  UPD     include/generated/timestamp_autogenerated.h
  HOSTCC  tools/mkenvimage.o
  HOSTLD  tools/mkenvimage
  HOSTCC  tools/dumpimage.o
  HOSTLD  tools/dumpimage
  HOSTCC  tools/mkimage.o
  HOSTLD  tools/mkimage
  LD      arch/arm/cpu/built-in.o
  LD      arch/arm/cpu//built-in.o
  AS      arch/arm/lib/vectors.o
arch/arm/lib/vectors.S: Assembler messages:
arch/arm/lib/vectors.S:87: Error: no such instruction: `b reset'
arch/arm/lib/vectors.S:87: Error: no such instruction: `ldr pc,_undefined_instruction'
arch/arm/lib/vectors.S:87: Error: no such instruction: `ldr pc,_software_interrupt'
arch/arm/lib/vectors.S:87: Error: no such instruction: `ldr pc,_prefetch_abort'
arch/arm/lib/vectors.S:87: Error: no such instruction: `ldr pc,_data_abort'
arch/arm/lib/vectors.S:87: Error: no such instruction: `ldr pc,_not_used'
arch/arm/lib/vectors.S:87: Error: no such instruction: `ldr pc,_irq'
arch/arm/lib/vectors.S:87: Error: no such instruction: `ldr pc,_fiq'
arch/arm/lib/vectors.S:153: Warning: value 0x000000000badc0de truncated to 0x000000000000c0de
arch/arm/lib/vectors.S:156: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:157: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:158: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:237: Error: Bad parameter list for macro `get_irq_stack'
arch/arm/lib/vectors.S:241: Error: Bad parameter list for macro `get_fiq_stack'
arch/arm/lib/vectors.S:249: Error: alignment not a power of 2
arch/arm/lib/vectors.S:251: Error: no such instruction: `ldr r13,IRQ_STACK_START_IN@setup our mode stack'
arch/arm/lib/vectors.S:251: Error: too many memory references for `str'
arch/arm/lib/vectors.S:251: Error: no such instruction: `mrs lr,spsr@get the spsr'
arch/arm/lib/vectors.S:251: Error: too many memory references for `str'
arch/arm/lib/vectors.S:251: Error: expecting operand after ','; got nothing
arch/arm/lib/vectors.S:251: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:251: Error: no such instruction: `msr spsr,r13@switch modes,make sure moves will execute'
arch/arm/lib/vectors.S:251: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:251: Warning: `pc' is not valid here (expected `(%rsi)')
arch/arm/lib/vectors.S:251: Error: junk `@jump to next instruction&switch modes.' after expression
arch/arm/lib/vectors.S:251: Warning: `lr@jump to next instruction&switch modes.' is not valid here (expected `(%rdi)')
arch/arm/lib/vectors.S:251: Warning: no instruction mnemonic suffix given and no register operands; using default for `movs'
arch/arm/lib/vectors.S:252: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:252: Error: too many memory references for `sub'
arch/arm/lib/vectors.S:252: Error: no such instruction: `stmia sp,{r0 - r12}@Save user registers (now in svc mode)r0-r12'
arch/arm/lib/vectors.S:252: Error: no such instruction: `ldr r2,IRQ_STACK_START_IN'
arch/arm/lib/vectors.S:252: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:252: Error: no such instruction: `ldmia r2,{r2 - r3}'
arch/arm/lib/vectors.S:252: Error: too many memory references for `add'
arch/arm/lib/vectors.S:252: Error: too many memory references for `add'
arch/arm/lib/vectors.S:252: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:252: Error: no such instruction: `stmia r5,{r0 - r3}@save sp_SVC,lr_SVC,pc,cpsr'
arch/arm/lib/vectors.S:252: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:253: Error: no such instruction: `bl do_undefined_instruction'
arch/arm/lib/vectors.S:255: Error: alignment not a power of 2
arch/arm/lib/vectors.S:257: Error: no such instruction: `ldr r13,IRQ_STACK_START_IN@setup our mode stack'
arch/arm/lib/vectors.S:257: Error: too many memory references for `str'
arch/arm/lib/vectors.S:257: Error: no such instruction: `mrs lr,spsr@get the spsr'
arch/arm/lib/vectors.S:257: Error: too many memory references for `str'
arch/arm/lib/vectors.S:257: Error: expecting operand after ','; got nothing
arch/arm/lib/vectors.S:257: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:257: Error: no such instruction: `msr spsr,r13@switch modes,make sure moves will execute'
arch/arm/lib/vectors.S:257: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:257: Warning: `pc' is not valid here (expected `(%rsi)')
arch/arm/lib/vectors.S:257: Error: junk `@jump to next instruction&switch modes.' after expression
arch/arm/lib/vectors.S:257: Warning: `lr@jump to next instruction&switch modes.' is not valid here (expected `(%rdi)')
arch/arm/lib/vectors.S:257: Warning: no instruction mnemonic suffix given and no register operands; using default for `movs'
arch/arm/lib/vectors.S:258: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:258: Error: too many memory references for `sub'
arch/arm/lib/vectors.S:258: Error: no such instruction: `stmia sp,{r0 - r12}@Save user registers (now in svc mode)r0-r12'
arch/arm/lib/vectors.S:258: Error: no such instruction: `ldr r2,IRQ_STACK_START_IN'
arch/arm/lib/vectors.S:258: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:258: Error: no such instruction: `ldmia r2,{r2 - r3}'
arch/arm/lib/vectors.S:258: Error: too many memory references for `add'
arch/arm/lib/vectors.S:258: Error: too many memory references for `add'
arch/arm/lib/vectors.S:258: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:258: Error: no such instruction: `stmia r5,{r0 - r3}@save sp_SVC,lr_SVC,pc,cpsr'
arch/arm/lib/vectors.S:258: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:259: Error: no such instruction: `bl do_software_interrupt'
arch/arm/lib/vectors.S:261: Error: alignment not a power of 2
arch/arm/lib/vectors.S:263: Error: no such instruction: `ldr r13,IRQ_STACK_START_IN@setup our mode stack'
arch/arm/lib/vectors.S:263: Error: too many memory references for `str'
arch/arm/lib/vectors.S:263: Error: no such instruction: `mrs lr,spsr@get the spsr'
arch/arm/lib/vectors.S:263: Error: too many memory references for `str'
arch/arm/lib/vectors.S:263: Error: expecting operand after ','; got nothing
arch/arm/lib/vectors.S:263: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:263: Error: no such instruction: `msr spsr,r13@switch modes,make sure moves will execute'
arch/arm/lib/vectors.S:263: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:263: Warning: `pc' is not valid here (expected `(%rsi)')
arch/arm/lib/vectors.S:263: Error: junk `@jump to next instruction&switch modes.' after expression
arch/arm/lib/vectors.S:263: Warning: `lr@jump to next instruction&switch modes.' is not valid here (expected `(%rdi)')
arch/arm/lib/vectors.S:263: Warning: no instruction mnemonic suffix given and no register operands; using default for `movs'
arch/arm/lib/vectors.S:264: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:264: Error: too many memory references for `sub'
arch/arm/lib/vectors.S:264: Error: no such instruction: `stmia sp,{r0 - r12}@Save user registers (now in svc mode)r0-r12'
arch/arm/lib/vectors.S:264: Error: no such instruction: `ldr r2,IRQ_STACK_START_IN'
arch/arm/lib/vectors.S:264: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:264: Error: no such instruction: `ldmia r2,{r2 - r3}'
arch/arm/lib/vectors.S:264: Error: too many memory references for `add'
arch/arm/lib/vectors.S:264: Error: too many memory references for `add'
arch/arm/lib/vectors.S:264: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:264: Error: no such instruction: `stmia r5,{r0 - r3}@save sp_SVC,lr_SVC,pc,cpsr'
arch/arm/lib/vectors.S:264: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:265: Error: no such instruction: `bl do_prefetch_abort'
arch/arm/lib/vectors.S:267: Error: alignment not a power of 2
arch/arm/lib/vectors.S:269: Error: no such instruction: `ldr r13,IRQ_STACK_START_IN@setup our mode stack'
arch/arm/lib/vectors.S:269: Error: too many memory references for `str'
arch/arm/lib/vectors.S:269: Error: no such instruction: `mrs lr,spsr@get the spsr'
arch/arm/lib/vectors.S:269: Error: too many memory references for `str'
arch/arm/lib/vectors.S:269: Error: expecting operand after ','; got nothing
arch/arm/lib/vectors.S:269: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:269: Error: no such instruction: `msr spsr,r13@switch modes,make sure moves will execute'
arch/arm/lib/vectors.S:269: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:269: Warning: `pc' is not valid here (expected `(%rsi)')
arch/arm/lib/vectors.S:269: Error: junk `@jump to next instruction&switch modes.' after expression
arch/arm/lib/vectors.S:269: Warning: `lr@jump to next instruction&switch modes.' is not valid here (expected `(%rdi)')
arch/arm/lib/vectors.S:269: Warning: no instruction mnemonic suffix given and no register operands; using default for `movs'
arch/arm/lib/vectors.S:270: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:270: Error: too many memory references for `sub'
arch/arm/lib/vectors.S:270: Error: no such instruction: `stmia sp,{r0 - r12}@Save user registers (now in svc mode)r0-r12'
arch/arm/lib/vectors.S:270: Error: no such instruction: `ldr r2,IRQ_STACK_START_IN'
arch/arm/lib/vectors.S:270: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:270: Error: no such instruction: `ldmia r2,{r2 - r3}'
arch/arm/lib/vectors.S:270: Error: too many memory references for `add'
arch/arm/lib/vectors.S:270: Error: too many memory references for `add'
arch/arm/lib/vectors.S:270: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:270: Error: no such instruction: `stmia r5,{r0 - r3}@save sp_SVC,lr_SVC,pc,cpsr'
arch/arm/lib/vectors.S:270: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:271: Error: no such instruction: `bl do_data_abort'
arch/arm/lib/vectors.S:273: Error: alignment not a power of 2
arch/arm/lib/vectors.S:275: Error: no such instruction: `ldr r13,IRQ_STACK_START_IN@setup our mode stack'
arch/arm/lib/vectors.S:275: Error: too many memory references for `str'
arch/arm/lib/vectors.S:275: Error: no such instruction: `mrs lr,spsr@get the spsr'
arch/arm/lib/vectors.S:275: Error: too many memory references for `str'
arch/arm/lib/vectors.S:275: Error: expecting operand after ','; got nothing
arch/arm/lib/vectors.S:275: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:275: Error: no such instruction: `msr spsr,r13@switch modes,make sure moves will execute'
arch/arm/lib/vectors.S:275: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:275: Warning: `pc' is not valid here (expected `(%rsi)')
arch/arm/lib/vectors.S:275: Error: junk `@jump to next instruction&switch modes.' after expression
arch/arm/lib/vectors.S:275: Warning: `lr@jump to next instruction&switch modes.' is not valid here (expected `(%rdi)')
arch/arm/lib/vectors.S:275: Warning: no instruction mnemonic suffix given and no register operands; using default for `movs'
arch/arm/lib/vectors.S:276: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:276: Error: too many memory references for `sub'
arch/arm/lib/vectors.S:276: Error: no such instruction: `stmia sp,{r0 - r12}@Save user registers (now in svc mode)r0-r12'
arch/arm/lib/vectors.S:276: Error: no such instruction: `ldr r2,IRQ_STACK_START_IN'
arch/arm/lib/vectors.S:276: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:276: Error: no such instruction: `ldmia r2,{r2 - r3}'
arch/arm/lib/vectors.S:276: Error: too many memory references for `add'
arch/arm/lib/vectors.S:276: Error: too many memory references for `add'
arch/arm/lib/vectors.S:276: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:276: Error: no such instruction: `stmia r5,{r0 - r3}@save sp_SVC,lr_SVC,pc,cpsr'
arch/arm/lib/vectors.S:276: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:277: Error: no such instruction: `bl do_not_used'
arch/arm/lib/vectors.S:280: Error: alignment not a power of 2
arch/arm/lib/vectors.S:282: Error: no such instruction: `ldr r13,IRQ_STACK_START_IN@setup our mode stack'
arch/arm/lib/vectors.S:282: Error: too many memory references for `str'
arch/arm/lib/vectors.S:282: Error: no such instruction: `mrs lr,spsr@get the spsr'
arch/arm/lib/vectors.S:282: Error: too many memory references for `str'
arch/arm/lib/vectors.S:282: Error: expecting operand after ','; got nothing
arch/arm/lib/vectors.S:282: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:282: Error: no such instruction: `msr spsr,r13@switch modes,make sure moves will execute'
arch/arm/lib/vectors.S:282: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:282: Warning: `pc' is not valid here (expected `(%rsi)')
arch/arm/lib/vectors.S:282: Error: junk `@jump to next instruction&switch modes.' after expression
arch/arm/lib/vectors.S:282: Warning: `lr@jump to next instruction&switch modes.' is not valid here (expected `(%rdi)')
arch/arm/lib/vectors.S:282: Warning: no instruction mnemonic suffix given and no register operands; using default for `movs'
arch/arm/lib/vectors.S:283: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:283: Error: too many memory references for `sub'
arch/arm/lib/vectors.S:283: Error: no such instruction: `stmia sp,{r0 - r12}@Save user registers (now in svc mode)r0-r12'
arch/arm/lib/vectors.S:283: Error: no such instruction: `ldr r2,IRQ_STACK_START_IN'
arch/arm/lib/vectors.S:283: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:283: Error: no such instruction: `ldmia r2,{r2 - r3}'
arch/arm/lib/vectors.S:283: Error: too many memory references for `add'
arch/arm/lib/vectors.S:283: Error: too many memory references for `add'
arch/arm/lib/vectors.S:283: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:283: Error: no such instruction: `stmia r5,{r0 - r3}@save sp_SVC,lr_SVC,pc,cpsr'
arch/arm/lib/vectors.S:283: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:284: Error: no such instruction: `bl do_irq'
arch/arm/lib/vectors.S:286: Error: alignment not a power of 2
arch/arm/lib/vectors.S:288: Error: no such instruction: `ldr r13,IRQ_STACK_START_IN@setup our mode stack'
arch/arm/lib/vectors.S:288: Error: too many memory references for `str'
arch/arm/lib/vectors.S:288: Error: no such instruction: `mrs lr,spsr@get the spsr'
arch/arm/lib/vectors.S:288: Error: too many memory references for `str'
arch/arm/lib/vectors.S:288: Error: expecting operand after ','; got nothing
arch/arm/lib/vectors.S:288: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:288: Error: no such instruction: `msr spsr,r13@switch modes,make sure moves will execute'
arch/arm/lib/vectors.S:288: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:288: Warning: `pc' is not valid here (expected `(%rsi)')
arch/arm/lib/vectors.S:288: Error: junk `@jump to next instruction&switch modes.' after expression
arch/arm/lib/vectors.S:288: Warning: `lr@jump to next instruction&switch modes.' is not valid here (expected `(%rdi)')
arch/arm/lib/vectors.S:288: Warning: no instruction mnemonic suffix given and no register operands; using default for `movs'
arch/arm/lib/vectors.S:289: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:289: Error: too many memory references for `sub'
arch/arm/lib/vectors.S:289: Error: no such instruction: `stmia sp,{r0 - r12}@Save user registers (now in svc mode)r0-r12'
arch/arm/lib/vectors.S:289: Error: no such instruction: `ldr r2,IRQ_STACK_START_IN'
arch/arm/lib/vectors.S:289: Error: junk at end of line, first unrecognized character is `@'
arch/arm/lib/vectors.S:289: Error: no such instruction: `ldmia r2,{r2 - r3}'
arch/arm/lib/vectors.S:289: Error: too many memory references for `add'
arch/arm/lib/vectors.S:289: Error: too many memory references for `add'
arch/arm/lib/vectors.S:289: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:289: Error: no such instruction: `stmia r5,{r0 - r3}@save sp_SVC,lr_SVC,pc,cpsr'
arch/arm/lib/vectors.S:289: Error: too many memory references for `mov'
arch/arm/lib/vectors.S:290: Error: no such instruction: `bl do_fiq'
arch/arm/lib/vectors.S:120: Error: alignment padding (2 bytes) not a multiple of 4
arch/arm/lib/vectors.S:120: Error: alignment padding (2 bytes) not a multiple of 4
make[1]: *** [scripts/Makefile.build:301: arch/arm/lib/vectors.o] Error 1
make: *** [Makefile:1780: arch/arm/lib] Error 2
liuw@liuw-SYS-E100-12T-H:~/Downloads/u-boot
#1 lore raw
Quoted 8 lines · Liu Wang

Sir/Madam,

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

Sincerely,
Liu Wang

liuw@liuw-SYS-E100-12T-H:~/Downloads/u-boot$ make cse_ptjob_cb3_r102_defconfig

This is not a configuration supported by U-Boot mainline.

Quoted 12 lines

#

# configuration written to .config
#
liuw@liuw-SYS-E100-12T-H:~/Downloads/u-boot$ make all
scripts/kconfig/conf  --syncconfig Kconfig
  CFG     u-boot.cfg
  GEN     include/autoconf.mk
  GEN     include/autoconf.mk.dep
  UPD     include/generated/timestamp_autogenerated.h
  HOSTCC  tools/mkenvimage.o
  HOSTLD  tools/mkenvimage
  HOSTCC  tools/dumpimage.o
Quoted 8 lines
  HOSTLD  tools/dumpimage
  HOSTCC  tools/mkimage.o
  HOSTLD  tools/mkimage
  LD      arch/arm/cpu/built-in.o
  LD      arch/arm/cpu//built-in.o
  AS      arch/arm/lib/vectors.o
arch/arm/lib/vectors.S: Assembler messages:
arch/arm/lib/vectors.S:87: Error: no such instruction: `b reset'

Have you exported the toolchain?

author
#2 lore raw

Hi Fabio,

Thank you for your help.

1. You are right. It is not an U-boot mainline configuration.

I am porting U-boot to our company's hardware platform https://www.supermicro.com/manuals/other/CSE-PTJBOD-CB3.pdf with SoC AST2400 from Aspeed embedded with an ARM core ARM926EJ 32-bit RISC CPU.

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 ?

Sincerely,
Liu Wang

-----Original Message-----
From: Fabio Estevam <[email protected]>
Sent: Wednesday, January 17, 2024 6:06 AM
To: Liu Wang (HW) <[email protected]>
Cc: [email protected]
Subject: Re: Could you please help me in resolving the "arch/arm/lib/vectors.S:87: Error: no such instruction: `b reset' ?"

[CAUTION: External Mail]

Quoted 8 lines · Liu Wang

Sir/Madam,

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

Sincerely,
Liu Wang

liuw@liuw-SYS-E100-12T-H:~/Downloads/u-boot$ make cse_ptjob_cb3_r102_defconfig

This is not a configuration supported by U-Boot mainline.

Quoted 12 lines

#

# configuration written to .config
#
liuw@liuw-SYS-E100-12T-H:~/Downloads/u-boot$ make all
scripts/kconfig/conf  --syncconfig Kconfig
  CFG     u-boot.cfg
  GEN     include/autoconf.mk
  GEN     include/autoconf.mk.dep
  UPD     include/generated/timestamp_autogenerated.h
  HOSTCC  tools/mkenvimage.o
  HOSTLD  tools/mkenvimage
  HOSTCC  tools/dumpimage.o
Quoted 8 lines
  HOSTLD  tools/dumpimage
  HOSTCC  tools/mkimage.o
  HOSTLD  tools/mkimage
  LD      arch/arm/cpu/built-in.o
  LD      arch/arm/cpu//built-in.o
  AS      arch/arm/lib/vectors.o
arch/arm/lib/vectors.S: Assembler messages:
arch/arm/lib/vectors.S:87: Error: no such instruction: `b reset'

Have you exported the toolchain?

#3 lore raw
Quoted 2 lines · Liu Wang

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

author
#4 lore raw

Hi Fabio,

Appreciate!

Sincerely,
Liu Wang

Quoted 16 lines · Fabio Estevam

[CAUTION: External Mail]

Quoted 4 lines · Liu Wang

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

author
#5 lore raw

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) <[email protected]>
Sent: Wednesday, January 17, 2024 12:08 PM
To: Fabio Estevam <[email protected]>
Cc: [email protected]
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

Quoted 16 lines · Fabio Estevam

[CAUTION: External Mail]

Quoted 4 lines · Liu Wang

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

author
#6 lore raw

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@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@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 <[email protected]>
Cc: [email protected]
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) <[email protected]>
Sent: Wednesday, January 17, 2024 12:08 PM
To: Fabio Estevam <[email protected]>
Cc: [email protected]
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

Quoted 16 lines · Fabio Estevam

[CAUTION: External Mail]

Quoted 4 lines · Liu Wang

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

#7 lore raw
Quoted 7 lines · Liu Wang

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...

I would suggest installing the default arm toolchain from Ubuntu.

As for the build error, you would need to ask to whoever provided you with the code.

Since this is not a mainline U-Boot, we cannot help.

author
#8 lore raw

Hi Fabio,

Thank you.
Will do.

Sincerely,
Liu Wang

Quoted 19 lines · Fabio Estevam

[CAUTION: External Mail]

Quoted 8 lines · Liu Wang

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...

I would suggest installing the default arm toolchain from Ubuntu.

As for the build error, you would need to ask to whoever provided you with the code.

Since this is not a mainline U-Boot, we cannot help.

author
#9 lore raw

Could you please help me in resolving the " /reset.c:42:(.text.do_reset+0x20): undefined reference to `reset_cpu'?"

Hi Fabio,

Could you please help me in resolving the " /reset.c:42:(.text.do_reset+0x20): undefined reference to `reset_cpu'?" from: u-boot$make all:

Sincerely,
Liu Wang
----------------------------------------------------------------------
...$make all

  UPD     include/generated/timestamp_autogenerated.h
  HOSTCC  tools/mkenvimage.o
  HOSTLD  tools/mkenvimage
  HOSTCC  tools/dumpimage.o
  HOSTLD  tools/dumpimage
  HOSTCC  tools/mkimage.o
  HOSTLD  tools/mkimage
  CC      cmd/version.o
  LD      cmd/built-in.o
  CC      common/main.o
  LD      common/built-in.o
  CC      lib/display_options.o
  LD      lib/built-in.o
  LD      u-boot

/home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: warning: u-boot has a LOAD segment with RWX permissions /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: arch/arm/lib/built-in.o: in function `do_reset':
/home/liuw/Downloads/u-boot/arch/arm/lib/reset.c:42:(.text.do_reset+0x20): undefined reference to `reset_cpu'
/home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: arch/arm/mach-aspeed/built-in.o: in function `dram_init':
/home/liuw/Downloads/u-boot/arch/arm/mach-aspeed/ast2500/board_common.c:50:(.text.dram_init+0x24): undefined reference to ram_get_info' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: arch/arm/mach-aspeed/built-in.o: in function ast2500_sdrammc_ofdata_to_platdata':
/home/liuw/Downloads/u-boot/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c:395:(.text.ast2500_sdrammc_ofdata_to_platdata+0x18): undefined reference to `regmap_init_mem' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: /home/liuw/Downloads/u-boot/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c:399:(.text.ast2500_sdrammc_ofdata_to_platdata+0x2c): undefined reference to `regmap_get_range' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: /home/liuw/Downloads/u-boot/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c:400:(.text.ast2500_sdrammc_ofdata_to_platdata+0x3c): undefined reference to regmap_get_range' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: cmd/built-in.o: in function do_imls_nor':
/home/liuw/Downloads/u-boot/cmd/bootm.c:390:(.text.do_imls+0x9c): undefined reference to `flash_info'
/home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: cmd/built-in.o: in function `do_i2c_reset':
/home/liuw/Downloads/u-boot/cmd/i2c.c:1960:(.text.do_i2c_reset+0xc): undefined reference to `i2c_init'
/home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: cmd/built-in.o: in function `do_i2c_probe':
/home/liuw/Downloads/u-boot/cmd/i2c.c:999:(.text.do_i2c_probe+0x5c): undefined reference to `i2c_probe'
/home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: cmd/built-in.o: in function `do_i2c_md':
/home/liuw/Downloads/u-boot/cmd/i2c.c:592:(.text.do_i2c_md+0xd0): undefined reference to `i2c_read'
/home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: cmd/built-in.o: in function `do_i2c_read':
/home/liuw/Downloads/u-boot/cmd/i2c.c:342:(.text.do_i2c_read+0x90): undefined reference to `i2c_read'
/home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: cmd/built-in.o: in function `do_i2c_mw':
/home/liuw/Downloads/u-boot/cmd/i2c.c:691:(.text.do_i2c_mw+0xc8): undefined reference to `i2c_write'
/home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: cmd/built-in.o: in function `do_i2c_write':
/home/liuw/Downloads/u-boot/cmd/i2c.c:426:(.text.do_i2c_write+0xc8): undefined reference to `i2c_write'
/home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: /home/liuw/Downloads/u-boot/cmd/i2c.c:412:(.text.do_i2c_write+0x110): undefined reference to i2c_write' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: cmd/built-in.o: in function do_i2c_crc':
/home/liuw/Downloads/u-boot/cmd/i2c.c:779:(.text.do_i2c_crc+0xd4): undefined reference to `i2c_read'
/home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: cmd/built-in.o: in function `mod_i2c_mem':
/home/liuw/Downloads/u-boot/cmd/i2c.c:874:(.text.mod_i2c_mem.isra.0+0xbc): undefined reference to `i2c_read'
/home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: /home/liuw/Downloads/u-boot/cmd/i2c.c:922:(.text.mod_i2c_mem.isra.0+0x1d0): undefined reference to i2c_write' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: cmd/built-in.o: in function do_i2c_loop':
/home/liuw/Downloads/u-boot/cmd/i2c.c:1093:(.text.do_i2c_loop+0xac): undefined reference to `i2c_read'
/home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: common/built-in.o: in function `jumptable_init':
/home/liuw/Downloads/u-boot/common/exports.c:32:(.text.jumptable_init+0x1cc): undefined reference to `i2c_write'
/home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: /home/liuw/Downloads/u-boot/common/exports.c:32:(.text.jumptable_init+0x1d0): undefined reference to i2c_read' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: common/built-in.o: in function cread_line':
/home/liuw/Downloads/u-boot/common/cli_readline.c:266:(.text.cli_readline_into_buffer+0xd8): undefined reference to `get_tbclk' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: common/built-in.o:(.rodata.init_sequence_f+0x4c): undefined reference to print_cpuinfo' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: drivers/built-in.o: in function spi_flash_probe':
/home/liuw/Downloads/u-boot/drivers/mtd/spi/sf_probe.c:63:(.text.spi_flash_probe+0x4): undefined reference to spi_setup_slave' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: drivers/built-in.o: in function spi_flash_probe_slave':
/home/liuw/Downloads/u-boot/drivers/mtd/spi/sf_probe.c:38:(.text.spi_flash_probe+0x2c): undefined reference to spi_claim_bus' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: drivers/built-in.o: in function spi_flash_probe':
/home/liuw/Downloads/u-boot/drivers/mtd/spi/sf_probe.c:76:(.text.spi_flash_probe+0x3c): undefined reference to spi_free_slave' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: drivers/built-in.o: in function spi_flash_probe_slave':
/home/liuw/Downloads/u-boot/drivers/mtd/spi/sf_probe.c:52:(.text.spi_flash_probe+0x64): undefined reference to spi_release_bus' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: drivers/built-in.o: in function spi_flash_free':
/home/liuw/Downloads/u-boot/drivers/mtd/spi/sf_probe.c:89:(.text.spi_flash_free+0xc): undefined reference to spi_free_slave' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: drivers/serial/built-in.o: in function get_current':
/home/liuw/Downloads/u-boot/drivers/serial/serial.c:324:(.text.get_current+0x10): undefined reference to default_serial_console' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: drivers/serial/built-in.o: in function serial_initialize':
/home/liuw/Downloads/u-boot/drivers/serial/serial.c:185:(.text.serial_initialize+0x28): undefined reference to default_serial_console' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: drivers/spi/built-in.o: in function spi_mem_exec_op':
/home/liuw/Downloads/u-boot/drivers/spi/spi-mem-nodm.c:33:(.text.spi_mem_exec_op+0x58): undefined reference to `spi_claim_bus' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: /home/liuw/Downloads/u-boot/drivers/spi/spi-mem-nodm.c:56:(.text.spi_mem_exec_op+0x104): undefined reference to `spi_xfer' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: /home/liuw/Downloads/u-boot/drivers/spi/spi-mem-nodm.c:68:(.text.spi_mem_exec_op+0x120): undefined reference to `spi_release_bus' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: /home/liuw/Downloads/u-boot/drivers/spi/spi-mem-nodm.c:62:(.text.spi_mem_exec_op+0x154): undefined reference to spi_xfer' /home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: lib/built-in.o: in function tick_to_time':
/home/liuw/Downloads/u-boot/lib/time.c:123:(.text.tick_to_time+0x8): undefined reference to `get_tbclk'
/home/liuw/armgnutoolchain132rel1x8664armnoneeabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ld.bfd: lib/built-in.o: in function `usec_to_tick':
/home/liuw/Downloads/u-boot/lib/time.c:168:(.text.usec_to_tick+0x8): undefined reference to `get_tbclk'
make: *** [Makefile:1753: u-boot] Error 1

#10 lore raw

Re: Could you please help me in resolving the " /reset.c:42:(.text.do_reset+0x20): undefined reference to `reset_cpu'?"

Hi Liu Wang,

Quoted 4 lines · Liu Wang

Hi Fabio,

Could you please help me in resolving the " /reset.c:42:(.text.do_reset+0x20): undefined reference to `reset_cpu'?" from: u-boot$make all:

Looking at the errors below, there are several errors besides the reset_cpu one.

As you are using an out-of-tree U-Boot, there is not much the U-Boot community can do to help you, sorry.

You need to get assistance from the U-Boot provider that you are using.

author
#11 lore raw

RE: Could you please help me in resolving the " /reset.c:42:(.text.do_reset+0x20): undefined reference to `reset_cpu'?"

Hi Fabio,

Thank you for your help.

Attached is the 'git status' and 'git log' in my porting u-boot to my cse_ptjob_cb3_r102 control board by following README in u-boot and being blocked with the hurdle of "undefined reference to `reset_cpu'" in hope you spot something familiar and shed a light in my building effort.

Sincerely,
Liu Wang
-----------------------------------------------------------------------------------------------------

liuw@liuw-SYS-E100-12T-H:~/Downloads/u-boot$ git log
commit 050acee119b3757fee3bd128f55d720fdd9bb890 (HEAD, tag: v2020.10, list)
Author: Tom Rini <[email protected]>
Date:   Mon Oct 5 11:15:32 2020 -0400

Prepare v2020.10

commit 0f3e2942c9e01b5dfc01f3dabe0e2f2ab8fd8b84

Author: Soeren Moch <[email protected]>
Date:   Thu Aug 27 21:52:46 2020 +0200

board: tbs2910: Use recommended distroboot addresses

According to doc/README.distro fdt_addr must not be set when DTB is not available from hardware. So remove this entry.

Use address 32MB above the start of DRAM for kernel_addr_r. This way we likely can avoid the self-relocation of the compressed kernel image before it decompresses to offset 0x8000 from start of DRAM.

Use address 128MB above the start of DRAM for fdt_addr_r, since this is the maximum location for the end of the kernel. So we avoid overwriting the DTB.

Use 512k above that for ramdisk_addr_r. This should be enough for the DTB, rest of DRAM can be used for initrd.

liuw@liuw-SYS-E100-12T-H:~/Downloads/u-boot$

-----------------------------------------------------------------------------

liuw@liuw-SYS-E100-12T-H:~/Downloads/u-boot$ git status
HEAD detached at v2020.10
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   arch/arm/Kconfig
	modified:   arch/arm/include/asm/arch-aspeed/platform.h
	modified:   arch/arm/include/asm/global_data.h
	modified:   cmd/bootm.c
	modified:   cmd/i2c.c
	modified:   cmd/load.c
	modified:   cmd/source.c
	modified:   common/image.c
	modified:   fs/fs.c
	modified:   include/command.h
	modified:   include/ns16550.h

Untracked files:
(use "git add <file>..." to include in what will be committed)

	board/supermicro/
	configs/cse_ptjob_cb3_r102_defconfig
	include/configs/cast_common.h
	include/configs/cse_ptjob_cb3_r102.h
	listBin
	log2024011616makeAll.yml
	logmakeall2024012218
	makelog

no changes added to commit (use "git add" and/or "git commit -a") liuw@liuw-SYS-E100-12T-H:~/Downloads/u-boot$

-----Original Message-----
From: Fabio Estevam <[email protected]>
Sent: Monday, January 22, 2024 6:44 PM
To: Liu Wang (HW) <[email protected]>
Cc: [email protected]
Subject: Re: Could you please help me in resolving the " /reset.c:42:(.text.do_reset+0x20): undefined reference to `reset_cpu'?"

[CAUTION: External Mail]

Hi Liu Wang,

Quoted 4 lines · Liu Wang

Hi Fabio,

Could you please help me in resolving the " /reset.c:42:(.text.do_reset+0x20): undefined reference to `reset_cpu'?" from: u-boot$make all:

Looking at the errors below, there are several errors besides the reset_cpu one.

As you are using an out-of-tree U-Boot, there is not much the U-Boot community can do to help you, sorry.

You need to get assistance from the U-Boot provider that you are using.

#12 lore raw

Re: Could you please help me in resolving the " /reset.c:42:(.text.do_reset+0x20): undefined reference to `reset_cpu'?"

Quoted 6 lines · Liu Wang

Hi Fabio,

Thank you for your help.

Attached is the 'git status' and 'git log' in my porting u-boot to my cse_ptjob_cb3_r102 control board by following README in u-boot and being blocked with the hurdle of "undefined reference to `reset_cpu'" in hope you spot something familiar and shed a light in my building effort.

I don't have any insight into the problem, unfortunately.

Also, v2020.10 is too old.

You should use mainline U-Boot and upstream your board (or hire someone to do it for you).

author
#13 lore raw

Re: Could you please help me in resolving the " /reset.c:42:(.text.do_reset+0x20): undefined reference to `reset_cpu'?"

Hi Fabio,

Thank you you review.

Sincerely,
Liu Wang

Quoted 18 lines · Fabio Estevam

[CAUTION: External Mail]

Quoted 7 lines · Liu Wang

Hi Fabio,

Thank you for your help.

Attached is the 'git status' and 'git log' in my porting u-boot to my cse_ptjob_cb3_r102 control board by following README in u-boot and being blocked with the hurdle of "undefined reference to `reset_cpu'" in hope you spot something familiar and shed a light in my building effort.

I don't have any insight into the problem, unfortunately.

Also, v2020.10 is too old.

You should use mainline U-Boot and upstream your board (or hire someone to do it for you).