How to fast boot using falcon mode in imx8m-mini evk?

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

How to fast boot using falcon mode in imx8m-mini evk?

Jump to solution
921 Views
vivek338
Contributor IV

Hi,

I am working on fast boot to reduce boot time to 3-4 seconds. After following AN14093, board boots and stuck in uboot. Also bootloader not able to load dtb and kernel. Please guide me to apply falcon mode.

Please help!

Labels (1)
0 Kudos
1 Solution
779 Views
elena_popa
NXP Employee
NXP Employee

Hi @vivek338 

Great, you managed to boot in falcon mode and reach the Linux console.

Adding CONFIG_SPL_FS_LOAD_PAYLOAD_NAME in the defconfig file is not necessary. If you check the .config file (used during U-Boot compilation) you will see that this variable is already set correctly.

Those errors from syslogd and other failures may be due to broken rootfs partition. Are you using the prebuild image: imx-image-full-imx8mmevk.wic? You can find it here: https://www.nxp.com/design/design-center/software/embedded-software/i-mx-software/embedded-linux-for... (Download the 6.1.22_2.0.0 version).

My suggestion is to start with this image and redo the steps (put the necessary files on the SD card boot partition, overwrite the U-Boot using dd command).

Thank you,

Elena 

View solution in original post

0 Kudos
9 Replies
877 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport
0 Kudos
841 Views
vivek338
Contributor IV

Hi @Zhiming_Liu !

Thanks for replying!!

The document link (AN14113) you shared is showing modification for falcon mode is only for imx8m-nano and imx93.

Also the patch files are available only for imx8mn and imx93. I am using imx8mm(imx8m-mini), please guide me on falcon mode for imx8mm(imx8m-mini).

Please help!

 

 

0 Kudos
829 Views
elena_popa
NXP Employee
NXP Employee

Hi @vivek338 

Following the AN14093, which method did you use to prepare the device tree? (Step 11 - Method 1 or Method 2). This is a mandatory step, make sure you didn't miss it.

1. Make sure you copied the prepared device tree to the SD boot partition.

2. Make sure the device tree name matches the name set in CONFIG_SPL_FS_LOAD_ARGS_NAME.

3. Did you generate the kernel image: Image.itb and copy it to the SD boot partition?

Also, a log could be helpful for us, to see exactly what errors you get.

 

Thanks,

Elena

0 Kudos
817 Views
vivek338
Contributor IV

Hi @elena_popa ,

Thanks for replying!!!

I am using method 2, also "CONFIG_SPL_FS_LOAD_PAYLOAD_NAME with u-boot.itb" missing in <board>_falcon_defconfig. I have doubt on selection of folder in imx-mkimage, is which folder to select for imx8mm-evk from iMX8M or iMX8QM. Resulted console output below.

u-boot=>
u-boot=>
u-boot=> boot
Working FDT set to 43000000
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
starting USB...
Bus usb@32e40000: Port not available.
USB is stopped. Please issue 'usb start' first.
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Working FDT set to 43000000
Error: Cannot initialize UEFI sub-system, r = 3
switch to partitions #0, OK
mmc2(part 0) is current device
Scanning mmc 2:1...
43906 bytes read in 4 ms (10.5 MiB/s)
Working FDT set to 43000000
Error: Cannot initialize UEFI sub-system, r = 3
Running BSP bootcmd ...
switch to partitions #0, OK
mmc1 is current device
Failed to load 'boot.scr'
31924736 bytes read in 336 ms (90.6 MiB/s)
Booting from mmc ...
Failed to load 'imx8mm-evk.dtb'
WARN: Cannot load the DT
u-boot=>

 

If possible please provide complete steps for implementation of falcon mode in imx8mmini-evk with rootfs.

It will be really helpful.

Please help!!

 

 

0 Kudos
811 Views
elena_popa
NXP Employee
NXP Employee

Hi @vivek338 

The <board>_falcon_defconfig file is used to overwrite some configurations from the main configuration file .config. When enabling SPL_FS_FAT, the CONFIG_SPL_FS_LOAD_PAYLOAD_NAME has the default value: u-boot.itb, so no need to overwrite this. You can take a look over the .config file and check that the CONFIG_SPL_FS_LOAD_PAYLOAD_NAME has the correct value.

Regarding the selection of the folder in imx-mkimage, for i.MX 8M Mini, i.MX 8M Nano or i.MX 8M Plus, you should use the i.MX8M folder.

According to your log, you are not in Falcon Mode, since you reached the U-Boot console. In Falcon Mode the Kernel is started right after SPL. How did you enter in U-Boot, by pressing the 'C' key? If you want to boot in Falcon Mode, you don't need to press any key.

