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

How to increase memory in a RISCV32 image? #678

Open
mikhailramalho opened this issue Apr 16, 2023 · 2 comments
Open

How to increase memory in a RISCV32 image? #678

mikhailramalho opened this issue Apr 16, 2023 · 2 comments

Comments

@mikhailramalho
Copy link

Hi folks,

I managed to get a RISCV32 image built, but qemu seems to ignore -m arguments when starting the image, and sets the memory size to 1G.

Is there any way I can increase it to 4G? I'm trying to build clang with swap, but it's quite slow.

@kraj
Copy link
Contributor

kraj commented Apr 16, 2023

Yes I have seen this too. thats the max size qemu can emulate for RV32 as it seems. Can you ask this question in qemu mailing list and see if this is expected ?

As far as clang is concerned, we can cross build clang to run on RV32. you can just add

IMAGE_INSTALL += "clang" to your image. but if you really want to build it natively on rv32 using qemu then it might be possible if we can allocate 8+ GB RAM to run qemu.

@mikhailramalho
Copy link
Author

mikhailramalho commented Apr 16, 2023

Yes I have seen this too. thats the max size qemu can emulate for RV32 as it seems. Can you ask this question in qemu mailing list and see if this is expected ?

Sure, I'll ask them.

As far as clang is concerned, we can cross build clang to run on RV32. you can just add

IMAGE_INSTALL += "clang" to your image.

I tried that, with the meta-clang layer, however, I'm getting weird crashes when trying to compile llvm's libc with the cross built clang :/ I'm not sure building it in qemu will fix that but I'll give it a try

but if you really want to build it natively on rv32 using qemu then it might be possible if we can allocate 8+ GB RAM to run qemu.

For 4G+ RAM we would need a PAE kernel, right? I created an 8G swap and clang's compilation doesn't seem to be taking more than 4G at any given time, so hopefully 4G RAM would be enough.

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