mfgtool fsl_updater driver

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

mfgtool fsl_updater driver

825 Views
rakesh3
Contributor V

i am using the imx6 quad smart board and using the mfgtool to flash the kernel, dtb and uboot in device. 

Here we are using the UTP to transfer the data from mfgtool to device. But seems it has support for only kernel 4.9 kernel . We are using the 5.10 linux kernel there i dont find the FSL_UTP driver.

I have ported the UUT driver in kernel 5.10 but still facing ssue like UTP is not able to receive the data from mfgtool.

Do you have the patch available to support the UUT driver in kernel 5.10. 

Please help me on this issue.

 

Regards,

Rakesh

0 Kudos
6 Replies

803 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Unfortunately no, please note that MFGTool was replaced by the new tool UUU which has the same functionality, so you may take a look at it:
https://github.com/nxp-imx/mfgtools/wiki

Best regards,
Aldo.

0 Kudos

791 Views
rakesh3
Contributor V

Hi Aldo,

 

Thanks for your response, as per given link and document i have followed the same. 

I am trying to Migrate from mfgtool ucl2.xml to UUU script as mentioned in this doc. 

uuu_version 1.4.149

SDP: boot -f u-boot-dtb.imx

SDPU: delay 1000

SDPU: write -f u-boot-dtb.imx -offset 0x57c00

SDPU: jump

FB: ucmd setenv fastboot_dev mmc3

FB: ucmd setenv mmcdev ${emmc_dev}

FB: ucmd mmc dev ${emmc_dev}

FB: flash bootloader u-boot-dtb.imx

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

FB: ucmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0

while running above command i am getting the error at u-boot time as 

## Error: illegal character '='in variable name "emmc_dev=3" .

and 2nd issue i am getting while running the below command in same uuu script 

FB: ucmd download -f zImage

getting below error 

## Checking Image at 12c00000 ...
Unknown image format!
Run fastboot ...
Unknown command 'download' - try 'help'

I am following the UUU.pdf page - 18

Could you help me in this.

 

Regards,

Rakesh

Tags (1)
0 Kudos

761 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

I believe that you're trying to flash eMMC, correct?

Then you may try with attached script just replace the macros with the actual file names.

Best regards,
Aldo.

0 Kudos

758 Views
rakesh3
Contributor V

Thanks Aldo for giving a reference file.

Yes , I am trying to flash the eMMC card.

But on using this i am gettting below error in terminal.

MMC write: dev # 3, block # 2, count 1174 ... 1174 blocks written: OK
Writing 'bootloader' DONE!
Starting download of 9370200 bytes
.......................................................................
downloading of 9370200 bytes finished
Starting download of 49907 bytes

downloading of 49907 bytes finished
Starting download of 8597530 bytes
.................................................................
downloading of 8597530 bytes finished
Unknown command '0x12000000' - try 'help'.

i think i am getting this error after below steps.

FB: acmd ${kboot} ${loadaddr} ${initrd_addr} ${fdt_addr}

i tried with below command also just for testing.

FB: acmd bootz ${loadaddr} ${initrd_addr} ${fdt_addr}

but getting below error.

U-Boot 2021.04-00008-gc82ada42e5-dirty (Feb 20 2023 - 20:00:23 +0530)

 

CPU:   i.MX6D rev1.6 at 792MHz
CPU:   Industrial temperature grade (-40C to 105C) at 40C
Reset cause: POR
Model: Freescale i.MX6 Quad SABRE Smart Device Board
Board: MX6-Horizon
DRAM:  1 GiB
PMIC: PFUZE100! DEV_ID=0x10 REV_ID=0x21
MMC:   FSL_SDHC: 1, FSL_SDHC: 2, FSL_SDHC: 3
In:    serial
Out:   serial
Err:   serial
flash target is MMC:3
Net:   FEC [PRIME]
Fastboot: Normal
Boot from USB for mfgtools
*** Warning - Use default environment for                                mfgtools
, using default environment

 

Run bootcmd_mfg: run mfgtool_args; if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr};else bootz ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot 0; fi;
Hit any key to stop autoboot:  0

 

## Checking Image at 12c00000 ...
Unknown image format!
Run fastboot ...
Starting download of 601088 bytes
....
downloading of 601088 bytes finished
writing to partition 'bootloader'
Initializing 'bootloader'
switch to partitions #1, OK
mmc3(part 1) is current device
Writing 'bootloader'

 

MMC write: dev # 3, block # 2, count 1174 ... 1174 blocks written: OK
Writing 'bootloader' DONE!
Starting download of 9370200 bytes
.......................................................................
downloading of 9370200 bytes finished
Starting download of 49907 bytes

 

downloading of 49907 bytes finished
Starting download of 8597530 bytes
.................................................................
downloading of 8597530 bytes finished
Kernel image @ 0x12000000 [ 0x000000 - 0x8efa58 ]
## Loading init Ramdisk from Legacy Image at 12c00000 ...
   Image Name:   fsl-image-mfgtool-initramfs-imx6
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    8597466 Bytes = 8.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
hab fuse not enabled

 

