Hello!
I use MFGTool 1.6.2.0.42-g92b97ee and uuc-11.09.01 from LTIB, now I try write all components on NAND.
My ucl.xml:
<LIST name="MobileCam-NAND" desc="Flash system on NAND">
<CMD type="boot" body="BootStrap" file ="u-boot_mfg.bin" >Load U-Boot.</CMD>
<CMD type="load" file="uImage" address="0x70800000" loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Load Linux.</CMD>
<CMD type="load" file="initramfs.img" address="0x70B00000" loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Doing Initramfs.</CMD>
<CMD type="jump" >Jumping to OS image.</CMD>
<CMD type="find" body="Updater" timeout="180"/>
<CMD type="push" body="send" file="uImage">Send uImage</CMD>
<CMD type="push" body="$ /root/flash_erase /dev/mtd2 0 0">Erase /dev/mtd2</CMD>
<CMD type="push" body="$ /root/nandwrite -mp /dev/mtd2" file="uImage">Write Linux on /dev/mtd2</CMD>
<CMD type="push" body="$ /root/flash_erase /dev/mtd3 0 0">Erase /dev/mtd3</CMD>
<CMD type="push" body="$ /root/nandwrite -mp /dev/mtd3" file="uImage">Write Linux on /dev/mtd3</CMD>
<CMD type="push" body="$ mkdir /mnt">Create mount point</CMD>
<CMD type="push" body="$ mount -t jffs2 /dev/mtdblock4 /mnt">Mount /dev/mtdblock4 to /mnt</CMD>
<CMD type="push" body="$ rm -rf /mnt/*">Erase /dev/mtdblock4</CMD>
<CMD type="push" body="pipe tar -xv -C /mnt" file="rootfs.tar">Unpack rootfs</CMD>
<CMD type="push" body="$ umount /mnt">Umount /mnt</CMD>
</LIST>
Unfortunally all stopped on first push command.
Via console I not see any error:
UTP: received command '$ /root/flash_erase /dev/mtd2 0 0'
UTP: executing "/root/flash_erase /dev/mtd2 0 0"
Erasing 128 Kibyte @ 3e0000 -- 100 % complete
UTP: sending Success to kernel for command $ /root/flash_erase /dev/mtd2 0 0.
But in log:
Panel A Start <CMD/> type="push" body="$ /root/flash_erase /dev/mtd2 0 0" file="" timeout="10" onError="" text="Erase /dev/mtd2".
1 - Panel A Finished <CMD/> type="push" body="$ /root/flash_erase /dev/mtd2 0 0" file="" timeout="10" onError="" text="Erase /dev/mtd2" FAIL code=-1.
Panel A: failed to run command: type="push" body="$ /root/flash_erase /dev/mtd2 0 0" file="" timeout="10" onError="" text="Erase /dev/mtd2" ,, Error code:-1
I not understand this. I try change all shell command on pipe and this work for flashing Linux, I think, but this not work for unpack rootfs, I always found rootfs in directory /mnt, not on NAND.
I try use flush command for wait mount, unfortunally it not work, uuc not know it:
Panel A Start <CMD/> type="push" body="flush" file="" timeout="10" onError="" text="Wait mount /dev/mtdblock4".
1 - Panel A Finished <CMD/> type="push" body="flush" file="" timeout="10" onError="" text="Wait mount /dev/mtdblock4" FAIL code=-1.
Panel A: failed to run command: type="push" body="flush" file="" timeout="10" onError="" text="Wait mount /dev/mtdblock4" ,, Error code:-1
Why all console commands fail and how can I solve this problem?
Thank you and excuse me my bad englsih.
Maybe it's a hardware issue. I had the same issue, and last the reason we found is hardware interference.
One moment about my configuration - MFGTool work in WindowsXP under VirtualBox, host system Debian GNU/Linux.
Hi Kirill,
Before this issue happen, had you were be able to write a image using mfgtool?
Looking in your log seem the UTP message is arriving and the board confirm the packet is valid. I don't have right now a clear idea why the first push command is failing.
I going to try a similar configuration and check if this issue happens.
Regards,
-Israel.
Hello, Israel!
Unfortunally I can't success story for writing system on NAND via MFGTool, but on seminar I see what MFGtool can write system on SD-card QuickStartBoard-R.
Hi Kirill,
I had been trying to reproduce the issue but i don't got any issue with the push command.
Did you try to reproduce your issue in a PC with Windows as native OS?
Regards,
-Israel.
Hello, Israel!
I will try found PC with Windows for this test.
P.S. May be FreeScale rewrite MfgTool for work on Linux also, e.g. on Qt? I not think what this very hard.
Kirill
Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help, please feel free to reply with an update to this discussion.
Thanks,
Yixing
Hello!
Problem not solved but now I havn't time for this problem.
Kirill,
when you have time to work on this case please let us know to continue with it
Kirill,
Could you post the kernel log?
Looks also you kernel doesn't have USB gadget UTP support.
Regards,
-Israel.
Hello, Israel!
Follow Linux log:
Linux version 2.6.35.3+ (kirill@kirill) (gcc version 4.4.4 (4.4.4_09.06.2010) )4
CPU: ARMv7 Processor [412fc085] revision 5 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Byterg MX53 MobileCam
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 122880
free_area_init_node: node 0, pgdat 804722bc, node_mem_map 80e84000
DMA zone: 224 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 28448 pages, LIFO batch:7
Normal zone: 2336 pages used for memmap
Normal zone: 91872 pages, LIFO batch:31
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 120320
Kernel command line: console=ttymxc1,115200 rdinit=/linuxrc root=/dev/mtdblock4t
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 224MB 256MB = 480MB total
Memory: 478932k/478932k available, 12588k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xf8e00000 - 0xffe00000 ( 112 MB)
vmalloc : 0xd0800000 - 0xf4000000 ( 568 MB)
lowmem : 0x80000000 - 0xd0000000 (1280 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.init : 0x80008000 - 0x80028000 ( 128 kB)
.text : 0x80028000 - 0x80425000 (4084 kB)
.data : 0x8043c000 - 0x80473020 ( 221 kB)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:368
MXC GPIO hardware
MXC IRQ initialized
MXC_Early serial console at MMIO 0x53fc0000 (options '115200')
bootconsole [ttymxc1] enabled
Calibrating delay loop... 159.74 BogoMIPS (lpj=798720)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
devtmpfs: initialized
regulator: core version 0.5
NET: Registered protocol family 16
i.MX IRAM pool: 128 KB@0xd0840000
IRAM READY
CPU is i.MX53 Revision 2.1
Using SDMA I.API
MXC DMA API initialized
IMX usb wakeup probe
the wakeup pdata is 0x80449608
IMX usb wakeup probe
the wakeup pdata is 0x804496bc
bio: create slab <bio-0> at 0
SCSI subsystem initialized
libata version 3.00 loaded.
Freescale USB OTG Driver loaded, $Revision: 1.55 $
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
24bit read error, ret = -5
Switching to clocksource mxc_timer1
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Unpacking initramfs...
Freeing initrd memory: 3596K
LPMode driver module loaded
Static Power Management for Freescale i.MX5
PM driver module loaded
sdram autogating driver module loaded
Bus freq driver module loaded
mxc_dvfs_core_probe
mxc_dvfs_core_probe: failed to get gp regulator
DVFS driver module loaded
i.MXC CPU frequency driver
mxc_cpufreq_driver_init: failed to get gp regulator
DVFS PER driver module loaded
NTFS driver 2.1.29 [Flags: R/W].
JFFS2 version 2.2. (NAND) �� 2001-2006 Red Hat, Inc.
fuse init (API version 7.14)
msgmni has been set to 942
alg: No test for stdrng (krng)
cryptodev: driver loaded.
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: MXC Internal UART driver
mxcintuart.0: ttymxc0 at MMIO 0x53fbc000 (irq = 31) is a Freescale i.MX
mxcintuart.1: ttymxc1 at MMIO 0x53fc0000 (irq = 32) is a Freescale i.MX
console [ttymxc1] enabled, bootconsole disabled
mxcintuart.2: ttymxc2 at MMIO 0x5000c000 (irq = 33) is a Freescale i.MX
mxcintuart.3: ttymxc3 at MMIO 0x53ff0000 (irq = 13) is a Freescale i.MX
mxcintuart.4: ttymxc4 at MMIO 0x63f90000 (irq = 86) is a Freescale i.MX
Wait for CR ACK error!
ahci: probe of ahci.0 failed with error -5
MXC MTD nand Driver 3.0
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xba (Micron NAND 256MiB 1,8V 16-b)
Bad block table found at page 1048512, version 0x01
Bad block table found at page 1048448, version 0x01
RedBoot partition parsing not available
Creating 6 MTD partitions on "NAND 256MiB 1,8V 16-bit":
0x000000000000-0x000001000000 : "bootloader"
0x000001000000-0x000001080000 : "params"
0x000001080000-0x000001480000 : "kernel"
0x000001480000-0x000001880000 : "kernel2"
0x000001880000-0x000009880000 : "filesystem"
0x000009880000-0x000080000000 : "filesystem2"
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
fsl-ehci fsl-ehci.0: irq 18, io base 0x53f80000
fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
fsl-ehci fsl-ehci.1: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.1: new USB bus registered, assigned bus number 2
fsl-ehci fsl-ehci.1: irq 14, io base 0x53f80200
fsl-ehci fsl-ehci.1: USB 2.0 started, EHCI 1.00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
ARC USBOTG Device Controller driver (1 August 2005)
i2c /dev entries driver
Linux video capture interface: v2.00
mxc_v4l2_output mxc_v4l2_output.0: Registered device video0
APM Battery Driver
MXC WatchDog Driver 2.0
MXC Watchdog # 0 Timer: initial timeout 60 sec
PMIC Character device: successfully loaded
VPU initialized
gpu mmu enabled
mxsdhci: MXC Secure Digital Host Controller Interface driver
mxsdhci: MXC SDHCI Controller Driver.
mmc0: SDHCI detect irq 0 irq 1 INTERNAL DMA
TCP cubic registered
NET: Registered protocol family 17
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 2
Freeing init memory: 128K
mmc0: new high speed SDHC card at address 0007
mmcblk0: mmc0:0007 SD32G 29.3 GiB
mmcblk0: p1
USB Host suspend begins
will suspend roothub and its children
ehci_fsl_bus_suspend, DR
host suspend ends
ehci_fsl_bus_suspend, Host 1
check_parameters:UTP settings are in place now, overriding defaults
g_file_storage gadget: File-backed Storage Gadget, version: 20 November 2008
g_file_storage gadget: Number of LUNs=1
Suspend udc for OTG auto detect
USB Gadget resume begins
dr_controller_run: udc out low power mode
USB Gadget resume ends
fsl-usb2-udc: bind to driver g_file_storage
g_file_storage gadget: high speed config #1
And UTP log:
UTP: received command 'send'
UTP: sending Success to kernel for command send.
UTP: received command '$ /root/flash_system.sh -Ll $FILE'
UTP: executing "/root/flash_system.sh -Ll $FILE"
Write Linux on NAND /dev/mtd2
Erasing 128 Kibyte @ 3e0000 -- 100 % complete
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000
Writing data to block 5 at offset 0xa0000
Writing data to block 6 at offset 0xc0000
Writing data to block 7 at offset 0xe0000
Writing data to block 8 at offset 0x100000
Writing data to block 9 at offset 0x120000
Writing data to block 10 at offset 0x140000
Writing data to block 11 at offset 0x160000
Writing data to block 12 at offset 0x180000
Writing data to block 13 at offset 0x1a0000
Writing data to block 14 at offset 0x1c0000
Writing data to block 15 at offset 0x1e0000
Writing data to block 16 at offset 0x200000
Writing data to block 17 at offset 0x220000
Write second Linux on NAND /dev/mtd3
Erasing 128 Kibyte @ 3e0000 -- 100 % complete
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000
Writing data to block 5 at offset 0xa0000
Writing data to block 6 at offset 0xc0000
Writing data to block 7 at offset 0xe0000
Writing data to block 8 at offset 0x100000
Writing data to block 9 at offset 0x120000
Writing data to block 10 at offset 0x140000
Writing data to block 11 at offset 0x160000
Writing data to block 12 at offset 0x180000
Writing data to block 13 at offset 0x1a0000
Writing data to block 14 at offset 0x1c0000
Writing data to block 15 at offset 0x1e0000
Writing data to block 16 at offset 0x200000
Writing data to block 17 at offset 0x220000
UTP: sending Success to kernel for command $ /root/flash_system.sh -Ll $FILE.
Hello, Israel!
I can post kernel log, but I think you not right because first post contained UTP console output:
UTP: received command '$ /root/flash_erase /dev/mtd2 0 0'
UTP: executing "/root/flash_erase /dev/mtd2 0 0"
Erasing 128 Kibyte @ 3e0000 -- 100 % complete
UTP: sending Success to kernel for command $ /root/flash_erase /dev/mtd2 0 0.
flash_erase operation may require some time. Perhaps the problem is caused by timeout in communications
between MFG and updater. Please try to use parameter "timeout" in push CMD in order to prolong waiting.
Hello, Yuri!
From log:
1 - Panel A Finished <CMD/> type="push" body="$ /root/flash_erase /dev/mtd2 0 0" file="" timeout="10" onError="" text="Erase /dev/mtd2" FAIL code=-1.
flash_erase work time is less then 10 sec, it work 1 sec
I also try simple command, e.g. "echo Write complete!" and it also stop with error.
Kirill
Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help please feel free to contact Freescale.
Thanks,
Yixing
Hello, Yixing Kong!
Unfortunally problem not solved, but I not try solve it again after my last post.
Kirill
Freescale experter had below comment:
"Wait for pipe finish transfer before umount."
If yu still have any further questions please reply this message by an update.
Thanks,
Yixing
Hello, Yixing!
I try return to this problem on next week and recheck all my steps.