IMX8QM-EVK boot fail

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

IMX8QM-EVK boot fail

Jump to solution
3,527 Views
zhengbing
Contributor I

Hi all,

I am working on burning image to emmc on iMX8MQ-EVK. 

Now, I got an error:kernel in emmc is not be boot by bootloader. log as follow:

-----------------------------------------------------
u-boot=> reset
esetting ...
U-Boot SPL 2020.04 (Nov 06 2020 - 13:33:47 +0800)
PMIC: PFUZE100 ID=0x10
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3200MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from MMC1


U-Boot 2020.04 (Nov 06 2020 - 13:33:47 +0800)

CPU: i.MX8MQ rev2.0 1500 MHz (running at 1000 MHz)
CPU: Commercial temperature grade (0C to 95C) at 25C
Reset cause: POR
Model: NXP i.MX8MQ EVK
DRAM: 3 GiB
TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C0 0x50]
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... OK
[*]-Video Link 0imx8m_hdmi_probe
(1280 x 720)
[0] display-controller@32e00000, video
[1] hdmi@32c00000, display
In: serial
Out: serial
Err: serial

BuildInfo:
- ATF c949a88
- U-Boot 2020.04

switch to partitions #0, OK
mmc0(part 0) is current device
flash target is MMC:0
Net:
Warning: ethernet@30be0000 using MAC address from ROM
eth0: ethernet@30be0000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0(part 0) is current device
Booting from net ...
BOOTP broadcast 1
DHCP client bound to address 192.168.1.106 (5 ms)
*** ERROR: `serverip' not set
Cannot autoload with TFTPGET
BOOTP broadcast 1
DHCP client bound to address 192.168.1.106 (4 ms)
*** ERROR: `serverip' not set
Cannot autoload with TFTPGET
WARN: Cannot load the DT

--------------------------------------------

Please anybody help me?  thanks!

0 Kudos
1 Solution
3,466 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

I have saw your details, your steps are OK no errors found. The fail boot caused by the unreasonable set in kernel command line. As you renamed the download images name, so when uboot boot up you need also to unify the name in kernel boot up. When your uboot boot up, print and modify. It will also work OK. You can try.

View solution in original post

0 Kudos
8 Replies
3,525 Views
zhengbing
Contributor I

enviroment:

u-boot=>
baudrate=115200
board_name=EVK
board_rev=iMX8MQ
boot_fdt=try
bootcmd=mmc dev ${mmcdev}; if mmc rescan; then 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=2
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc0,115200
emmc_dev=0
ethaddr=00:04:9f:05:a6:db
ethprime=FEC
fastboot_dev=mmc0
fdt_addr=0x43000000
fdt_file=imx8mq-evk.dtb
fdt_high=0xffffffffffffffff
fdtcontroladdr=ff11b488
image=Image
initrd_addr=0x43800000
initrd_high=0xffffffffffffffff
jh_clk=
jh_mmcboot=setenv fdt_file imx8mq-evk-root.dtb; setenv jh_clk clk_ignore_unused; if run loadimage; then run mmcboot; else run jh_netboot; fi;
jh_netboot=setenv fdt_file imx8mq-evk-root.dtb; setenv jh_clk clk_ignore_unused; run netboot;
kboot=booti
loadaddr=0x40480000
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
mfgtool_args=setenv bootargs console=${console},${baudrate} rdinit=/linuxrc clk_ignore_unused
mmcargs=setenv bootargs ${jh_clk} console=${console} root=${mmcroot}
mmcautodetect=yes
mmcboot=echo Booting from mmc ...; run mmcargs; 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=0
mmcpart=1
mmcroot=/dev/mmcblk0p2 rootwait rw
nandfit_part=yes
netargs=setenv bootargs ${jh_clk} console=${console} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${loadaddr} ${image}; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then booti ${loadaddr} - ${fdt_addr}; else echo WARN: Cannot load the DT; fi; else booti; fi;
script=boot.scr
sd_dev=1
serial#=180c59d6f0609912
soc_type=imx8mq
splashimage=0x50000000