Authenticate image from DDR location 0x12000000...
bad magic magic=0xc1 length=0x5000 version=0x2
bad length magic=0xc1 length=0x5000 version=0x2
bad version magic=0xc1 length=0x5000 version=0x2
Error: Invalid IVT structure

 

Allowed IVT structure:
IVT HDR       = 0x4X2000D1
IVT ENTRY     = 0xXXXXXXXX
IVT RSV1      = 0x0
IVT DCD       = 0x0
IVT BOOT_DATA = 0xXXXXXXXX
IVT SELF      = 0xXXXXXXXX
IVT CSF       = 0xXXXXXXXX
IVT RSV2      = 0x0
No gpc device node -9, force to ldo-enable.
No PMIC found!

 

Starting kernel ...

 

Please suggest me on this issue on Unknown command and this Authentication check, how to correct the DCD IVT header 

Regards,

Rakesh

0 Kudos

742 Views
AldoG
NXP TechSupport
NXP TechSupport

Hi,

Please run the script using the -V option enabled and share both UART and tool logs.
$ sudo uuu -V example_kernel_emmc.uuu

Best regards,
Aldo.

0 Kudos

734 Views
rakesh3
Contributor V

below is the tool o/p.

uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.243-0-ged48c51

Build in config:
Pctl Chip Vid Pid BcdVersion
==================================================
SDPS: MX8QXP 0x1fc9 0x012f [0x0002..0xffff]
SDPS: MX8QM 0x1fc9 0x0129 [0x0002..0xffff]
SDPS: MX8DXL 0x1fc9 0x0147
SDPS: MX28 0x15a2 0x004f
SDPS: MX815 0x1fc9 0x013e
SDPS: MX865 0x1fc9 0x0146
SDPS: MX8ULP 0x1fc9 0x014a
SDPS: MX8ULP 0x1fc9 0x014b
SDPS: MX93 0x1fc9 0x014e
SDP: MX7D 0x15a2 0x0076
SDP: MX6Q 0x15a2 0x0054
SDP: MX6D 0x15a2 0x0061
SDP: MX6SL 0x15a2 0x0063
SDP: MX6SX 0x15a2 0x0071
SDP: MX6UL 0x15a2 0x007d
SDP: MX6ULL 0x15a2 0x0080
SDP: MX6SLL 0x1fc9 0x0128
SDP: MX7ULP 0x1fc9 0x0126
SDP: MXRT106X 0x1fc9 0x0135
SDP: MX8MM 0x1fc9 0x0134
SDP: MX8MQ 0x1fc9 0x012b
SDPU: SPL 0x0525 0xb4a4 [0x0000..0x04ff]
SDPV: SPL1 0x0525 0xb4a4 [0x0500..0x9998]
SDPV: SPL1 0x1fc9 0x0151 [0x0500..0x9998]
SDPU: SPL 0x0525 0xb4a4 [0x9999..0x9999]
SDPU: SPL 0x3016 0x1001 [0x0000..0x04ff]
SDPV: SPL1 0x3016 0x1001 [0x0500..0x9998]
FBK: 0x066f 0x9afe
FBK: 0x066f 0x9bff
FBK: 0x1fc9 0x0153
FB: 0x0525 0xa4a5
FB: 0x18d1 0x0d02
FB: 0x3016 0x0001
FB: 0x1fc9 0x0152
Wait for Known USB Device Appear...
New USB Device Attached at 2:8
2:8>Start Cmd:SDP: boot -f u-boot-dtb.imx
100%2:8>Okay (1.495s)
New USB Device Attached at 2:8
2:8>Start Cmd:FB: ucmd setenv fastboot_dev mmc
2:8>Okay (0.002s)
2:8>Start Cmd:FB: ucmd setenv mmcdev ${emmc_dev}
2:8>Okay (0.001s)
2:8>Start Cmd:FB: flash bootloader u-boot-dtb.imx
0x400000002:8>Okay (0.181s)
2:8>Start Cmd:FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;
2:8>Okay (0.001s)
2:8>Start Cmd:FB: ucmd setenv emmc_cmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0
2:8>Okay (0s)
2:8>Start Cmd:FB: ucmd if test "${emmc_skip_fb}" != "yes"; then run emmc_cmd; fi
2:8>Okay (0.003s)
2:8>Start Cmd:FB: ucmd setenv emmc_cmd mmc bootbus ${emmc_dev} 2 2 1;
2:8>Okay (0.001s)
2:8>Start Cmd:FB: ucmd if test "${emmc_skip_fb}" != "yes"; then run emmc_cmd; fi
2:8>Okay (0.001s)
2:8>Start Cmd:FB: ucmd setenv fastboot_buffer ${loadaddr}
2:8>Okay (0.001s)
2:8>Start Cmd:FB: download -f zImage
2:8>Okay (0.434s)
2:8>Start Cmd:FB: ucmd setenv fastboot_buffer ${fdt_addr}
2:8>Okay (0.002s)
2:8>Start Cmd:FB: download -f imx6d-gh100-revE.dtb
2:8>Okay (0.016s)
2:8>Start Cmd:FB: ucmd setenv fastboot_buffer ${initrd_addr}
2:8>Okay (0.008s)
2:8>Start Cmd:FB: download -f fsl-image-mfgtool-initramfs-imx6qdlsabresd.cpio.gz.u-boot
2:8>Okay (0.415s)
2:8>Start Cmd:FB: acmd bootz ${loadaddr} ${initrd_addr} ${fdt_addr}
2:8>Okay (0.001s)