Please make sure you have u-boot.itb, Image.itb and imx8mm-evk-falcon.dtb on the boot partition of the SD card.

Did you use the prebuild image imx-image-full-imx8mmevk.wic? If yes, the imx8mm-evk.dtb file should be in the boot partition of the SD card.

Can you tell me the steps you've done so far? Just to make sure you didn't skip any of them. There are quite a few steps and it's very easy to miss one.

Thank you,

Elena

0 Kudos
804 Views
vivek338
Contributor IV

Hi @elena_popa ,

 

Thanks for replying!!

 

I am following document AN14093 step by step. I only skip section 8.2 kernel optimization.

"CONFIG_SPL_FS_LOAD_PAYLOAD_NAME"   variable missing in "imx8mm_evk_falcon_defconfig".

So I add this variable in "imx8mm_evk_falcon_defconfig" with value "u-boot.itb".

• I used Method 2: By letting U-Boot to do the fixups and save the resulted device tree. 

Now getting below console output:--

 

 

U-Boot SPL 2023.04-00001-g2502a84085-dirty (Jan 24 2024 - 10:44:09 +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 MMC1
NOTICE: Do not release JR0 to NS as it can be used by HAB
NOTICE: BL31: v2.8(release):automotive-13.0.0_2.1.0-1-gab9855070
NOTICE: BL31: Built : 17:07:52, Jan 23 2024
[ 0.192847] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to set pll ref clock rate
[ 0.200261] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -22
[ 0.207935] imx-drm 32c00000.bus:display-subsystem: failed to bind 32e10000.mipi_dsi (ops imx_sec_dsim_ops): -22
[ 0.225746] of_reserved_mem_lookup() returned NULL
[ 0.311831] nxp-pca9450 0-0025: Read device id error
[ 0.601274] OF: graph: no port node found in /soc@0/bus@30800000/i2c@30a30000/tcpc@50/connector
[ 0.610023] OF: graph: no port node found in /soc@0/bus@30800000/i2c@30a30000/tcpc@50/connector
[ 0.618752] OF: graph: no port node found in /soc@0/bus@30800000/i2c@30a30000/tcpc@50/connector
[ 1.551798] imx6q-pcie 33800000.pcie: Phy link never came up
[ 2.561205] imx6q-pcie 33800000.pcie: Phy link never came up
[FAILED] Failed to start Network Time Synchronization.
[FAILED] Failed to start Network Time Synchronization.
[FAILED] Failed to start Network Time Synchronization.
[FAILED] Failed to start Network Time Synchronization.
[FAILED] Failed to start Console System Startup Logging.
[FAILED] Failed to start User Login Management.
[FAILED] Failed to start Network Time Synchronization.
syslogd[416]: Error opening log file: /var/log/auth.log: No such file or directory
syslogd[416]: Error opening log file: /var/log/syslog: No such file or directory
syslogd[416]: Error opening log file: /var/log/kern.log: No such file or directory
syslogd[416]: Error opening log file: /var/log/mail.log: No such file or directory
syslogd[416]: Error opening log file: /var/log/mail.err: No such file or directory
syslogd[416]: Error opening log file: /var/log/messages: No such file or directory
[FAILED] Failed to start Network Time Synchronization.
[ 5.662946] audit: type=1334 audit(1677836960.688:6): prog-id=9 op=LOAD
[ 5.669991] audit: type=1334 audit(1677836960.696:7): prog-id=10 op=LOAD
[FAILED] Failed to s[ 5.680175] audit: type=1334 audit(1677836960.704:8): prog-id=7 op=UNLOAD
tart User Login Management.
[ 5.692608] audit: type=1334 audit(1677836960.704:9): prog-id=8 op=UNLOAD
[ 5.730710] audit: type=1334 audit(1677836960.756:10): prog-id=11 op=LOAD
[ 5.738847] audit: type=1334 audit(1677836960.764:11): prog-id=12 op=LOAD
[FAILED] Failed to s[ 5.749017] audit: type=1334 audit(1677836960.772:12): prog-id=9 op=UNLOAD
tart User Login Manageme[ 5.761090] audit: type=1334 audit(1677836960.772:13): prog-id=10 op=UNLOAD
nt.
[FAILED] Failed to start User Login Management.
[FAILED] Failed to start User Login Management.
[FAILED] Failed to start User Login Management.
[ 6.344777] Qualcomm Atheros AR8031/AR8033 30be0000.ethernet-1:00: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:00, irq=POLL)
[ 6.767729] EXT4-fs (mmcblk2p2): mounted filesystem with ordered data mode. Quota mode: none.
[ 7.228063] random: crng init done
[FAILED] Failed to start Hostname Service.
[FAILED] Failed to start User Login Management.
[ 10.723329] platform cpufreq-dt: deferred probe pending
[ 10.728607] platform sound-bt-sco: deferred probe pending
[ 10.734041] platform sound-wm8524: deferred probe pending