Environment size: 2334/4092 bytes

0 Kudos
3,517 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Could you tell us which board are you using iMX8MQ-EVK or iMX8QM-EVK? They are different. Could you tell us which version BSP are you using, and you download the demo images or images you build yourself?

0 Kudos
3,508 Views
zhengbing
Contributor I

Thank you for your reply,

Sorry for error description, I am using iMX8MQ-EVK.

BSP: L5.4.47-2.2.0

I refer to 《i.MX_Linux_Users_Guide.pdf》《i.MX_Yocto_Project_User's_Guide.pdf》, and Image is built by myself.

Look forward to your reply. Thank you again.

0 Kudos
3,498 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

In your build, which command are you using? When you download does it success? Or can you give your details steps, to see if some unreasonable operation.

 

0 Kudos
3,476 Views
zhengbing
Contributor I

hi, 

I tried to use command "uuu -b emmc_all flash.bin roofs.wic". It's working.

How can I get roofs.wic by Image&&dtb&&rootfs.tar.bz2 ?

Is there some kind of method that creating rootfs.wic ?

Best regards.

0 Kudos
3,467 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

When you finished building, you can see the imx-image-full-imx8mqevk.wic or imx-image-multimedia-imx8mqevk.wic in your images directory. You do not need to do special operations.

0 Kudos
3,492 Views
zhengbing
Contributor I

Thank you for your reply.

1、yocto and sdk:
Refer to 《i.MX_Yocto_Project_User's_Guide》 and 《i.MX_Linux_Users_Guide》.
bitbake imx-image-full -c populate_sdk.

finally, I got yocto enviroment and sdk enviroment.

2、build kernel:
git clone ....; git checkout origin/imx_5.4.47_2.2.0;
source /opt/fsl-imx-wayland/5.4-zeus/environment-setup-aarch64-poky-linux;
make imx_v8_defconfig && make;
so, I got 'linux-imx/arch/arm64/boot/Image' and 'linux-imx/arch/arm64/boot/dts/freescale/imx8mq-evk.dtb';

3、build uboot:
git clone ....; git checkout origin/imx_v2020.04_5.4.47_2.2.0;
source /opt/fsl-imx-wayland/5.4-zeus/environment-setup-aarch64-poky-linux;
make distclean && make imx8mq_evk_defconfig && make.
so, I got 'uboot-imx/u-boot-nodtb.bin', 'uboot-imx/spl/u-boot-spl.bin', 'uboot-imx/tools/mkimage' and 'uboot-imx/arch/arm/dts/imx8mq-evk.dtb';

4、build atf:
git clone ....; git checkout origin/imx_5.4.47_2.2.0;
source /opt/fsl-imx-wayland/5.4-zeus/environment-setup-aarch64-poky-linux;
make PLAT=imx8mq;
so, I got 'imx-atf/build/imx8mq/release/bl31.bin';

