hexdump0815 / linux-mainline-on-arm-chromebooks

running linux mainline on arm chromebooks - for example: samsung xe303c12 and xe503c12 (snow and peach), acer c100, c101 and c201 (veyron speedy, minnie etc. and gru bob and kevin), medion s2013 and s2015 (veyron jaq, mighty etc.), acer cb5 311 (nyan big), lenovo n23, acer r13 (oak elm and hana), lenovo duet (kukui krane) and most probably many many more over time ...
144 stars 10 forks source link

My Linux kernel config file does not recognizes all memory available to the system,but only half. #17

Open Marietto2008 opened 10 months ago

Marietto2008 commented 10 months ago

Hello.

The project that I've been working on since 2 years is to enable KVM (with the support of libvirt and virt-manager) on a recent version of Linux and of its kernel on the old but still nice ARM Chromebook model xe303c12. My goal is to virtualize FreeBSD 13.2 for armV7. I've almost completed the project. At today I'm using Ubuntu 22.04 (but it works also with Devuan 5) ; KVM is enabled ; libvirt 9.7.0 and virt-manager are working great. And I've almost been able to virtualize FreeBSD. Almost because I've found a problem that I need to fix or the whole project will die. Ubuntu recognizes only 1 GB of memory free,but the ARM Chromebook has 2 GB of memory soldered to the mobo. So,1 GB of memory has been lost during the transition from the first project I tried to enable KVM with an old kernel (and ubuntu) version,that you can find here :

http://www.virtualopensystems.com/en/solutions/guides/kvm-on-chromebook/#setting-up-the-boot-medium

and my project,that uses a more recent kernel version (5.4) and ubuntu version (22.04). I think that when I have recompiled the kernel,I've lost some kernel entries that are enabled on the 3.13 kernel used by the developers at the Virtual Open System. Well,I have no idea about which entries my kernel config are missing.

I have checked the available memory for the OS giving the command :

# free -m

If I don't recover 1 GB of memory,I can't virtualize FreeBSD,because only 1 GB is a very small amount of memory to be able to run the host and the guest OS.

So,can you help me to find which kernel entries I should add to have all the 2 GB of memory available ?

Virtual Open System offers it's own kernel config file,that I have saved here :

https://pastebin.ubuntu.com/p/j4B54TChKD/

using their kernel config file I see that I have a total of 2 GB of memory available (I spend 400 mb to load Linux,so only 600 remains ; it's not good. In Fact I get a lot of qemu crashes), but If I use my config file the OS starts with only 1 GB.

sarnold commented 9 months ago

It sounds like you just need to enable LPAE in your kernel config:

$ zcat /proc/config.gz | grep LPAE
CONFIG_ARM_LPAE=y
Marietto2008 commented 9 months ago

nope. I found the answer for this question some days ago. This is the solution :

make zImage modules dtbs uImage LOADADDR=0x42004000

thanks anyway.

aneeshlingala commented 9 months ago

if you have found the solution, you can close the issue

Marietto2008 commented 9 months ago

I never close the issues,because there is always something that someone wants to add.