bootcmd and CONFIG_BOOTCOMMAND in iMX8MP

cancel
Showing results for 
Search instead for 
Did you mean: 

bootcmd and CONFIG_BOOTCOMMAND in iMX8MP

461 Views
kyungjun
Contributor I

Hi,

I ran into a problem while editing and  testing U-boot in iMX8MP EVK.

I was not able to overwrite bootcmd in EVK U-boot.

My expectation was when I configure CONFIG_BOOTCOMMAND in U-boot source, CONFIG_BOOTCOMMAND would replace bootcmd stored in U-boot env, but what happens in reality was not like that.

 - when new U-boot image was applied with CONFIG_BOOTCOMMAND and target was power-cycled, bootcmd didn't change

 - when bootcmd was removed and target power-cycled, some random command(bootcmd=boota mmc1) showed up

 

Can you please elaborate what is wrong with my test and what the relation of two item(bootcmd in U-boot env, CONFIG_BOOTCOMMAND in U-boot src) is?

I'd appreciate any help from anyone!

Thanks

 

 

"configs/imx8mp_evk_defconfig"

CONFIG_ENV_SIZE=0x1000

CONFIG_ENV_OFFSET=0x400000

CONFIG_ENV_SECT_SIZE=0x10000

 

CONFIG_ENV_IS_IN_MMC=y

CONFIG_ENV_IS_IN_SPI_FLASH=y

CONFIG_ENV_IS_NOWHERE=y

 

CONFIG_USE_BOOTCOMMAND=y

CONFIG_BOOTCOMMAND="bootm 1:2"   /* temporary one for testing */

 

 

"How to build U-boot image"

 - make distclean

 - make imx8mp_evk_defconfig

 - make

 …

 

 - sudo dd if=flash.bin of=/dev/sdb bs=1k seek=32 conv=fsync

 

 

"flash.bin"

^@bootcmd=bootm 1:2^@bootdelay=2^@baudrate=115200^@ethprime=eth1^@loadaddr=0x40480000^@mfgtool_args=setenv bootargs console=${console},${b

 

 

"Test log in iMX8MP EVK"

u-boot=> setenv bootcmd

u-boot=> saveenv

Saving Environment to MMC... Writing to MMC(1)... OK

u-boot=> printenv

baudrate=115200

board_name=EVK

board_rev=iMX8MP

ethaddr=00:04:9f:06:d6:db

fastboot_dev=mmc1

fdtcontroladdr=fcbf75b8

serial#=1c2218006c165fec

soc_type=imx8mp

ssm_version=2

 

Environment size: 172/4092 bytes

u-boot=> reset

resetting ...

 

U-Boot SPL 2020.04 (Jun 05 2021 - 16:42:37 -0400)

DDRINFO: start DRAM init

DDRINFO: DRAM rate 4000MTS

DDRINFO:ddrphy calibration done

DDRINFO: ddrmix config done

Normal Boot

Trying to boot from BOOTROM

image offset 0x8000, pagesize 0x200, ivt offset 0x0

NOTICE:  BL31: v2.2(release):a6e8903b-dirty

NOTICE:  BL31: Built : 13:29:38, May 25 2021

 

 

U-Boot 2020.04 (Jun 05 2021 - 16:42:37 -0400)

 

CPU:   i.MX8MP[8] rev1.0 1800 MHz (running at 1200 MHz)

CPU:   Commercial temperature grade (0C to 95C) at 34C

Reset cause: POR

Model: NXP i.MX8MPlus LPDDR4 EVK board

DRAM:  6 GiB

TCPC:  Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C2 0x50]

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... OK

[*]-Video Link 0probe video device failed, ret -2

 

        [0] lcd-controller@32e80000, video

        [1] mipi_dsi@32e60000, video_bridge

        [2] adv7535@3d, panel

In:    serial

Out:   serial

Err:   serial

 

 BuildInfo:

  - ATF

  - U-Boot 2020.04

 

Saving Environment to MMC... Writing to MMC(1)... OK

flash target is MMC:1

Net:   eth0: ethernet@30be0000

Fastboot: Normal

Normal Boot

Hit any key to stop autoboot:  0

u-boot=> printenv

baudrate=115200

board_name=EVK

board_rev=iMX8MP

bootcmd=boota mmc1

ethaddr=00:04:9f:06:d6:db

fastboot_dev=mmc1

fdtcontroladdr=fcbf75b8

serial#=1c2218006c165fec

soc_type=imx8mp

ssm_version=2

 

Environment size: 191/4092 bytes

u-boot=>

Labels (1)
0 Kudos
0 Replies