RT-Thread / RT-Thread/rt-thread

rockchip rk3568 smp版本编译有函数未定义问题 commit id:c7ad493b9

Open
#7,683 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
12.2k
Forks
5.4k
Avg merge
4d 12h
Merged PRs (30d)
40

Description

> scons                                                                                                                                                                                                 
scons: Reading SConscript files ...                                                                                                                                                                     
Newlib version: 4.1.0                                                                                                                                                                                   
scons: done reading SConscript files.                                                                                                                                                                   
scons: Building targets ...                                                                                                                                                                             
scons: building associated VariantDir targets: build                                                                                                                                                    
LINK rtthread.elf                                                                                                                                                                                       
e:/rtos/rt-thread/prebuild/gcc-arm-10.3-2021.07-mingw-w64-i686-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/10.3.1/../../../../aarch64-none-elf/bin/ld.exe: build\kernel\libcpu\aarch64\cortex-a\ent
ry_point.o: in function `after_mmu_enable_cpux':                                                                                                                                                        
E:\RTOS\RT-Thread\rt-thread\libcpu\aarch64\cortex-a/entry_point.S:293: undefined reference to `**rt_hw_secondary_cpu_bsp_start**'                                                                           
E:\RTOS\RT-Thread\rt-thread\libcpu\aarch64\cortex-a/entry_point.S:293:(.text.entrypoint+0x26c): relocation truncated to fit: R_AARCH64_JUMP26 against undefined symbol `rt_hw_secondary_cpu_bsp_start'  
e:/rtos/rt-thread/prebuild/gcc-arm-10.3-2021.07-mingw-w64-i686-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/10.3.1/../../../../aarch64-none-elf/bin/ld.exe: build\driver\board.o: in function `rt_hw
_secondary_cpu_up':                                                                                                                                                                                     
E:\RTOS\RT-Thread\rt-thread\bsp\rockchip\rk3568/driver/board.c:165: undefined reference to `**secondary_cpu_start**'                                                                                        
e:/rtos/rt-thread/prebuild/gcc-arm-10.3-2021.07-mingw-w64-i686-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/10.3.1/../../../../aarch64-none-elf/bin/ld.exe: E:\RTOS\RT-Thread\rt-thread\bsp\rockchip
\rk3568/driver/board.c:165: undefined reference to `secondary_cpu_start'                                                                                                                                
e:/rtos/rt-thread/prebuild/gcc-arm-10.3-2021.07-mingw-w64-i686-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/10.3.1/../../../../aarch64-none-elf/bin/ld.exe: E:\RTOS\RT-Thread\rt-thread\bsp\rockchip
\rk3568/driver/board.c:165: undefined reference to `**arm_psci_cpu_on**'                                                                                                                                    
E:\RTOS\RT-Thread\rt-thread\bsp\rockchip\rk3568/driver/board.c:165:(.text+0x238): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `arm_psci_cpu_on'                              
e:/rtos/rt-thread/prebuild/gcc-arm-10.3-2021.07-mingw-w64-i686-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/10.3.1/../../../../aarch64-none-elf/bin/ld.exe: build\driver\board.o: in function `secon
dary_cpu_c_start':                                                                                                                                                                                      
E:\RTOS\RT-Thread\rt-thread\bsp\rockchip\rk3568/driver/board.c:171: undefined reference to `**rt_hw_mmu_init**'                                                                                             
E:\RTOS\RT-Thread\rt-thread\bsp\rockchip\rk3568/driver/board.c:171:(.text+0x26c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rt_hw_mmu_init'                               
e:/rtos/rt-thread/prebuild/gcc-arm-10.3-2021.07-mingw-w64-i686-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/10.3.1/../../../../aarch64-none-elf/bin/ld.exe: build\driver\board.o: in function `**rt_hw
_secondary_cpu_idle_exec**':                                                                                                                                                                              
E:\RTOS\RT-Thread\rt-thread\bsp\rockchip\rk3568/driver/board.c:187: undefined reference to `**__WFE**'                                                                                                      
E:\RTOS\RT-Thread\rt-thread\bsp\rockchip\rk3568/driver/board.c:187:(.text+0x2e4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `__WFE'                                        
collect2.exe: error: ld returned 1 exit status                                                                                                                                                          
scons: *** [rtthread.elf] Error 1                                                                                                                                                                       
scons: building terminated because of errors.                                                                                                                                                           

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the SMP build at commit c7ad493b9 with scons and inspect libcpu/aarch64/cortex-a/entry_point.S around line 293 and bsp/rockchip/rk3568/driver/board.c around lines 165-187. Trace where the reported symbols are expected to be provided and verify the relevant RK3568 SMP configuration. Done means the rk3568 SMP target links without these undefined-reference errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.