How to bootup iMX8 with 1GB RAM

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

How to bootup iMX8 with 1GB RAM

Jump to solution
6,978 Views
killro89140
Contributor II

Hi All,

I was testing different kinds of DRAM on official evk board.

I got all spec of DRAM capacity including 1GB to 4 GB.

The thing I did is changing the DRAM size from include/config/imx8mq_evk.h as below.

Screenshot from 2019-03-26 16-27-01.png

with this setting , 2GB and 3GB worked well,

and I fixed 4GB issue by according to the patch NXP released.

However now I'm facing to the issue when boot up with 1GB RAM.

uboot worked ok, but when I loading thee kernel, it would stuck with kernel panic.

My guessed is that uboot load kernel at the address 0x4030000 which is over 1GB addressing,

and causing the panic. But just guessing...

Does anyone know hoe to setup or where should I changed for 1GB RAM?

Thanks!

Best regards,

Edwin

0 Kudos
1 Solution
5,773 Views
Niebel-TQ
Contributor IV

you have to reduce the cma settings in device tree and the RAM size setting in U-Boot. U-Boot will patch the RAM size into devicetree before starting linux.

Hope this helps

Markus

View solution in original post

7 Replies
5,773 Views
Lorac
Contributor III

I got the same issue, but to solve it, you must remove optee option in yocto recipes.

regards.

0 Kudos
5,773 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jun-feng(Edwin)

one can try to rebuild images from scratch using guidelines in

Chapter 4 How to bring up a new MX8M board MSCALE_DDR_Tool_User_Guide.pdf

included in ddr test package

i.MX8 MSCALE SERIES DDR Tool Release (V2.10) 

Also cma size may be reduced.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
5,773 Views
killro89140
Contributor II

Hi Igor,

I do fixed the bank, row, column .etc for our DRAM, but still not work.

Beside, I'm using official 3GB micron DRAM for different size of boot up, but still.

Also, using bigger size and setting to boot up lower one should not be a problem

I know there is some board in the market, such google's board with iMX8mq using 1GB RAM only.

And the setting of putting kernel from 1GB is something like Android stuff, 

I'm not sure the uboot mixed with android things or something, could you advise?

I already followed the user guide, and read other related documents, but couldn't figure it out.

Could you kindly provide an example setting or patch for 1GB boot up?

Thanks!

Best regards,

Edwin

0 Kudos
5,773 Views
igorpadykov
NXP Employee
NXP Employee

Hi Edwin

one can try to run small image "core-image-minimal" described

in Yocto Guide from linux documentation on

i.MX Software | NXP 

Best regards
igor

0 Kudos
5,773 Views
Niebel-TQ
Contributor IV

modify the reserver memory node in device tree and reduce CMA settings for your setup. This should prevent the oom error you see. Not some features at high resolution may not work wit h1 GB rAM

5,773 Views
killro89140
Contributor II

Hi Markus,

Is the CMA setting you mentioned refer to this setting in kernel .config?

If so...do you have any idea about how big should I reduce it?

#
# Default contiguous memory area size:
#
CONFIG_CMA_SIZE_MBYTES=320
CONFIG_CMA_SIZE_SEL_MBYTES=y

and, I'm looking at fsl-imx8mq.dtsi  which having this section.

Is this one the reserve address have to be changed?

memory@40000000 {
      device_type = "memory";
      reg = <0x00000000 0x40000000 0 0xc0000000>;
   };

resmem: reserved-memory {
   #address-cells = <2>;
   #size-cells = <2>;
   ranges;

   /* global autoconfigured region for contiguous allocations */
   linux,cma {
      compatible = "shared-dma-pool";
      reusable;
      size = <0 0x3c000000>;
      alloc-ranges = <0 0x40000000 0 0x40000000>;
      linux,cma-default;
   };

rpmsg_reserved: rpmsg@0xb8000000 {
      no-map;
      reg = <0 0xb8000000 0 0x400000>;
   };
};

Thanks for replying.

0 Kudos
5,774 Views
Niebel-TQ
Contributor IV

you have to reduce the cma settings in device tree and the RAM size setting in U-Boot. U-Boot will patch the RAM size into devicetree before starting linux.

Hope this helps

Markus