5、build fash.bin by using mkimage:
git clone ....; git checkout origin/imx_5.4.47_2.2.0;
copy imx-atf/build/imx8mq/release/bl31.bin to imx-mkimage/iMX8M/bl31.bin
copy uboot-imx/arch/arm/dts/imx8mq-evk.dtb to imx-mkimage/iMX8M/imx8mq-evk.dtb
copy uboot-imx/u-boot-nodtb.bin to imx-mkimage/iMX8M/u-boot-nodtb.bin
copy uboot-imx/spl/u-boot-spl.bin to imx-mkimage/iMX8M/u-boot-spl.bin
copy uboot-imx/tools/mkimage to imx-mkimage/iMX8M/mkimage_uboot
copy imx-yocto-bsp/build-wayland/tmp/deploy/images/imx8mqevk/lpddr4_pmu_train_1d_dmem.bin to imx-mkimage/iMX8M/lpddr4_pmu_train_1d_dmem.bin
copy imx-yocto-bsp/build-wayland/tmp/deploy/images/imx8mqevk/lpddr4_pmu_train_1d_imem.bin to imx-mkimage/iMX8M/lpddr4_pmu_train_1d_imem.bin
copy imx-yocto-bsp/build-wayland/tmp/deploy/images/imx8mqevk/lpddr4_pmu_train_2d_dmem.bin to imx-mkimage/iMX8M/lpddr4_pmu_train_2d_dmem.bin
copy imx-yocto-bsp/build-wayland/tmp/deploy/images/imx8mqevk/lpddr4_pmu_train_2d_imem.bin to imx-mkimage/iMX8M/lpddr4_pmu_train_2d_imem.bin
copy imx-yocto-bsp/build-wayland/tmp/deploy/images/imx8mqevk/signed_hdmi_imx8m.bin to imx-mkimage/iMX8M/signed_hdmi_imx8m.bin
make SOC=iMX8M flash_evk
so, I got 'imx-mkimage/iMX8M/flash.bin'

6、use uuu burn image on win10
copy and rename linux-imx/arch/arm64/boot/Image to _Image
copy and rename linux-imx/arch/arm64/boot/dts/freescale/imx8mq-evk.dtb to _board.dtb
copy and rename imx-yocto-bsp/build-wayland/tmp/deploy/images/imx8mqevk/imx-image-full-imx8mqevk-20201021065034.rootfs.tar.bz2 to _rootfs.tar.bz2
copy and rename imx-mkimage/iMX8M/flash.bin to _flash.bin
copy and rename L5.4.47-2.2.0_images_MX8MQEVK/fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot to _initramfs.cpio.gz.uboot

uuu.exe emmc.uuu

Snipaste_2020-11-12_17-31-53.pngSnipaste_2020-11-12_17-54-39.pngSnipaste_2020-11-12_18-01-45.png

emmc.uuu:

uuu_version 1.2.39

# Please Replace below items with actually file names
# @_flash.bin | boot loader
# @_Image | kernel image, arm64 is Image, arm32 it is zImage
# @_board.dtb | board dtb file
# @_initramfs.cpio.gz.uboot | mfgtool init ramfs
# @_rootfs.tar.bz2 | rootfs
# @_uTee.tar | optee image, put dummy _uTee.tar file here if platform is not MX6/MX7*

# This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
SDP: boot -f _flash.bin

# This command will be run when ROM support stream mode
# i.MX8QXP, i.MX8QM
SDPS: boot -f _flash.bin

# These commands will be run when use SPL and will be skipped if no spl
# SDPU will be deprecated. please use SDPV instead of SDPU
# {
SDPU: delay 1000
SDPU: write -f _flash.bin -offset 0x57c00
SDPU: jump
# }

# These commands will be run when use SPL and will be skipped if no spl
# if (SPL support SDPV)
# {
SDPV: delay 1000
SDPV: write -f _flash.bin -skipspl
SDPV: jump
# }

# use uboot burn bootloader to eMMC
# becaue difference chip, offset is difference
# you can use kernel to do that for specific boards
FB: ucmd setenv fastboot_dev mmc
FB: ucmd setenv mmcdev ${emmc_dev}
FB: flash bootloader _flash.bin

FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;

FB: ucmd setenv emmc_cmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0
FB: ucmd if test "${emmc_skip_fb}" != "yes"; then run emmc_cmd; fi
FB: ucmd setenv emmc_cmd mmc bootbus ${emmc_dev} 2 2 1;
FB: ucmd if test "${emmc_skip_fb}" != "yes"; then run emmc_cmd; fi

