Bare Metal Code flashing on Cortex-A53 core

cancel
Showing results for 
Search instead for 
Did you mean: 

Bare Metal Code flashing on Cortex-A53 core

354 Views
Navaneethasubramanian
Contributor I

Hi,

I am working on OS porting for imx8m mini. I want to replace kernel with our OS. For that i need one bootloader instead of pre-build bootloader. I have taken Bare metal example project from ARM DS-5 examples. I referred the below link to create bootable image for imx processor. But there is no instruction to create bootable image for imx8mmini. Is below link is only to create bootable image for IMX8QM and IMX8QX? Is any other way to generate bootloader for imx8m mini?

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

 

Thanks in advance,

Navaneethan ST

Labels (1)
0 Kudos
8 Replies

331 Views
joanxie
NXP TechSupport
NXP TechSupport

you can refer to the enclosed file

0 Kudos

286 Views
Navaneethasubramanian
Contributor I

Hi,

I followed the steps which are given in the i.MX_Linux_User_Guide.pdf to create imx-boot image for imx8mm-evk. Once after creation of flash.bin, i am trying to load it into target using UUU tool.

Flash command to load u-boot and SPL:

sudo uuu -b spl iMX8M/flash.bin.

I am getting the build log as follow,

U-Boot SPL 2021.04 (Jan 03 2023 - 17:14:17 +0530)
Can't find PMIC:PCA9450
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
SEC0: RNG instantiated
Normal Boot
Trying to boot from USB SDP
SDP: initialize...
SDP: handle requests...
Downloading file of size 1276592 to 0x40400000... done
Jumping to header at 0x40400000
Header Tag is not an IMX image
Found header at 0x40428fa0
NOTICE: BL31: v2.4(release):lf-5.10.72-2.2.0-0-g5782363f9
NOTICE: BL31: Built : 15:35:24, Jan 3 2023


U-Boot 2021.04 (Jan 03 2023 - 17:14:17 +0530)

CPU: i.MX8MMQ rev1.0 1800 MHz (running at 1200 MHz)
CPU: Commercial temperature grade (0C to 95C) at 44C
Reset cause: POR
Model: NXP i.MX8MM EVK board
DRAM: 2 GiB
TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x52]
Power supply on USB2
TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x50]
MMC: FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... *** Warning - bad CRC, using default environment

[*]-Video Link 0adv7535_mipi2hdmi adv7535@3d: Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
mxs_video lcdif@32e00000: failed to get any video link display timings
probe video device failed, ret -22

[0] lcdif@32e00000, video
[1] mipi_dsi@32e10000, video_bridge
[2] adv7535@3d, panel
adv7535_mipi2hdmi adv7535@3d: Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
mxs_video lcdif@32e00000: failed to get any video link display timings
probe video device failed, ret -22
In: serial
Out: serial
Err: serial
SEC0: RNG instantiated

BuildInfo:
- ATF 5782363

switch to partitions #0, OK
mmc1 is current device
Detect USB boot. Will enter fastboot mode!
Net: eth0: ethernet@30be0000
Fastboot: Normal
Boot from USB for mfgtools
*** Warning - Use default environment for mfgtools
, using default environment

Run bootcmd_mfg: run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; else booti ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot 0; fi;
Hit any key to stop autoboot: 0

## Checking Image at 43800000 ...
Unknown image format!
Run fastboot ...

 

I want to load Baremetal startup code into imx8mmini-Cortex-a53 core. Before that i want to create imx-boot to understand the flow. Can anyone give suggestion and correct my mistake?

0 Kudos

270 Views
joanxie
NXP TechSupport
NXP TechSupport

what mistake do you mean? you have boot up from your uboot, do you mean the error message "Unknown image format!" ?

0 Kudos

257 Views
Navaneethasubramanian
Contributor I

Hi,

We are working on OS porting. we want to port our OS in cortext-a53 core of i.mx8m mini. To understand the boot flow i used the prebuild images. we don't want u-boot and kernel. From the powerup / reset, startup code of a53 core should run. I hope it is possible, but the procedure which i followed may be wrong. Can you please give the suggestion to proceed my further OS porting?

Thanks,

Navaneethan

0 Kudos

228 Views
joanxie
NXP TechSupport
NXP TechSupport

pls refer to below information

  • Baremetal framework source code:
0 Kudos

181 Views
Navaneethasubramanian
Contributor I

Hi, 

I have downloaded the Baremetal framework source code and followed the userguide to build the Sdcard.img using imx8mmevk_baremetal_defconfig. In this method Sdcard.img is generated but it includes uboot-spl, uboot and kernel rootfs. I need baremetal programing support for Cortex-A53 core without uboot-spl, uboot and kernel rootfs. We just want to initialize the Cortex-A53 core and on top of that want to run our own OS. Baremetal code for AARCH64, i have taken from ARM DS-5 examples. I hope that AARCH64 baremetal code can be replaced with uboot. Can you please guide me to run the bare metal application code on Cortex-A53 core?

Thanks,

Navaneethan

0 Kudos

124 Views
joanxie
NXP TechSupport
NXP TechSupport

for this question, you should check ARM community, hope this link is helpful for you

"https://community.arm.com/support-forums/f/architectures-and-processors-forum/49318/bare-metal-code-..."

0 Kudos

79 Views
Navaneethasubramanian
Contributor I

Hi,

In above link clear solution won't be given by ARM. Our main task to run the simple baremetal application on cortex-A53 core instead of Linux. How can i edit the u-boot code to start our baremetal application. Kindly help us to port our OS in cortex-A53 core.

Thanks, 

Navaneethan

0 Kudos