Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] failed to build bsp/raspberry-pi/raspi-dm2.0 #9735

Open
unicornx opened this issue Dec 3, 2024 · 3 comments
Open

[Bug] failed to build bsp/raspberry-pi/raspi-dm2.0 #9735

unicornx opened this issue Dec 3, 2024 · 3 comments
Assignees
Labels
Arch: ARM/AArch64 BSP related with arm BSP: Raspberry-Pi BSP related with raspberry-pi/3/4b/co RT-Smart RT-Thread Smart related PR or issues

Comments

@unicornx
Copy link
Contributor

unicornx commented Dec 3, 2024

RT-Thread Version

master

Hardware Type/Architectures

bsp/raspberry-pi/raspi-dm2.0

Develop Toolchain

GCC

Describe the bug

CC build/kernel/components/drivers/sdio/dev_block.o
In file included from /home/u/ws/duo/rt-thread/components/drivers/include/rtdevice.h:43:0,
                 from /home/u/ws/duo/rt-thread/components/dfs/dfs_v2/include/dfs.h:26,
                 from /home/u/ws/duo/rt-thread/components/dfs/dfs_v2/include/dfs_fs.h:15,
                 from /home/u/ws/duo/rt-thread/components/drivers/include/drivers/blk.h:61,
                 from /home/u/ws/duo/rt-thread/components/drivers/sdio/dev_block.c:13:
/home/u/ws/duo/rt-thread/components/drivers/include/drivers/core/dm.h:41:44: error: 'MASTER_ID_SDIO' undeclared here (not in a function); did you mean 'ATTR_UID_SET'?
 #define RT_DM_IDA_INIT(id)  { .master_id = MASTER_ID_##id }
                                            ^
/home/u/ws/duo/rt-thread/components/drivers/sdio/dev_block.c:41:36: note: in expansion of macro 'RT_DM_IDA_INIT'
 static struct rt_dm_ida sdio_ida = RT_DM_IDA_INIT(SDIO);
                                    ^~~~~~~~~~~~~~
scons: *** [build/kernel/components/drivers/sdio/dev_block.o] Error 1
scons: building terminated because of errors.

Other additional context

No response

@unicornx unicornx added BSP: Raspberry-Pi BSP related with raspberry-pi/3/4b/co Arch: ARM/AArch64 BSP related with arm labels Dec 3, 2024
@unicornx unicornx changed the title [Bug] [Bug] failed to build bsp/raspberry-pi/raspi-dm2.0 Dec 3, 2024
@unicornx
Copy link
Contributor Author

unicornx commented Dec 3, 2024

然后在 components/drivers/include/drivers/core/dm.h 里加入

#include <drivers/core/master_id.h>

后可以编译过,但是跑起来会异常: qemu 是我自己做的版本,v9.1.2

$ /home/u/ws/test-qemu/install4arm64/bin/qemu-system-aarch64 -M raspi4b -nographic -kernel rtthread.bin -drive if=sd,file=sd.bin -dtb bcm2711-rpi-4-b.dtb -append 'printk.time=0 earlycon=pl011,0xfe201000 console=ttyAMA0 root=ram0 rw'
WARNING: Image format was not specified for 'sd.bin' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
qemu-system-aarch64: warning: bcm2711 dtc: brcm,bcm2711-pcie has been disabled!
qemu-system-aarch64: warning: bcm2711 dtc: brcm,bcm2711-rng200 has been disabled!
qemu-system-aarch64: warning: bcm2711 dtc: brcm,bcm2711-thermal has been disabled!
qemu-system-aarch64: warning: bcm2711 dtc: brcm,bcm2711-genet-v5 has been disabled!
[I/rtdm.ofw] Booting RT-Thread on physical CPU 0x0
[I/rtdm.ofw] Machine model: Raspberry Pi 4 Model B
[I/rtdm.ofw] Earlycon: pl011 at MMIO/PIO 0x00000000fe201000 (options '')
[I/rtdm.ofw] Memory node(1) ranges: (nil) - 0x000000003c000000
[E/rtdm.ofw] Allocating reserved memory in setup is not yet supported
[I/mm.memblock] System memory:
[I/mm.memblock]            [(nil), 0x000000003c000000]
[I/mm.memblock] Reserved memory:
[I/mm.memblock]            [(nil), 0x0000000000001000]
[I/mm.memblock]            [0x0000000000200000, 0x00000000003e4000]
[I/mm.memblock]            [0x00000000003e4000, 0x00000000043e4000]
[I/mm.memblock]            [0x00000000043e4000, 0x00000000045e4000]
[I/mm.memblock]            [0x00000000045e4000, 0x0000000004602000]
[I/mm.memblock] physical memory region [0x0000000000001000-0x0000000000200000] installed to system page
[I/mm.memblock] physical memory region [0x0000000004602000-0x000000003c000000] installed to system page
[W/mm.object] on_page_fault: page alloc failed
[W/mm.aspace] rt_varea_map_with_msg: failed on va 0xfffffdfff0291000 inside varea 0xffff0000003ae458(master-page-record)
[E/mm.page] _load_mpr_area: failed to load page
[I/mm.memblock] 935 MB memory installed to system page
[W/mm.ioremap] IOREMAP 0xfe201000 failed -255

@unicornx unicornx added the RT-Smart RT-Thread Smart related PR or issues label Dec 3, 2024
@zhuzhuzhus
Copy link
Contributor

相关pr:
#9742
#9740
#9736
这三个pr合入主线后可以正常build和运行

@unicornx
Copy link
Contributor Author

unicornx commented Dec 4, 2024

相关pr: #9742 #9740 #9736 这三个pr合入主线后可以正常build和运行

换个格式,显示状态更明显。等这三个 PR 合入后我再 close 这个 issue

@unicornx unicornx self-assigned this Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: ARM/AArch64 BSP related with arm BSP: Raspberry-Pi BSP related with raspberry-pi/3/4b/co RT-Smart RT-Thread Smart related PR or issues
Projects
None yet
Development

No branches or pull requests

2 participants