FB: ucmd setenv fastboot_buffer ${loadaddr}
FB: download -f _Image
FB: ucmd setenv fastboot_buffer ${fdt_addr}
FB: download -f _board.dtb
FB: ucmd setenv fastboot_buffer ${initrd_addr}
FB: download -f _initramfs.cpio.gz.uboot
#FB: ucmd setenv bootargs console=${console},${baudrate} earlycon=${earlycon},${baudrate}
FB: acmd ${kboot} ${loadaddr} ${initrd_addr} ${fdt_addr}

# get mmc dev number from kernel command line
# Wait for emmc
FBK: ucmd while [ ! -e /dev/mmcblk*boot0 ]; do sleep 1; echo "wait for /dev/mmcblk*boot* appear"; done;

# serach emmc device number, if your platform have more than two emmc chip, please echo dev number >/tmp/mmcdev
FBK: ucmd dev=`ls /dev/mmcblk*boot*`; dev=($dev); dev=${dev[0]}; dev=${dev#/dev/mmcblk}; dev=${dev%boot*}; echo $dev > /tmp/mmcdev;

# dd to clear the possible MBR
FBK: ucmd mmc=`cat /tmp/mmcdev`; dd if=/dev/zero of=/dev/mmcblk${mmc} bs=512 count=1
# create partition
FBK: ucmd mmc=`cat /tmp/mmcdev`; PARTSTR=$'10M,500M,0c\n600M,,83\n'; echo "$PARTSTR" | sfdisk --force /dev/mmcblk${mmc}

FBK: ucmd mmc=`cat /tmp/mmcdev`; dd if=/dev/zero of=/dev/mmcblk${mmc} bs=1k seek=4096 count=1
FBK: ucmd sync
# you can enable below command to write boot partition. but offset is difference at difference platform
#FBK: ucmd mmc=`cat /tmp/mmcdev`; echo 0 > /sys/block/mmcblk${mmc}boot0/force_ro
#FBK: ucp _flash.bin t:/tmp
#FBK: ucmd mmc=`cat /tmp/mmcdev`; dd if=/tmp/_flash.bin of=/dev/mmc${mmc}boot0 bs=1K seek=32
#FBK: ucmd mmc=`cat /tmp/mmcdev`; echo 1 > /sys/block/mmcblk${mmc}boot0/force_ro
FBK: ucmd mmc=`cat /tmp/mmcdev`; while [ ! -e /dev/mmcblk${mmc}p1 ]; do sleep 1; done
FBK: ucmd mmc=`cat /tmp/mmcdev`; mkfs.vfat /dev/mmcblk${mmc}p1
FBK: ucmd mmc=`cat /tmp/mmcdev`; mkdir -p /mnt/fat
FBK: ucmd mmc=`cat /tmp/mmcdev`; mount -t vfat /dev/mmcblk${mmc}p1 /mnt/fat
FBK: ucp _Image t:/mnt/fat
FBK: ucp _board.dtb t:/mnt/fat
# FBK: ucp _uTee.tar t:/tmp/op.tar
# FBK: ucmd tar -xf /tmp/op.tar -C /mnt/fat
FBK: ucmd umount /mnt/fat
FBK: ucmd mmc=`cat /tmp/mmcdev`; mkfs.ext3 -F -E nodiscard /dev/mmcblk${mmc}p2
FBK: ucmd mkdir -p /mnt/ext3
FBK: ucmd mmc=`cat /tmp/mmcdev`; mount /dev/mmcblk${mmc}p2 /mnt/ext3
FBK: acmd export EXTRACT_UNSAFE_SYMLINKS=1; tar -jx -C /mnt/ext3
FBK: ucp _rootfs.tar.bz2 t:-
FBK: Sync
FBK: ucmd umount /mnt/ext3
FBK: DONE

 

Thank you.

0 Kudos
3,467 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

I have saw your details, your steps are OK no errors found. The fail boot caused by the unreasonable set in kernel command line. As you renamed the download images name, so when uboot boot up you need also to unify the name in kernel boot up. When your uboot boot up, print and modify. It will also work OK. You can try.

0 Kudos