NXP i.MX Release Distro 6.1-mickledore imx8mmevk ttymxc1

imx8mmevk login:

 

Looks like driver are missing or not loaded.

Please help!!!!!

0 Kudos
780 Views
elena_popa
NXP Employee
NXP Employee

Hi @vivek338 

Great, you managed to boot in falcon mode and reach the Linux console.

Adding CONFIG_SPL_FS_LOAD_PAYLOAD_NAME in the defconfig file is not necessary. If you check the .config file (used during U-Boot compilation) you will see that this variable is already set correctly.

Those errors from syslogd and other failures may be due to broken rootfs partition. Are you using the prebuild image: imx-image-full-imx8mmevk.wic? You can find it here: https://www.nxp.com/design/design-center/software/embedded-software/i-mx-software/embedded-linux-for... (Download the 6.1.22_2.0.0 version).

My suggestion is to start with this image and redo the steps (put the necessary files on the SD card boot partition, overwrite the U-Boot using dd command).

Thank you,

Elena 

0 Kudos
733 Views
vivek338
Contributor IV

Hi @elena_popa ,

Thanks you so much for your help!

I am now able to boot at 5 sec. It takes 2 sec before loading kernel. Also if I want to run gstreamer before systemd for faster application run but it shows error XDG_RUNTIME_DIR_NOT_SET.

Here is the console log without gstreamer:-

 

