-
Notifications
You must be signed in to change notification settings - Fork 5.2k
bsp: cvitek: fix cv18xx_aarch64 mnt init blocking #9249
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
Conversation
commit 中应该是 aarch64,不是 arch64,请仔细检查一下 另外 commit 的描述不够准确。我再总结一下 #9243 的描述如下,供参考: 问题描述:目前 master 上的代码 duo 的 aarch64 大核无法启动进入控制台界面,只能打印出 RT flag 就 hold 住了。 问题分析: 解决方案:目前我们暂不打算修改 u-boot 的启动参数,采用的临时解决方案是在 board 初始化过程中创建一个 pseudo 的 /dev/mmcblk0p2 设备,等 mnt 完成后再撤销该 pseudo 设备。从而让内核启动顺利完成。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
见其他 comments。
@@ -1,5 +1,5 @@ | |||
/* | |||
* Copyright (c) 2006-2024, RT-Thread Development Team | |||
* Copyright (c) 2006-2024 RT-Thread Development Team |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为啥去掉逗号?我看了 RTT 的其他文件,都有逗号的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是用formatting脚本刷了一下,该更改可以取消
* mannually add the "/dev/mmcblk0p2" device to avoid | ||
* infinite loop when rootfs_mnt_init, after init will | ||
* unregiste the device. | ||
* This is a temporary workaround. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这句话放到开头去。另外开头加个 FIXME
FIXME: This is a temporary workaround.
balabala...
另外注意句子开头字母大写。
具体的注释,可以将 commit 信息的内容 copy 一份过来即可
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的 已修改
|
||
return 0; | ||
} | ||
INIT_FS_EXPORT(pseudo_mmcblk_remove); | ||
#endif /* RT_USING_OFW */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个修改对 !RT_USING_OFW 应该不需要的吧,我这里只是和你确认一下。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的
3c139fc
to
3853fbf
Compare
The aarch64 core of duo on the master cannot enter the console interface. It can only print the RT flag and hold it. Analysis: The latest commit that can work is ae6a328 ("Add psoc62, 61 config"). This phenomenon will occur after adding 754c59a ("[Feature] DFS mount auto by kernel parameters"). The specific reason is that when aarch bsp enables the device tree, the current u-boot will pass in bootargs, which contains "root=/dev/mmcblk0p2 rootwait rw", which means that the kernel is required to wait until the rootfs in /dev/mmcblk0p2 loaded successfully. However, the current aarch64 bsp default does not implement sdmmc device mounting, causing the kernel file system mounting module (rootfs_mnt_init() of components/drivers/core/mnt.c) to enter an infinite loop waiting. Solution: At present, we do not plan to modify the startup parameters of u-boot. The temporary solution adopted is to create a pseudo /dev/mmcblk0p2 device during the board initialization process, and then cancel the pseudo device after mnt is completed. This allows the kernel boot to be completed successfully. Signed-off-by: Shicheng Chu <[email protected]> Reviewed-by: Chen Wang <[email protected]>
3853fbf
to
3fd7a22
Compare
The aarch64 core of duo on the master cannot enter the
console interface. It can only print the RT flag and hold it.
Analysis: The latest commit that can work is ae6a328 ("Add
psoc62, 61 config"). This phenomenon will occur after adding
754c59a ("[Feature] DFS mount auto by kernel parameters").
The specific reason is that when aarch bsp enables the device
tree, the current u-boot will pass in bootargs, which contains
"root=/dev/mmcblk0p2 rootwait rw", which means that the
kernel is required to wait until the rootfs in /dev/mmcblk0p2
loaded successfully. However, the current aarch64 bsp default
does not implement sdmmc device mounting, causing the
kernel file system mounting module (rootfs_mnt_init() of
components/drivers/core/mnt.c) to enter an infinite loop waiting.
Solution: At present, we do not plan to modify the startup
parameters of u-boot. The temporary solution adopted is to
create a pseudo /dev/mmcblk0p2 device during the board
initialization process, and then cancel the pseudo device
after mnt is completed. This allows the kernel boot to be
completed successfully.
Reviewed-by: Chen Wang [email protected]
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
Fixed #9243
你的解决方案是什么 (what is your solution)
伪造一个 /dev/mmcblk0p2 设备, 初始化结束之后反注册这个设备.
请提供验证的bsp和config (provide the config and bsp)
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0
代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up