below is the o/p of UART:-

U-Boot 2021.04-00008-gc82ada42e5-dirty (Feb 21 2023 - 16:19:19 +0530)

CPU: i.MX6D rev1.6 at 792MHz
CPU: Industrial temperature grade (-40C to 105C) at 42C
Reset cause: WDOG
Model: Freescale i.MX6 Quad SABRE Smart Device Board
Board: MX6-Horizon
DRAM: 1 GiB
PMIC: PFUZE100! DEV_ID=0x10 REV_ID=0x21
MMC: FSL_SDHC: 1, FSL_SDHC: 2, FSL_SDHC: 3
In: serial
Out: serial
Err: serial
flash target is MMC:3
Net: FEC [PRIME]
Fastboot: Normal
Boot from USB for mfgtools
*** Warning - Use default environment for mfgtools
, using default environment

Run bootcmd_mfg: run mfgtool_args; if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr};else bootz ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot 0; fi;
Hit any key to stop autoboot: 0

## Checking Image at 12c00000 ...
Unknown image format!
Run fastboot ...
Starting download of 592896 bytes
....
downloading of 592896 bytes finished
writing to partition 'bootloader'
Initializing 'bootloader'
switch to partitions #1, OK
mmc3(part 1) is current device
Writing 'bootloader'

MMC write: dev # 3, block # 2, count 1158 ... 1158 blocks written: OK
Writing 'bootloader' DONE!
Starting download of 9370200 bytes
.......................................................................
downloading of 9370200 bytes finished
Starting download of 49907 bytes

downloading of 49907 bytes finished
Starting download of 8597530 bytes
.................................................................
downloading of 8597530 bytes finished
Kernel image @ 0x12000000 [ 0x000000 - 0x8efa58 ]
## Loading init Ramdisk from Legacy Image at 12c00000 ...
Image Name: fsl-image-mfgtool-initramfs-imx6
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 8597466 Bytes = 8.2 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
No gpc device node -9, force to ldo-enable.
No PMIC found!

Starting kernel ...

 

it hangs after Starting kernel and showing unknows image format at initramfs address. here we are using the 5.10 kernel u-boot/dtb/zImage and fsl-image-mfgtool-initramfs-imx6qdlsabresd.cpio.gz.u-boot.

I tried manual booting using tftp from u-boot terminal then its booting and working. But using UUU tool, its showing Unknown image format at initramfs address

below is the printenv o/p 

MX6 HORIZON U-Boot > printenv
arch=arm
baudrate=115200
board=mx6_horizon
board_name=HORIZON
board_rev=REV_E
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_efi_bootmgr=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=mmc3
bootcmd=run distro_bootcmd
bootcmd_mfg=run mfgtool_args; if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr};else bootz ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot 0; fi;
bootcmd_mmc3=devnum=3; run mmc_boot
bootdelay=1
console=ttymxc0
cpu=armv7
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
emmc_dev=3
ethact=FEC
ethaddr=1c:88:79:c0:09:2a
ethprime=FEC
fastboot_dev=mmc2
fdt_addr_r=0x18000000
fdtcontroladdr=4ef61200
initrd_addr=0x12C00000
initrd_high=0xffffffff
ipaddr=192.168.1.103
kernel_addr_r=0x12000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
loadaddr=0x12000000
mfgtool_args=setenv bootargs console=ttymxc0,115200 rdinit=/linuxrc g_mass_storage.stall=0 g_mass_storage.removable=1 g_mass_storage.file=/fat g_mass_storage.ro=1 g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF g_mass_storage.iSerialNumber="" enable_wait_mode=off
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
netmask=255.255.255.0
ramdisk_addr_r=0x13000000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplist
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;run boot_efi_bootmgr;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
script_size_f=0x80000
scriptaddr=0x10000000
serial#=ee803ba70e0811d4
serverip=192.168.1.101
soc=mx6
soc_type=imx6q
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
vendor=freescale

Environment size: 3668/8188 bytes

Please suggest on this .

Tags (2)
0 Kudos