U-Boot SPL 2023.04-00001-g2502a84085-dirty (Jan 24 2024 - 10:44:09 +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 MMC1
NOTICE: Do not release JR0 to NS as it can be used by HAB
NOTICE: BL31: v2.8(release):automotive-13.0.0_2.1.0-1-gab9855070
NOTICE: BL31: Built : 17:07:52, Jan 23 2024                                            // till here it takes >=2 seconds
[ 0.223863] No BMan portals available!
[ 0.224357] No QMan portals available!
[ 0.307942] imx_sec_dsim_drv 32e10000.mipi_dsi: Failed to attach bridge: 32e10000.mipi_dsi
[ 0.316221] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -517
[ 0.324001] imx-drm soc@0:bus@32c00000:display-subsystem: failed to bind 32e10000.mipi_dsi (ops imx_sec_dsim_ops): -517
[ 0.425776] caam_jr 30901000.jr: failed to flush job ring 0
[ 0.454180] caam-snvs 30370000.caam-snvs: can't get snvs clock
[ 0.537067] wm8524-codec audio-codec: Failed to get mute line: -517
[ 0.585537] fsl-micfil-dai 30080000.micfil: GET IRQ: 16
[ 0.590789] fsl-micfil-dai 30080000.micfil: GET IRQ: 17
[ 0.596030] fsl-micfil-dai 30080000.micfil: GET IRQ: 18
[ 0.601272] fsl-micfil-dai 30080000.micfil: GET IRQ: 19
[ 0.616409] imx-ak4458 sound-ak4458: ASoC: failed to init link ak4458: -517
[ 0.623490] imx-ak4458 sound-ak4458: snd_soc_register_card failed (-517)
[ 0.632109] debugfs: Directory '30080000.micfil' with parent 'imx-audio-micfil' already present!
[ 0.733309] ak4458 2-0010: Failed to request supplies: -517
[ 0.739227] ak4458 2-0012: Failed to request supplies: -517
[ 0.745092] ak5558 2-0013: Failed to request supplies: -517
[ 0.750982] ak4458 2-0011: Failed to request supplies: -517
[ 0.767057] ov5640_mipi 2-003c: Read reg error: reg=300a
[ 1.165970] debugfs: Directory '30020000.sai' with parent 'bt-sco-audio' already present!
[ 1.174372] debugfs: File 'Playback' in directory 'dapm' already present!
[ 1.181185] debugfs: File 'Capture' in directory 'dapm' already present!
[ 1.190737] debugfs: Directory '30030000.sai' with parent 'wm8524-audio' already present!
[ 1.213038] imx-ak4458 sound-ak4458: ASoC: failed to init link ak4458: -517
[ 1.220039] imx-ak4458 sound-ak4458: snd_soc_register_card failed (-517)
[ 1.582834] ak4458 2-0010: ASoC: failed to probe component -6
[ 1.588640] imx-ak4458 sound-ak4458: ASoC: failed to instantiate card -6
[ 1.598530] imx-ak4458 sound-ak4458: snd_soc_register_card failed (-6)
[ 1.867809] imx6q-pcie 33800000.pcie: failed to initialize host
[ 1.873750] imx6q-pcie 33800000.pcie: unable to add pcie port.
[ 4.656233] hifDeviceInserted: Dumping clocks (50000000,400000000)
[ 4.681009] AR6000: Set async interrupt delay clock as 2.

NXP i.MX Release Distro 5.4-zeus imx8mmevk ttymxc1

imx8mmevk login: root (automatic login)

 

Thanks for your support !!

Please help !!!!

0 Kudos
813 Views
vivek338
Contributor IV

Hi,

After adding imx8mm-evk.dtb getting below output on console.

 

U-Boot SPL 2023.04-00001-g2502a84085-dirty (Jan 24 2024 - 10:44:09 +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 MMC1
NOTICE: Do not release JR0 to NS as it can be used by HAB
NOTICE: BL31: v2.8(release):automotive-13.0.0_2.1.0-1-gab9855070
NOTICE: BL31: Built : 17:07:52, Jan 23 2024
[ 0.193604] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to set pll ref clock rate
[ 0.201023] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -22
[ 0.208697] imx-drm 32c00000.bus:display-subsystem: failed to bind 32e10000.mipi_dsi (ops imx_sec_dsim_ops): -22
[ 0.226472] of_reserved_mem_lookup() returned NULL
[ 0.309382] nxp-pca9450 0-0025: Read device id error
[ 0.598028] OF: graph: no port node found in /soc@0/bus@30800000/i2c@30a30000/tcpc@50/connector
[ 0.606783] OF: graph: no port node found in /soc@0/bus@30800000/i2c@30a30000/tcpc@50/connector
[ 0.615511] OF: graph: no port node found in /soc@0/bus@30800000/i2c@30a30000/tcpc@50/connector
[ 1.544218] imx6q-pcie 33800000.pcie: Phy link never came up
[ 2.545873] imx6q-pcie 33800000.pcie: Phy link never came up
[FAILED] Failed to start Network Time Synchronization.
[FAILED] Failed to start Network Time Synchronization.
[FAILED] Failed to start Network Time Synchronization.
[FAILED] Failed to start Network Time Synchronization.
[FAILED] Failed to start Network Time Synchronization.
[FAILED] Failed to start Network Time Synchronization.
[FAILED] Failed to start Console System Startup Logging.
[FAILED] Failed to start User Login Management.
syslogd[323]: Error opening log file: /var/log/auth.log: No such file or directory
syslogd[323]: Error opening log file: /var/log/syslog: No such file or directory
syslogd[323]: Error opening log file: /var/log/kern.log: No such file or directory
syslogd[323]: Error opening log file: /var/log/mail.log: No such file or directory
syslogd[323]: Error opening log file: /var/log/mail.err: No such file or directory
syslogd[323]: Error opening log file: /var/log/messages: No such file or directory
[ 5.063903] audit: type=1334 audit(1677836960.132:6): prog-id=9 op=LOAD
[ 5.073111] audit: type=1334 audit(1677836960.140:7): prog-id=10 op=LOAD
[FAILED] Failed to s[ 5.082230] audit: type=1334 audit(1677836960.140:8): prog-id=7 op=UNLOAD
tart User Login Management.
[ 5.094645] audit: type=1334 audit(1677836960.140:9): prog-id=8 op=UNLOAD
[ 5.176596] audit: type=1334 audit(1677836960.248:10): prog-id=11 op=LOAD
[ 5.183561] audit: type=1334 audit(1677836960.252:11): prog-id=12 op=LOAD
[ 5.190459] audit: type=1334 audit(1677836960.252:12): prog-id=9 op=UNLOAD
[FAILED] Failed to s[ 5.199789] audit: type=1334 audit(1677836960.252:13): prog-id=10 op=UNLOAD
tart User Login Management.
[ 5.247420] audit: type=1334 audit(1677836960.316:14): prog-id=13 op=LOAD
[ 5.264120] audit: type=1334 audit(1677836960.336:15): prog-id=14 op=LOAD
[FAILED] Failed to start User Login Management.
[FAILED] Failed to start User Login Management.
[FAILED] Failed to start User Login Management.
[ 5.768697] Qualcomm Atheros AR8031/AR8033 30be0000.ethernet-1:00: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:00, irq=POLL)
[ 6.599986] random: crng init done
[ 6.779857] EXT4-fs (mmcblk2p2): mounted filesystem with ordered data mode. Quota mode: none.
[FAILED] Failed to start Hostname Service.
[FAILED] Failed to start User Login Management.
[ 10.723166] platform cpufreq-dt: deferred probe pending
[ 10.728444] platform sound-bt-sco: deferred probe pending
[ 10.733866] platform sound-wm8524: deferred probe pending

NXP i.MX Release Distro 6.1-mickledore imx8mmevk ttymxc1

imx8mmevk login:

 

0 Kudos