IMX8MM u-boot upgrade problem

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

IMX8MM u-boot upgrade problem

2,335 Views
vertigio
Contributor II

Hi, dear community,

I have faced problem with u-boot upgrading.

I have yocto sumo system. I want to upgrade it to the newest dunfell and appropriate kernel and u-boot.
But after the upgrading, the boot process stuck on kernel starting:

mmc2(part 0) is current device
6320447 bytes read in 152 ms (39.7 MiB/s)
Uncompressed size: 14618632 = 0xDF1008
Booting from mmc ...
fdt_file=imx8mm-var-som-symphony-legacy.dtb
45490 bytes read in 20 ms (2.2 MiB/s)
## Flattened Device Tree blob at 43000000
Booting using the fdt blob at 0x43000000
Using Device Tree in place at 0000000043000000, end 000000004300e1b1

Starting kernel ...


We have used the default version of the dunfell u-boot (imx_v2020.04_5.4.24_2.1.0_var02)

We can solve this issue by changing the u-boot version to imx_v2020.04_5.4.47_2.2.0_var01

Do you have some ideas?

Printenv:

Spoiler
baudrate=115200
board_name=VAR-SOM-MX8M-MINI
boot_fdt=try
bootcmd=run ramsize_check; mmc dev ${mmcdev}; if mmc rescan; then if test ${use_m4} = yes && run loadm4bin; then run runm4bin; fi; if run loadbootscript; then run bootscript; else if run loadimage; then run mmcboot; else run netboot; fi; fi; else booti ${loadaddr} - ${fdt_addr}; fi
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;
bootdelay=1
bootdir=/boot
bootscript=echo Running bootscript from mmc ...; source
carrier_rev=legacy
console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200
emmc_dev=1
ethprime=FEC
fastboot_dev=mmc2
fdt_addr=0x43000000
fdt_file=imx8mm-var-som-symphony-legacy.dtb
fdt_high=0xffffffffffffffff
fdtcontroladdr=bdf212d0
findfdt=if test $fdt_file = undefined; then if test $board_name = VAR-SOM-MX8M-MINI; then if test $som_rev = som_rev10; then setenv fdt_file fsl-imx8mm-var-som-rev10.dtb; else setenv fdt_file fsl-imx8mm-var-som.dtb; fi;else setenv fdt_file fsl-imx8mm-var-dart.dtb;fi; fi;
image=Image.gz
img_addr=0x42000000
initrd_addr=0x43800000
initrd_high=0xffffffffffffffff
ip_dyn=yes
kboot=booti
loadaddr=0x40480000
loadbootscript=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootdir}/${script};
loadfdt=run findfdt; echo fdt_file=${fdt_file}; load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${bootdir}/${fdt_file}
loadimage=load mmc ${mmcdev}:${mmcpart} ${img_addr} ${bootdir}/${image};unzip ${img_addr} ${loadaddr}
loadm4bin=load mmc ${mmcdev}:${mmcpart} ${m4_addr} ${bootdir}/${m4_bin}
m4_addr=0x7e0000
m4_bin=hello_world.bin
mfgtool_args=setenv bootargs console=${console},${baudrate} rdinit=/linuxrc clk_ignore_unused
mmcargs=setenv bootargs console=${console} root=/dev/mmcblk${mmcblk}p${mmcpart} rootwait rw ${cma_size}
mmcautodetect=yes
mmcblk=2
mmcboot=echo Booting from mmc ...; run mmcargs; run optargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then booti ${loadaddr} - ${fdt_addr}; else echo WARN: Cannot load the DT; fi; else echo wait for boot; fi;
mmcdev=2
mmcpart=2
netargs=setenv bootargs console=${console} root=/dev/nfs ${cma_size} ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${img_addr} ${image}; unzip ${img_addr} ${loadaddr};run ramsize_check; run netargs; run optargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then run findfdt; echo fdt_file=${fdt_file}; if ${get_cmd} ${fdt_addr} ${fdt_file}; then booti ${loadaddr} - ${fdt_addr}; else echo WARN: Cannot load the DT; fi; else booti; fi;
optargs=setenv bootargs ${bootargs} ${kernelargs};
ramsize_check=if test $sdram_size -le 512; then setenv cma_size cma=320M; else setenv cma_size cma=640M@1376M; fi;
runm4bin=if test ${m4_addr} = 0x7e0000; then echo Booting M4 from TCM; else echo Booting M4 from DRAM; dcache flush; fi; bootaux ${m4_addr};
script=boot.scr
sd_dev=0
sdram_size=2048
serial#=0b1d0a0a5c73e888
soc_type=imx8mm
som_rev=som_rev11
splashdisable=setenv splashfile; setenv splashimage
splashenable=setenv splashfile /boot/splash.bmp; setenv splashimage 0x43100000
splashfile=/boot/splash.bmp
splashimage=0x43100000
splashsourceauto=yes
use_m4=no
Tags (2)
0 Kudos
Reply
3 Replies

2,262 Views
vertigio
Contributor II

Hi @Zhiming_Liu,

I have investigated, that removing changing of the u-boot environmental variables helps. I have some post-install script, that changes partition by fw_setenv mmcpart $partition. It somehow corrupts the u-boot or kernel. 

UPD: I have investigated that in corrupted image starting from 400E01 there are 60 bytes with nulled memory. As i understood, it is related to the u-boot environmental variables. Also there are a lot of nulled memory starting from 801741(almost 2 MB of nulled memory)

0 Kudos
Reply

2,316 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @vertigio 

 

The yocto project of var is different from NXP release. You should update yocto project ,not only u-boot.

 

Regards

Zhiming

0 Kudos
Reply

2,307 Views
vertigio
Contributor II

Thanks @Zhiming_Liu . 

I have tried imx_v2020.04_5.4.24_2.1.0_var02 too.  It has the same behavior

I have updated the yocto to the dunfell. The main problem with the default u-boot version for dunfell. It is not loading the kernel. It prints the log `kernel starting`, and stuck. 

I think, there is the discrepancy between the mkimage and u-boot load address. 

How can I check the load address that mkimage set to the header?

0 Kudos
Reply