limit memory space on i.MX8mQ

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

limit memory space on i.MX8mQ

848 Views
kayiyeh
Contributor II

I have an i.MX8mQ EVK which have a LPDDR4 of 3GB. I want to verify if my application can run under 2GB or even 1GB memory and don't want to change the board components at this moment. Is that possible to change some setup and let the kernel just see 2GB memory space?

Labels (2)
0 Kudos
7 Replies

652 Views
igorpadykov
NXP Employee
NXP Employee

in uboot change parameter #define PHYS_SDRAM_SIZE

in uboot/include/configs/imx8mq_evk.h

Best regards
igor

0 Kudos

652 Views
kayiyeh
Contributor II

Dear Igor,

Sorry I am new to the embedded Linux. I can’t find the file to make the change. Can you tell me where the repository is to get the source code?

Thanks a lot.

Regards,

Ka-Yi

0 Kudos

652 Views
igorpadykov
NXP Employee
NXP Employee
0 Kudos

652 Views
kayiyeh
Contributor II

Dear Igor,

I do find the file you memtioned and edit the file. However, I go back to bitbake the image and the bitbake tells me nothing to do and no new image generated. would you please tell me how to bake a customized image?

BR

KY

0 Kudos

652 Views
igorpadykov
NXP Employee
NXP Employee
0 Kudos

652 Views
gary_bisson
Senior Contributor III

Hi,

You can add 'mem=2G' or 'mem=1G' to your kernel boot arguments (passed by U-Boot) as explained in the kernel documentation:

linux/kernel-parameters.txt at master · torvalds/linux · GitHub 

Regards,

Gary

0 Kudos

652 Views
kayiyeh
Contributor II

Dear Gary,

Thank you. However, I tried to set the command in uboot then type “saveenv”, and use “printenv” to make sure, then type “boot” to boot.

Unfortunately, after finish booting, I found the system still has 3G memory. Can you tell me what’s wrong?

I read the document you refer and it said there is another command “memmap” may need to set. I don’t know how to set that though. Would you please teach me?

Regards,

Ka-Yi

0 Kudos