Build bootable imx8qx-mek image

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Build bootable imx8qx-mek image

跳至解决方案
3,432 次查看
mod42
Contributor III

I currently try to build a bootable image for the imx8qxp-mek in our custom build environment. I think I have all components (SECO, SCFW, u-boot) in the right version. After creating the image with imxmkimage I get the following output on the u-boot console:

U-Boot SPL 2020.04 (Oct 13 2020 - 16:20:24 +0200)
Normal Boot
WDT: Not found!
Trying to boot from MMC2_2
Load image from MMC/SD 0x66800

And then booting stops. So, obviously u-boot SPL is started correctly but then the main u-boot doesn't come up. Any ideas on how I can debug this behavior? I attached the (zipped) binary I am currently flashing to the SD-card (no filesystem at the moment) at offset 0. I just wan't to come to the u-boot prompt to boot a kernel over tftp.

标签 (1)
0 项奖励
1 解答
3,277 次查看
mod42
Contributor III

Answer to myself:

I missed the parameter PLAT=imx8qx when building ATF from source. After adding this I got a working image from my u-boot build. So, it was a typical PEBCAC🤦

在原帖中查看解决方案

9 回复数
3,387 次查看
mod42
Contributor III

Hi Igor

There is no tag named "imx_v2020.04_5.4.24_2.1.0" in https://source.codeaurora.org/external/imx/uboot-imx

Changing SECO and SCFW to the versions mentioned in the release notes doesn't change the behavior. I also tried the current u-boot mainline 2020.10 and see the same result 

U-Boot SPL 2020.04 (Oct 13 2020 - 16:20:24 +0200)
Normal Boot
WDT: Not found!
Trying to boot from MMC2_2
Load image from MMC/SD 0x66800

I am sure I miss anything but its not clear to me what. The SD card supplied with the board does boot but seems to use an older u.boot version:

U-Boot SPL 2018.03-4.14.98-2.3.0+g0e207921e9 (Dec 19 2019 - 02:35:38 +0000)
Normal Boot
Trying to boot from MMC2_2
Load image from MMC/SD 0x5b400
U

U-Boot 2018.03-4.14.98-2.3.0+g0e207921e9 (Dec 19 2019 - 02:35:38 +0000)

CPU: Freescale i.MX8QXP revC A35 at 1200 MHz at 27C
Model: Freescale i.MX8QXP MEK
Board: iMX8QXP MEK
Boot: SD1
DRAM: 2.8 GiB
VService: Connection is ok on MU mu@5d230000
TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x50]
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... Run CMD11 1.8V switch

0 项奖励
3,377 次查看
igorpadykov
NXP Employee
NXP Employee

Hi mod42

 

from log " i.MX8QXP revC" seems this is rev.C processor.

Had you added "R=C0" flag for building scfw as described in

sect.3.4 Compiling the Code Porting Guide (sc_fw_port.pdf) included in

SCFW Porting Kit​

and below p.10 building linux tutorial

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/MX8X-4-19-35-ga-BootLoader-V6-20200217-c...

 

Best regards
igor

0 项奖励
3,366 次查看
mod42
Contributor III

Hi

I tried that but it get a build error than:

make: *** No rule to make target 'build_mx8qx_c0/devices/startup.o', needed by 'build_mx8qx_c0/scfw_tcm.elf'. Stop.

I also tried to flash an SD card from the NXP provided binary distribution c:\Users\MWeisser\Downloads\L5.4.47-2.2.0_images_MX8QXPC0MEK.zip using uuu. The SD card is successfully flashed but the output is still the same on the serial console. So, I can now exclude any build issues on our side as we use all the files as they are supplied by NXP. 

The board runs fine with the SD card that came with the board. So, I don't think the board has a problem. We only use the mek cpu board without any base or extension board. Any help will be greatly appreciated.

Regards

0 项奖励
3,361 次查看
igorpadykov
NXP Employee
NXP Employee

could you try with brand new sd card and with two options

given in i.MX Linux User’s Guide​

- sect.4.3.2 Copying the full SD card image,
- sect.4.3.4 Copying a bootloader image

 

Best regards
igor

0 项奖励
3,287 次查看
mod42
Contributor III

Hi Igor

Sorry for answering so late. Flashing the file imx-image-full-imx8qxpc0mek.wic to the SD card let the board boot. So, there seems to be something wrong in my setup. As I now have a working sample I will dig through my stuff and will report back here if I found something

 

 

0 项奖励
3,278 次查看
mod42
Contributor III

Answer to myself:

I missed the parameter PLAT=imx8qx when building ATF from source. After adding this I got a working image from my u-boot build. So, it was a typical PEBCAC🤦

3,423 次查看
igorpadykov
NXP Employee
NXP Employee

Hi mod42

 

had board passed ddr test and necessary image modifications were performed according to

ddr test documentation

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-8-8X-Family-DDR-Tools-Release/ta-p/...

Regarding compatibilty of various software components revisions, they are provided in Release Notes

for each BSP version on link

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

For i.MX8QXP SCFW it is necessary to point revision as described in

System Controller Firmware Porting Guide sect.3.4 Compiling the Code : R=<srev> silicon revision

included in SCFW Porting Kit​ 

 

Best regards
igor

0 项奖励
3,419 次查看
mod42
Contributor III

Hi Igor

Currently we are on the NXP eval board for iMX8QXP (MEK) and only try to rebuild all the stuff in our environment to have a starting point when our own hardware is ready. 

We are using these components:

imx-scfw-porting-kit-1.6.0.tar.gz
imx-seco-3.7.1.bin
  

Here is the output of the SCFW with monitor compiled in.

Hello from SCU (Build 4894, Commit 56682d58, Sep 25 2020 22:42:45)

DDR frequency = 1200000000
ROM boot time = 178394 usec
Boot time = 19992 usec
Banner = 9 usec
Init = 8622 usec
Config = 2570 usec
DDR = 2674 usec
SConfig = 360 usec
Prep = 3466 usec

*** Debug Monitor ***

>$ info
SCFW Version = Build 4894, Commit 56682d58
API Version = 1.23
Chip/JTAG ID = 0x0042
PMIC 0 ID = 0x4031
UID[31:0] = 0x829666C2
UID[63:32] = 0x151E200E
ROM pch chksum = 0x00000000
Boot device = SDHC_1
Boot type = primary
Boot container = 1
Boot mode pads = 0x03

>$ seco info
SECO FW Version = Version 3.7.1, Commit 4f5b6919
ADM Lifecycle = 32
SNVS State = 15
Lifecycle = 0x0020
Monotonic = 0x0000
UID[31:0] = 0x829666C2
UID[63:32] = 0x151E200E

And here what we see from uboot

U-Boot SPL 2020.04 (Oct 13 2020 - 16:20:24 +0200)
Normal Boot
WDT: Not found!
Trying to boot from MMC2_2
Load image from MMC/SD 0x66800

0 项奖励
3,411 次查看
igorpadykov
NXP Employee
NXP Employee

Hi mod42

 

according to Table 3. BSP and Multimedia standard packages

attached L5.4.24_2.1.0 Release Notes versions are different.

What is full part processor number used in the case. Could you also verify

that uboot used in the case is "imx_v2020.04_5.4.24_2.1.0" :

https://source.codeaurora.org/external/imx/uboot-imx/tree/?h=imx_v2020.04_5.4.24_2.1.0

Short description of creating image:

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8-Boot-process-and-creating-a-bootab...

 

Best regards
igor

0 项奖励