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

About the Compilation and Execution of linux.bin #38

Open
figuresudo opened this issue Sep 5, 2024 · 3 comments
Open

About the Compilation and Execution of linux.bin #38

figuresudo opened this issue Sep 5, 2024 · 3 comments

Comments

@figuresudo
Copy link

We are currently following this tutorial (https://docs.xiangshan.cc/zh-cn/latest/tools/opensbi-kernel-for-xs/) to compile linux.bin. However, when using the emu_defconfig configuration, the output's scale is about ten times larger compared to the linux.bin available in this repository. Specifically, by the time it reaches the paging init instruction, the instruction count has already exceeded tens of millions.

Could you please advise if this behavior is expected or if there might be an issue with our configuration?

@cebarobot
Copy link
Member

I think that is expected. The linux in ready-to-run is just a 'minimal' linux workload with a kernel
that disables tons of feature and only runs an simple application software on it.

It's very possible that the defualt config worklaods is much bigger than minimal ones.

@figuresudo
Copy link
Author

I understand. However, in the tutorial, the required riscv-linux repository (https://github.com/OpenXiangShan/riscv-linux) only provides the default config. Could you please provide the config file used for compiling in this repository?

@cebarobot
Copy link
Member

This legacy tutorial (linux-kernel-for-xs) did use OpenXiangShan/riscv-linux, but in our new tutorial (opensbi-kernel-for-xs) turns to use mainline kernel.

We have not publish our minimal config officially yet. You could try this config, without any guarantee:

minimal_defconfig.txt

@cebarobot cebarobot mentioned this issue Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants