linux kernel loading stucks

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

linux kernel loading stucks

ソリューションへジャンプ
1,426件の閲覧回数
0xEC
Contributor IV

hi everyone,

I have custom board derived from s32g274a-rdb2 board and working with embedded linux compiled by yocto build env. in custom board i have 2GB LPDDR4 RAM instead of 4GB LPDDR4 in RDB2 board, so i changed DDR RAM initialization code in TF-A source code taken from S32DS DDR tool and also commented out PHYS_SDRAM2 which is second 2GB ram region in 4gb version in u-boot source code. Now ATF and u-boot works fine but while u-boot trying to start kernel it stucks at the point where i guess the DMA initialization. i added starting log below. 

0xEC_0-1691742466983.png

 

Do you have any idea about what is wrong with my yocto build?

best,

0 件の賞賛
返信
1 解決策
1,372件の閲覧回数
0xEC
Contributor IV
hi @MayanksPatel,
Yes i also open ticket from nxp support but not received any reply, by the way i could solve the problem by changing text and data start address of u-boot, thanks we can close this ticket and 557217 also.
best,

元の投稿で解決策を見る

0 件の賞賛
返信
6 返答(返信)
1,133件の閲覧回数
swhite39
Contributor II

Can you share the solution to this issue? I am having similar issues

0 件の賞賛
返信
1,126件の閲覧回数
0xEC
Contributor IV

hi swhite,

if you change DDR size because i had this issue and reason was changing DDR size from 4GB to 2GB, you should change ram start address in in u-boot source code as follows:

config SYS_TEXT_BASE
hex "Text Base" if CUSTOM_SYS_TEXT_BASE
- default 0xffaa0000
+ default 0xefaa0000

config SYS_LOAD_ADDR
hex "Address in memory to use by default"
@@ -33,7 +33,7 @@ config CUSTOM_SYS_DATA_BASE

config SYS_DATA_BASE
hex "Data Base" if CUSTOM_SYS_DATA_BASE
- default 0xffa00000
+ default 0xefa00000
help
U-Boot data base address in DDR.

this changes are performed in Kconfig file you can do it in menuconfig this is official way, also i commented out sram define in s32-cc.h in uboot as follows:

#define PHYS_SDRAM_1 0x80000000UL
#define PHYS_SDRAM_1_SIZE (SZ_2G)
-#define PHYS_SDRAM_2 0x880000000UL
-#define PHYS_SDRAM_2_SIZE (SZ_2G)
+//#define PHYS_SDRAM_2 0x880000000UL
+//#define PHYS_SDRAM_2_SIZE (SZ_2G)

last change that i performed which is in atf source code, in s32_platform_def.h file as follows:

/* Top of the first 2GB bank of physical memory. */
#ifndef S32_PLATFORM_DDR0_END
-#define S32_DDR0_END 0xffffffff
+#define S32_DDR0_END 0xefffffff
#else
#define S32_DDR0_END S32_PLATFORM_DDR0_END
#endif

if you have same issue, these changes must solve the problem.

take it easy,

0 件の賞賛
返信
1,118件の閲覧回数
swhite39
Contributor II

Thank you so much for responding! Very much appreciated!!

0 件の賞賛
返信
1,100件の閲覧回数
0xEC
Contributor IV

hi @swhite39 

sorry i forgot the mentioned about ddr initialization code that you must generate from S32DS according to your new DDR ram specs. 

you must use s32ds DDR Tool and generate ddr_init sources from there and you must change Makefile in TF-A by adding CUSTOM_DDR_DRV variable and set it to path of ddr_init source code that you generate from S32DS. 

no need to change anything in linux kernel itself about DDR size or something because before linux kernel is loaded, all DDR related tasks must done by U-boot and TF-A. 

0 件の賞賛
返信
1,383件の閲覧回数
MayanksPatel
NXP Employee
NXP Employee

Hi @0xEC,

Thank you for reaching out to us.

We have received your ticket and this is the duplicate of another ticket raised by you.

We will work on that and provide an update to you on ticket#577217.

Hence, Closing this ticket.

 

Thanks,

Mayank S Patel

0 件の賞賛
返信
1,373件の閲覧回数
0xEC
Contributor IV
hi @MayanksPatel,
Yes i also open ticket from nxp support but not received any reply, by the way i could solve the problem by changing text and data start address of u-boot, thanks we can close this ticket and 557217 also.
best,
0 件の賞賛
返信