Unable to run Mfgtool to the end

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

Unable to run Mfgtool to the end

1,530 Views
marcooman
Contributor II

Hi to all,

I am trying to use the Mfgtool on a QWKS-SCMIMX6DQ but it stops on the last step, in my case write the root file system on the SD card. All the rest works (loads uboot for mfgtool, the kernel, starts the kernel and writes the SD partition table, kernel and dtd are written correctly on the fat partition of the SD.

Then it fails on the command

    <CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mmcblk%mmc%p2" file="files/rootfs_imx%soc%.tar.bz2" ifdev="MX6Q">Sending and writting rootfs</CMD>

This is a excerpt from the log:

... (lots of files expanded correctly)
./usr/lib/python2.7/decimal.pyc
tar: short read
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00008d00
CPU0: stopping

or

...

./usr/lib/libnl/cli/qdisc/pfifo.so
tar: invalid tar magic
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00008d00

I have tried to untar the root file system manually (so stopped the procedure, placed the SD on a card reader and executed the command on a linux box) and the result is OK: the system boots normally. Then I made some experiments like writing my image first and then unzip it but does not work. Does not work even if I split the image in chunks. I have tried 12MB ckunk transfer like this:

     <CMD state="Updater" type="push" body="send" file="files/chunka">Sending Device Tree file</CMD>
     <CMD state="Updater" type="push" body="$ cp $FILE /mnt/mmcblk%mmc%p2/chunka">Write chunk</CMD>
     <CMD state="Updater" type="push" body="$ sync</CMD>

The result is that I have 4 chunks on the SD and then just two of them gets written (see the log below)

I am under the impression that there is something wrong with the SD card, but really have no clue at what to try now. I have already tried both the images/uboot/kernel available on Mfgtool and the ones built with yocto. The result is the same.

UTP: received command 'send'
UTP: sending Success to kernel for command send.
UTP: received command '$ cp $FILE /mnt/mmcblk2p2/chunkaa'
UTP: executing "cp $FILE /mnt/mmcblk2p2/chunkaa"
UTP: sending Success to kernel for command $ cp $FILE /mnt/mmcblk2p2/chunkaa.
utp_poll: pass returned.
UTP: received command '$ sync'
UTP: executing "sync"
UTP: sending Success to kernel for command $ sync.
utp_poll: pass returned.
UTP: received command '$ sleep 2'
UTP: executing "sleep 2"
UTP: sending Success to kernel for command $ sleep 2.
utp_poll: pass returned.
UTP: received command 'send'
UTP: sending Success to kernel for command send.
UTP: received command '$ cp $FILE /mnt/mmcblk2p2/chunkab'
UTP: executing "cp $FILE /mnt/mmcblk2p2/chunkab"
UTP: sending Success to kernel for command $ cp $FILE /mnt/mmcblk2p2/chunkab.
utp_poll: pass returned.
UTP: received command '$ sync'
UTP: executing "sync"
UTP: sending Success to kernel for command $ sync.
utp_poll: pass returned.
UTP: received command '$ sleep 2'
UTP: executing "sleep 2"
UTP: sending Success to kernel for command $ sleep 2.
utp_poll: pass returned.
UTP: received command 'send'
UTP: sending Success to kernel for command send.
UTP: received command '$ cp $FILE /mnt/mmcblk2p2/chunkac'
UTP: executing "cp $FILE /mnt/mmcblk2p2/chunkac"
EXT3-fs error (device mmcblk2p2): ext3_free_branches: Read failure, inode=14, block=2223618083
EXT3-fs error (device mmcblk2p2): ext3_free_branches: Read failure, inode=14, block=2604405381
EXT3-fs error (device mmcblk2p2): ext3_free_branches: Read failure, inode=14, block=1661711175
EXT3-fs error (device mmcblk2p2): ext3_free_branches: Read failure, inode=14, block=2941741158
EXT3-fs error (device mmcblk2p2): ext3_free_branches: Read failure, inode=14, block=2176207791

Labels (1)
0 Kudos
Reply
3 Replies

1,046 Views
igorpadykov
NXP Employee
NXP Employee

Hi Marco

one can try with Demo Images:

Board Support Packages (3)
Demo Images - QWKS Board based on SCM-i.MX 6D/Q

Quick Start Board for SCM-i.MX 6DQ|NXP 

also one can try with other sd card or try to change partition sizes in

mfg tool ..OS Firmware/mksdcard.sh.tar

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,046 Views
marcooman
Contributor II

I tried several cards and event filesystems (actually just ext4 and ext2; I'd like to try jffs2 but I guess it needs a different initramfs).

Ext2 seems to go a bit further but it fails anyway.

I managed to have mfgtool working in two ways:

1: By using core-image-minimal: it's below 3MB and works out of the box

OR

2. By using  the bottom SD slot (the large one). This requires just a little fix to the .vbs file to set mmc=1 instead of 2

0 Kudos
Reply

1,046 Views
marcooman
Contributor II

I must add that solution 2. seems rather fragile

0 Kudos
Reply