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

我修改了内核里的SYS_dev为50(原来为23),结果内核启动不了了。 #12

Closed
leo-frank opened this issue May 1, 2021 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@leo-frank
Copy link

我修改了内核里的SYS_dev为50(原来为23),结果内核启动不了了。
image

我觉得可能是内核哪里隐含的调用了sys_dev。我进行了一些寻找,但是没有找到,我也尝试了在initcode中寻找,也没有找到。
请问这是怎么回事?谢谢!

@retrhelo
Copy link
Contributor

retrhelo commented May 1, 2021

可能是不是sh程序没有更新?在更改了syscall的编号后,需要重新编译用户程序并生成文件镜像

@retrhelo retrhelo added the help wanted Extra attention is needed label May 1, 2021
@AtomHeartCoder
Copy link
Contributor

在init.c和sh.c有通过dev函数调用sys_dev,这个系统调用只是用来将console设备绑定到0,1,2三个文件描述符。图中的情况应该是shell不能正确地从console设备读取从而导致退出,而init进程则会重启shell,导致死循环。您需要将init和sh重新编译并存入文件镜像或SD卡中,如 @retrhelo 所描述。

@SKTT1Ryze SKTT1Ryze pinned this issue May 7, 2021
@leo-frank
Copy link
Author

感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants