Hello all,
I'm trying to boot a board based on SABRESD design. The board had passed the memory test, but mfgtools won't flash it.
Last error I can see in the log is 'Failed to Initialize memory!'.
With same parameters, I can flash a SABRESD board with eMMC and boot it .
Somebody can give some pointers about what to check or modify?
Regards,
PARAMS:
sudo ./mfgtoolcli -c "Linux" -l "eMMC" -s "board=sabresd" -s "sxdtb=sdb" -s "mmc=3"
LOG:
DLL version: 2.3.4
Thu Jan 23 16:07:59 2020
Start new logging
ModuleID[2] LevelID[10]: address from XML 0x12000000
ModuleID[2] LevelID[10]: address from XML 0x80800000
ModuleID[2] LevelID[10]: address from XML 0x60800000
ModuleID[2] LevelID[10]: address from XML 0x12C00000
ModuleID[2] LevelID[10]: address from XML 0x83800000
ModuleID[2] LevelID[10]: address from XML 0x63800000
ModuleID[2] LevelID[10]: address from XML 0x18000000
ModuleID[2] LevelID[10]: address from XML 0x18000000
ModuleID[2] LevelID[10]: address from XML 0x83000000
ModuleID[2] LevelID[10]: address from XML 0x83000000
ModuleID[2] LevelID[10]: address from XML 0x83000000
ModuleID[2] LevelID[10]: address from XML 0x83000000
ModuleID[2] LevelID[10]: address from XML 0x83000000
ModuleID[2] LevelID[10]: address from XML 0x83000000
ModuleID[2] LevelID[10]: address from XML 0x63000000
ModuleID[2] LevelID[10]: CMyExceptionHandler thread is running
ModuleID[2] LevelID[1]: new MxHidDeviceClass
ModuleID[2] LevelID[10]: Add USB device
ModuleID[2] LevelID[10]: Create Device 0x7fd6cc002970
ModuleID[2] LevelID[10]: new MxHidDevice[0x7fd6cc002970]
ModuleID[2] LevelID[10]: ExecuteCommand--Boot[WndIndex:0], File is ./Profiles/Linux/OS Firmware/firmware/u-boot-imx6sxsabresd_emmc.imx
ModuleID[2] LevelID[10]: Trans Data address is 877ff400
ModuleID[2] LevelID[10]: ExecuteCommand--Load[WndIndex:0], File is ./Profiles/Linux/OS Firmware/firmware/zImage, address is 0x80800000
ModuleID[2] LevelID[10]: Trans Data address is 80800000
ModuleID[2] LevelID[10]: Trans Data address is 80a00000
ModuleID[2] LevelID[10]: Trans Data address is 80c00000
ModuleID[2] LevelID[10]: Trans Data address is 80e00000
ModuleID[2] LevelID[10]: PortMgrDlg(0)--Command Load excute successfully, retry count: 0
ModuleID[2] LevelID[10]: ExecuteCommand--Load[WndIndex:0], File is ./Profiles/Linux/OS Firmware/firmware/fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot, address is 0x83800000
ModuleID[2] LevelID[10]: Trans Data address is 83800000
ModuleID[2] LevelID[10]: Trans Data address is 83a00000
ModuleID[2] LevelID[10]: Trans Data address is 83c00000
ModuleID[2] LevelID[10]: Trans Data address is 83e00000
ModuleID[2] LevelID[10]: Trans Data address is 84000000
ModuleID[2] LevelID[10]: PortMgrDlg(0)--Command Load excute successfully, retry count: 0
ModuleID[2] LevelID[10]: ExecuteCommand--Load[WndIndex:0], File is ./Profiles/Linux/OS Firmware/firmware/zImage-imx6sx-sdb-emmc.dtb, address is 0x83000000
ModuleID[2] LevelID[10]: Trans Data address is 83000000
ModuleID[2] LevelID[10]: PortMgrDlg(0)--Command Load excute successfully, retry count: 0
ModuleID[2] LevelID[10]: ExecuteCommand--Jump[WndIndex:0]
ModuleID[2] LevelID[10]: *********MxHidDevice[0x7fd6cc002970] Jump to Ramkernel successfully!**********
ModuleID[2] LevelID[10]: ExecuteCommand--Boot[WndIndex:0], File is ./Profiles/Linux/OS Firmware/firmware/u-boot-imx6sxsabresd_emmc.imx
ModuleID[2] LevelID[1]: Failed to initialize memory!
ModuleID[2] LevelID[1]: PortMgrDlg(0)--MxHidDevice--Command Boot excute failed
Hi Igor,
Thanks for your response. I'm trying, but I'm not already there.
I compiled fsl-image-mfgtools-initramfs (bitbake fsl-image-mfgtools-initramfs).
Then I searched for the file imximage.cfg. It turns out to be in /bsp/imx-yocto-bsp-sabre/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/u-boot-imx-mfgtool/2017.03-r0/git/board/freescale/mx6sxsabresd
File is modified with my values from the DDR stress test, and I clean and recompile;
--> bitbake -c cleanall fsl-image-mfgtools-initramfs
--> bitbake -C compile u-boot-imx-mfgtool
--> bitbake fsl-image-mfgtools-initramfs
Then all the files deployed for fsl-image-mfgtools-initramfs should be found in deply/images
new files are:
-> fsl-image-mfgtool-initramfs-imx6sxsabresd-20200128080650.rootfs.cpio.gz.u-boot
-> u-boot-mfgtool-2017.03-r0.imx
I copied them, and all the links to my mfgtools directory (Profiles/Linux/OS Firmware/firmware/)
After flashing with this modifications, the resul is more or less the same as before (Failed to initialize memory!)
I'm missing something here?
Looks like I'm only overwriting the file fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot. Is that correct, or should I manually overwrite any other file with my compiled u-boot (u-boot-mfgtool-2017.03-r0.imx) ?
Hi Victor
uboot should be used from nxp source.codeaurora.org/external/imx/ repository uboot-imx - i.MX U-Boot
and corresponds to used linux/mfg tool version, one can check documentation on
i.MX Software and Development Tools | NXP
Best regards
igor
Hi Igor,
I managed to compile u-boot from source.codeaurora.org/external/imx/ as you told.
Now, I 've a doubt about what to do with the binaries obtained.
I simply copy them into /Profiles/Linux/OS Firmware/firmware/ as overwriting the sabre ones?
What happens with the file fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot? How I can generate it.
***LOGS FROM
ModuleID[2] LevelID[10]: PortMgrDlg(0)--Command Load excute successfully, retry count: 0
ModuleID[2] LevelID[10]: ExecuteCommand--Load[WndIndex:0], File is ./Profiles/Linux/OS Firmware/firmware/fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot, address is 0x83800000
Regards,
Hi Igor,
The file talks about LTIB, is for i.MX6Dual and is from 2013. It's not possible to make this from Yocto? or another more manual fashion?
So far, I have a working Yocto environment, I've deployed a toolchain from Yocto (bitbake meta-toolchain) and used this toolchain to compile uboot-imx from Code Aurora, with modified imximage.cfg.
On i.MX BSP Porting guide (chapter 3 U-Boot), mentions a tool named imx-mkimage. Can I use this or something like that? It's more documented elsewhere?
Regards,
Updated Digging on work directories from Yocto, I've found a run script for doing cpio image on fsl-mfgtool-initramfs recipe.
do_image_cpio() {
(cd /bsp/imx-yocto-bsp-sabre/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/fsl-image-mfgtool-initramfs/1.0-r0/rootfs && find . | cpio -o -H newc >/bsp/imx-yocto-bsp-sabre/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/fsl-image-mfgtool-initramfs/1.0-r0/deploy-fsl-image-mfgtool-initramfs-image-complete/fsl-image-mfgtool-initramfs-imx6sxsabresd-20200128080650.rootfs.cpio)
# We only need the /init symlink if we're building the real
# image. The -dbg image doesn't need it! By being clever
# about this we also avoid 'touch' below failing, as it
# might be trying to touch /sbin/init on the host since both
# the normal and the -dbg image share the same WORKDIR
if [ "${IMAGE_BUILDING_DEBUGFS}" != "true" ]; then
if [ ! -L /bsp/imx-yocto-bsp-sabre/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/fsl-image-mfgtool-initramfs/1.0-r0/rootfs/init ] && [ ! -e /bsp/imx-yocto-bsp-sabre/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/fsl-image-mfgtool-initramfs/1.0-r0/rootfs/init ]; then
if [ -L /bsp/imx-yocto-bsp-sabre/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/fsl-image-mfgtool-initramfs/1.0-r0/rootfs/sbin/init ] || [ -e /bsp/imx-yocto-bsp-sabre/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/fsl-image-mfgtool-initramfs/1.0-r0/rootfs/sbin/init ]; then
ln -sf /sbin/init /bsp/imx-yocto-bsp-sabre/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/fsl-image-mfgtool-initramfs/1.0-r0/cpio_append/init
else
touch /bsp/imx-yocto-bsp-sabre/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/fsl-image-mfgtool-initramfs/1.0-r0/cpio_append/init
fi
(cd /bsp/imx-yocto-bsp-sabre/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/fsl-image-mfgtool-initramfs/1.0-r0/cpio_append && echo ./init | cpio -oA -H newc -F /bsp/imx-yocto-bsp-sabre/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/fsl-image-mfgtool-initramfs/1.0-r0/deploy-fsl-image-mfgtool-initramfs-image-complete/fsl-image-mfgtool-initramfs-imx6sxsabresd-20200128080650.rootfs.cpio)
fi
fi
cd /bsp/imx-yocto-bsp-sabre/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/fsl-image-mfgtool-init#ramfs/1.0-r0/deploy-fsl-image-mfgtool-initramfs-image-complete
gzip -f -9 -n -c fsl-image-mfgtool-initramfs-imx6sxsabresd-20200128080650.rootfs.cpio > fsl-image-mfgtool-initramfs-imx6sxsabresd-20200128080650.rootfs.cpio.gz
mkimage -A arm -O linux -T ramdisk -C none -n fsl-image-mfgtool-initramfs-imx6sxsabresd-20200128080650 -d fsl-image-mfgtool-initramfs-imx6sxsabresd-20200128080650.rootfs.cpio.gz fsl-image-mfgtool-initramfs-imx6sxsabresd-20200128080650.rootfs.cpio.gz.u-boot
rm fsl-image-mfgtool-initramfs-imx6sxsabresd-20200128080650.rootfs.cpio
rm fsl-image-mfgtool-initramfs-imx6sxsabresd-20200128080650.rootfs.cpio.gz
}
I'm might as well give it a try with these commands, using the files I've already generated, and see what happens;
cpio -oA -H newc -F /bsp/imx-yocto-bsp-sabre/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/fsl-image-mfgtool-initramfs/1.0-r0/deploy-fsl-image-mfgtool-initramfs-image-complete/fsl-image-mfgtool-initramfs-imx6sxsabresd-20200128080650.rootfs.cpio gzip -f -9 -n -c fsl-image-mfgtool-initramfs-imx6sxsabresd-20200128080650.rootfs.cpio > fsl-image-mfgtool-initramfs-imx6sxsabresd-20200128080650.rootfs.cpio.gz mkimage -A arm -O linux -T ramdisk -C none -n fsl-image-mfgtool-initramfs-imx6sxsabresd-20200128080650 -d fsl-image-mfgtool-initramfs-imx6sxsabresd-20200128080650.rootfs.cpio.gz fsl-image-mfgtool-initramfs-imx6sxsabresd-20200128080650.rootfs.cpio.gz.u-boot
But I'll be grateful for a more informed opinion, if
Hi Victor
though document about ltib, file names are the same and should
Best regards
igor
Hi Igor,
Digging into the script I posted, I realized that u-boot binary is not contained into cpio.gz.u-boot file (this is a RamDisk Image used by u-boot, sorry for asking about it without knowing what it is).
So, the error 'Failed to Initialize memory!' is not related (yet) to this file?
I only need to build an u-boot.imx that boots, and then fix the other problems?
This is the only file I need to care until I go past the 'Failed to Initialize memory!' error?
From MfgToolLibLog.txt:
ModuleID[2] LevelID[10]: ExecuteCommand--Boot[WndIndex:0], File is ./Profiles/Linux/OS Firmware/firmware/u-boot-imx6sxsabresd_emmc.imx
Regards,
Hi Victor
yes please try first with u-boot.imx, change its dcd with new ddr
calibration coefficients found from ddr test..
Best regards
igor
Hi Igor,
I tried and still having problems here. I'm not capable of generating an u-boot.imx that boot for SabreSD either.
I set aside the new hardware in order to test a known hardware.
I'm back to work with the SabreSD reworked for eMMC boot, which is always flashing OK with the u-boot shipped with mfgtools (u-boot-imx6sxsabresd_emmc.imx)
-The u-boot shipped with mfg-tools (L4.9.88_2.0.0) boots and flash the SabreSD OK.
-The u-boot that I compile from the source you linked, without modification, does not boot (Failed to init memory!)
-The u-boot that I compile from the source you linked, changing DCD values from a DDR Calibration teston my SabreSD, does not boot (Failed to init memory!)
The process I followed (imxconfig.cfg not modified, as per imximage.cfg\mx6sxsabresd\freescale\board - uboot-imx - i.MX U-Boot ) :
1-> Create and deploy a toolchain:
---> bitbake meta-toolchain
---> /bsp/imx-yocto-bsp-sabre/build/tmp/deploy/sdk/fsl-imx-x11-glibc-x86_64-meta-toolchain-cortexa9hf-neon-toolchain-4.9.88-2.0.0.sh
2-> Download u-boot from your link:
--->git clone --branch imx_v2019.04_4.19.35_1.1.0 https://source.codeaurora.org/external/imx/uboot-imx
3-> Make u-boot for sabresd eMMC (no modifications)
--> make clean
-->make mx6sxsabresd_emmc_defconfig
-->make
--> make u-boot.imx
4-> Copy compiled u-boot.imx to used mfgtools
--> cp u-boot.imx ../L4.9.88_2.0.0_mfg-tool/mfgtools/Profiles/Linux/OS\ Firmware/firmware/u-boot-imx6sxsabresd_emmc.imx
5-> Use mgtools to flash with new u-boot.
--> sudo ./mfgtoolcli -c "Linux" -l "eMMC" -s "board=sabresd" -s "sxdtb=sdb" -s "mmc=3"
->Result, 'Failed To Initialize memory!'
I'm missing some step? Other file must be copied?
Regards,
UPDATE: I just realized that versions from u-boot and yocto/mfg-tools are diferent. (YOCTO/MFGTOOLS 4.9.88_2.0.0; U-BOOT 4.19.35_1.0.0)
Could this be an issue? Should I try with u-boot branch imx_v2017.03_4.9.88_2.0.0_ga ?
UPDATE 2: I just cloned u-boot imx_v2017.03_4.9.88_2.0.0_ga and tried. Same result... 'Failed to inittialize memory!'
DLL version: 2.3.4
Fri Feb 7 10:58:39 2020
Start new logging
ModuleID[2] LevelID[10]: address from XML 0x12000000
ModuleID[2] LevelID[10]: address from XML 0x80800000
ModuleID[2] LevelID[10]: address from XML 0x60800000
ModuleID[2] LevelID[10]: address from XML 0x12C00000
ModuleID[2] LevelID[10]: address from XML 0x83800000
ModuleID[2] LevelID[10]: address from XML 0x63800000
ModuleID[2] LevelID[10]: address from XML 0x18000000
ModuleID[2] LevelID[10]: address from XML 0x18000000
ModuleID[2] LevelID[10]: address from XML 0x83000000
ModuleID[2] LevelID[10]: address from XML 0x83000000
ModuleID[2] LevelID[10]: address from XML 0x83000000
ModuleID[2] LevelID[10]: address from XML 0x83000000
ModuleID[2] LevelID[10]: address from XML 0x83000000
ModuleID[2] LevelID[10]: address from XML 0x83000000
ModuleID[2] LevelID[10]: address from XML 0x63000000
ModuleID[2] LevelID[10]: CMyExceptionHandler thread is running
ModuleID[2] LevelID[1]: new MxHidDeviceClass
ModuleID[2] LevelID[10]: Add USB device
ModuleID[2] LevelID[10]: Create Device 0x7f9a08002970
ModuleID[2] LevelID[10]: new MxHidDevice[0x7f9a08002970]
ModuleID[2] LevelID[10]: ExecuteCommand--Boot[WndIndex:0], File is ./Profiles/Linux/OS Firmware/firmware/u-boot-imx6sxsabresd_emmc.imx
ModuleID[2] LevelID[10]: Trans Data address is 877ff400
ModuleID[2] LevelID[10]: ExecuteCommand--Load[WndIndex:0], File is ./Profiles/Linux/OS Firmware/firmware/zImage, address is 0x80800000
ModuleID[2] LevelID[10]: Trans Data address is 80800000
ModuleID[2] LevelID[10]: Trans Data address is 80a00000
ModuleID[2] LevelID[10]: Trans Data address is 80c00000
ModuleID[2] LevelID[10]: Trans Data address is 80e00000
ModuleID[2] LevelID[10]: PortMgrDlg(0)--Command Load excute successfully, retry count: 0
ModuleID[2] LevelID[10]: ExecuteCommand--Load[WndIndex:0], File is ./Profiles/Linux/OS Firmware/firmware/fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot, address is 0x83800000
ModuleID[2] LevelID[10]: Trans Data address is 83800000
ModuleID[2] LevelID[10]: Trans Data address is 83a00000
ModuleID[2] LevelID[10]: Trans Data address is 83c00000
ModuleID[2] LevelID[10]: Trans Data address is 83e00000
ModuleID[2] LevelID[10]: Trans Data address is 84000000
ModuleID[2] LevelID[10]: PortMgrDlg(0)--Command Load excute successfully, retry count: 0
ModuleID[2] LevelID[10]: ExecuteCommand--Load[WndIndex:0], File is ./Profiles/Linux/OS Firmware/firmware/zImage-imx6sx-sdb-emmc.dtb, address is 0x83000000
ModuleID[2] LevelID[10]: Trans Data address is 83000000
ModuleID[2] LevelID[10]: PortMgrDlg(0)--Command Load excute successfully, retry count: 0
ModuleID[2] LevelID[10]: ExecuteCommand--Jump[WndIndex:0]
ModuleID[2] LevelID[10]: *********MxHidDevice[0x7f9a08002970] Jump to Ramkernel successfully!**********
ModuleID[2] LevelID[10]: ExecuteCommand--Boot[WndIndex:0], File is ./Profiles/Linux/OS Firmware/firmware/u-boot-imx6sxsabresd_emmc.imx
ModuleID[2] LevelID[1]: Failed to initialize memory!
ModuleID[2] LevelID[1]: PortMgrDlg(0)--MxHidDevice--Command Boot excute failed
Hi Victor
mfg tool is not more officially supported, suggested to migrate to uuu
tool GitHub - NXPmicro/mfgtools: Freescale/NXP I.MX Chip image deploy tools. .
For mfg tool support suggest to proceed with help of
Commercial Support and Engineering Services | NXP
Best regards
igor
Thanks Igor,
I'll give "uuu" a try as a first option, and we are open to use commercial support as second option.
Regards, and thanks for your support,
Hi Victor
"'Failed to Initialize memory!'" error means that
mfg tool has files for Sabre SD board, but for custom board it is necessary to update
Mfg Tool firmware with new ddr calibration coefficients found from ddr test for that board.
i.MX6/7 DDR Stress Test Tool V3.00
Update coefficients in
imximage.cfg\mx6sxsabresd\freescale\board - uboot-imx - i.MX U-Boot
rebuild Mfg Tool firmware (files in ../firmware folder, fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot).
For rebuilding use sect.6.2 Manufacturing Tool, MFGTool attached Yocto Guide.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------