AnsweredAssumed Answered

Unable to run Mfgtool to the end

Question asked by Marco Oman on Feb 21, 2018
Latest reply on Feb 22, 2018 by Marco Oman

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

Outcomes