AnsweredAssumed Answered

MFGTOOL "sh: mtdwrite: not found"

Question asked by Aditya Patil on Jan 10, 2018
Latest reply on Jan 11, 2018 by igorpadykov

Hi, 

1. I am working on a custom board using im287 and linux-2.6.35.3

2. The NAND flash (MT29F1G08ABBDAHC-IT:D) and RAM (MT47H128M16RT-25E) are custom.

3. I have modified u-boot source and kernel source to support for my NAND chip.

4. The rootfs format is ubifs.

5. Right now by u-boot command-line, I upload the kernel image and rootfs by tftp. They can boot up 

6. The problem is - I can only install u-boot by MfgTool.

7. If I try to install u-boot + kernel + rootfs the tool fails

8. I need some help for it so I can install all by MfgTool

 

 

LOG:

FRAC 0x92925552
Wait for ddr ready 1bank count is 8
power 0x00820616
Frac 0x92925552
start change cpu freq
hbus 0x00000003
cpu 0x00010001
start test memory access
ddr2 0x40000000
finish simple test
finish boot prep,start to run ...
setting pin low
LLLLLLFLCLFLLJUncompressing Linux... done, booting the kernel.
Linux version 2.6.35.3-571-gcca29a0 (aditya@aditya-PC) (gcc version 4.4.4 (4.4.4_09.06.2010) ) #15 Mon Mar 13 18:13:58 CST 2017
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Freescale MX28EVK board
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: gpmi=g console=ttyAM0,115200n8 ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs  fec_mac= ethact mem=128M
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 120204k/120204k available, 10868k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xfde00000 - 0xffe00000   (  32 MB)
    vmalloc : 0xc8800000 - 0xf0000000   ( 632 MB)
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc0028000   ( 128 kB)
      .text : 0xc0028000 - 0xc031d000   (3028 kB)
      .data : 0xc031e000 - 0xc033d9e0   ( 127 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:288
Console: colour dummy device 80x30
console [ttyAM0] enabled
Calibrating delay loop... 226.09 BogoMIPS (lpj=1130496)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
regulator: core version 0.5
NET: Registered protocol family 16
regulator: vddd: 800 <--> 1575 mV at 1500 mV fast normal
regulator: vdddbo: 800 <--> 1575 mV fast normal
regulator: vdda: 1500 <--> 2275 mV at 1800 mV fast normal
vddio = 3380000, val=10
regulator: vddio: 2880 <--> 3680 mV at 3380 mV fast normal
regulator: overall_current: fast normal
regulator: vbus5v:
regulator: mxs-duart-1: fast normal
regulator: mxs-bl-1: fast normal
regulator: mxs-i2c-1: fast normal
regulator: mmc_ssp-1: fast normal
regulator: mmc_ssp-2: fast normal
regulator: charger-1: fast normal
regulator: power-test-1: fast normal
regulator: cpufreq-1: fast normal
** kernel for EasyARM-i.MX280
i.MX IRAM pool: 120 KB@0xc8820000
Initializing GPMI pins
add device pwm chanel 3
add device pwm chanel 4
add device pwm chanel 7
usb DR wakeup device is registered
IMX usb wakeup probe
audit: cannot initialize inotify handle
bio: create slab <bio-0> at 0
SCSI subsystem initialized
Switching to clocksource mxs clock source
Boot process: init
NET: Registered protocol family 1
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 6144K
Boot process: fb dev not inited, boot process not start!
Bus freq driver module loaded
mxs_cpu_init: cpufreq init finished
audit: initializing netlink socket (disabled)
type=2000 audit(1.800:1): initialized
JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
msgmni has been set to 246
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered (default)
baclight_device easy283-pwm.3 register succcessed
init_pwm ch 3
baclight_device easy283-pwm.4 register succcessed
init_pwm ch 4
baclight_device easy283-pwm.7 register succcessed
init_pwm ch 7
set dclk 8000000 Hz,real lcd clk=8000000 Hz
Console: switching to colour frame buffer device 60x34
set dclk 8000000 Hz,real lcd clk=8000000 Hz
mxs-duart.0: ttyAM0 at MMIO 0x80074000 (irq = 47) is a DebugUART
mxs-auart.0: ttySP0 at MMIO 0x8006a000 (irq = 112) is a mxs-auart.0
Found APPUART 3.1.0
mxs-auart.1: ttySP1 at MMIO 0x8006c000 (irq = 113) is a mxs-auart.1
Found APPUART 3.1.0
mxs-auart.2: ttySP2 at MMIO 0x8006e000 (irq = 114) is a mxs-auart.2
Found APPUART 3.1.0
mxs-auart.3: ttySP3 at MMIO 0x80070000 (irq = 115) is a mxs-auart.3
Found APPUART 3.1.0
mxs-auart.4: ttySP4 at MMIO 0x80072000 (irq = 116) is a mxs-auart.4
Found APPUART 3.1.0
brd: module loaded
loop: module loaded
Loading iSCSI transport class v2.0-870.
GPIO NAND driver, �© 2004 Simtec Electronics
i.MX GPMI NFC
NFC: Version 1, 8-chip GPMI and BCH
Boot ROM: Version 1, Single-chip boot area, block mark swapping supported
Scanning for NAND Flash chips...
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xa1 (Micron NAND-new 128MiB 1,8V 8-bit)
-----------------------------
NAND Flash Device Information
-----------------------------
Manufacturer      : Micron (0x2c)
Device Code       : 0xa1
Cell Technology   : SLC
Chip Size         : 128 MiB
Pages per Block   : 64
Page Geometry     : 2048+64
ECC Strength      : 4 bits
ECC Size          : 512 B
Data Setup Time   : 15 ns
Data Hold Time    : 15 ns
Address Setup Time: 20 ns
GPMI Sample Delay : 6 ns
tREA              : Unknown
tRLOH             : Unknown
tRHOH             : Unknown
Description       : NEWFLASH-2
-----------------
Physical Geometry
-----------------
Chip Count             : 1
Page Data Size in Bytes: 2048 (0x800)
Page OOB Size in Bytes : 64
Block Size in Bytes    : 131072 (0x20000)
Block Size in Pages    : 64 (0x40)
Chip Size in Bytes     : 134217728 (0x8000000)
Chip Size in Pages     : 65536 (0x10000)
Chip Size in Blocks    : 1024 (0x400)
Medium Size in Bytes   : 134217728 (0x8000000)
------------
NFC Geometry
------------
ECC Algorithm          : BCH
ECC Strength           : 8
Page Size in Bytes     : 2112
Metadata Size in Bytes : 10
ECC Chunk Size in Bytes: 512
ECC Chunk Count        : 4
Payload Size in Bytes  : 2048
Auxiliary Size in Bytes: 16
Auxiliary Status Offset: 12
Block Mark Byte Offset : 1999
Block Mark Bit Offset  : 0
-----------------
Boot ROM Geometry
-----------------
Boot Area Count            : 1
Boot Area Size in Bytes    : 20971520 (0x1400000)
Stride Size in Pages       : 64
Search Area Stride Exponent: 2
Scanning device for bad blocks
Boot area protection is enabled.
Creating 2 MTD partitions on "gpmi-nfc-main":
0x000000000000-0x000001400000 : "gpmi-nfc-0-boot"
0x000001400000-0x000008000000 : "gpmi-nfc-general-use"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "gpmi-nfc-general-use"
UBI: MTD device size:            108 MiB
UBI: number of good PEBs:        864
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 864
UBI: number of PEBs reserved for bad PEB handling: 8
UBI: max/mean erase counter: 2/1
UBI: image sequence number: 0
UBI: background thread "ubi_bgt0d" started, PID 1633
 ubiblka: unknown partition table
ARC USBOTG Device Controller driver (1 August 2005)
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
fsl-usb2-udc: bind to driver g_file_storage
mice: PS/2 mouse device common for all mice
input: mxs-kbd as /devices/platform/mxs-kbd.0/input/input0
input: MXS touchscreen as /devices/virtual/input/input1
MXS RTC driver v1.0 hardware v2.3.0
g_file_storage gadget: high speed config #1
mxs-rtc mxs-rtc.0: rtc core: registered mxs-rtc as rtc0
This is 5V only build.
mxs-mmc: MXS SSP Controller MMC Interface driver
NET: Registered protocol family 17
NET: Registered protocol family 15
mxs-rtc mxs-rtc.0: setting system clock to 1970-01-01 00:09:10 UTC (550)
Freeing init memory: 128K
init started: BusyBox v1.15.0 ()
starting pid 1705, tty '': '/etc/rc.d/rcS'
Mounting /proc and /sys
mount: mounting tmpfs on /dev failed: Invalid argument
mknod: /dev/console: File exists
Starting the hotplug events dispatcher udevd
Synthesizing initial hotplug events
Setting the hostname to freescale
Mounting filesystems
no mount -n -t tmpfs shm /dev/shm
no mount -n -t tmpfs rwfs /mnt/rwfs -o size=512k
*
*
mount: mounting usbfs on /proc/bus/usb failed: No such file or directory
no mount tmpfs /tmp -t tmpfs -o size=16m
Starting inetd:
uuc 0.4 [built Feb 21 2014 08:19:00]
UTP: Waiting for device to appear
UTP: file/device node /dev/utp already exists
cpu_id is 28
UTP: received command 'mknod class/mtd,mtd0,/dev/mtd0'
class = 'class/mtd'
item = 'mtd0'
node = /dev/mtd0
type = (null)
UTP: running utp_mk_devnode(class/mtd,mtd0,/dev/mtd0,0x2000)
UTP: file/device node /dev/mtd0 already exists
UTP: sending Success
g_file_storage gadget: high speed config #1
UTP: received command 'mknod class/mtd,mtd1,/dev/mtd1'
class = 'class/mtd'
item = 'mtd1'
node = /dev/mtd1
type = (null)
UTP: running utp_mk_devnode(class/mtd,mtd1,/dev/mtd1,0x2000)
UTP: file/device node /dev/mtd1 already exists
UTP: sending Success
UTP: received command 'mknod class/misc,ubi_ctrl,/dev/ubi_ctrl'
class = 'class/misc'
item = 'ubi_ctrl'
node = /dev/ubi_ctrl
type = (null)
UTP: running utp_mk_devnode(class/misc,ubi_ctrl,/dev/ubi_ctrl,0x2000)
UTP: file/device node /dev/ubi_ctrl already exists
UTP: sending Success
UTP: received command '$ flash_eraseall /dev/mtd0'
UTP: sending Busy
UTP: executing "flash_eraseall /dev/mtd0"
Erasing 128 Kibyte @ 1400000 -- 100 % complete.
UTP: sending Success
UTP: received command '$ flash_eraseall /dev/mtd1'
UTP: sending Busy
UTP: executing "flash_eraseall /dev/mtd1"
Erasing 128 Kibyte @ 6c00000 -- 100 % complete.
UTP: sending Success
UTP: received command 'send'
UTP: sending Success
UTP: received command '$ kobs-ng init -v $FILE'
UTP: sending Busy
UTP: executing "kobs-ng init -v $FILE"
MTD CONFIG:
  chip_0_device_path = "/dev/mtd0"
  chip_1_device_path = "(null)"
  search_exponent = 2
  data_setup_time = 80
  data_hold_time = 60
  address_setup_time = 25
  data_sample_time = 6
  row_address_size = 3
  column_address_size = 2
  read_command_code1 = 0
  read_command_code2 = 48
  boot_stream_major_version = 1
  boot_stream_minor_version = 0
  boot_stream_sub_version = 0
  ncb_version = 3
  boot_stream_1_address = 0
  boot_stream_2_address = 0
/tmp/file.utp: is a valid bootstream for key '187f1200f0d80140dc3d0140b0e10440'
mtd: opening: "/dev/mtd0"
NFC Geometry
  ECC Algorithm          : BCH
  ECC Strength           : 8
  Page Size in Bytes     : 2112
  Metadata Size in Bytes : 10
  ECC Chunk Size in Bytes: 512
  ECC Chunk Count        : 4
  Payload Size in Bytes  : 2048
  Auxiliary Size in Bytes: 16
  Auxiliary Status Offset: 12
  Block Mark Byte Offset : 1999
  Block Mark Bit Offset  : 0
mtd: opened '/dev/mtd0' - '(null)'
mtd: max_boot_stream_size_in_bytes = 9961472
mtd: boot_stream_size_in_bytes = 335568
mtd: #1 0x00100000 - 0x00a80000 (0x00151ed0)
mtd: #2 0x00a80000 - 0x01400000 (0x00ad1ed0)
  m_u32Checksum = 0
  m_u32FingerPrint = 541213510
  m_u32Version = 16777216
FCB
  m_NANDTiming.m_u8DataSetup = 80
  m_NANDTiming.m_u8DataHold = 60
  m_NANDTiming.m_u8AddressSetup = 25
  m_NANDTiming.m_u8DSAMPLE_TIME = 6
  m_u32DataPageSize = 2048
  m_u32TotalPageSize = 2112
  m_u32SectorsPerBlock = 64
  m_u32NumberOfNANDs = 0
  m_u32TotalInternalDie = 0
  m_u32CellType = 0
  m_u32EccBlockNEccType = 4
  m_u32EccBlock0Size = 512
  m_u32EccBlockNSize = 512
  m_u32EccBlock0EccType = 4
  m_u32MetadataBytes = 10
  m_u32NumEccBlocksPerPage = 3
  m_u32EccBlockNEccLevelSDK = 0
  m_u32EccBlock0SizeSDK = 0
  m_u32EccBlockNSizeSDK = 0
  m_u32EccBlock0EccLevelSDK = 0
  m_u32NumEccBlocksPerPageSDK = 0
  m_u32MetadataBytesSDK = 0
  m_u32EraseThreshold = 0
  m_u32BootPatch = 0
  m_u32PatchSectors = 0
  m_u32Firmware1_startingSector = 512
  m_u32Firmware2_startingSector = 5376
  m_u32SectorsInFirmware1 = 164
  m_u32SectorsInFirmware2 = 164
  m_u32DBBTSearchAreaStartAddress = 256
  m_u32BadBlockMarkerByte = 1999
  m_u32BadBlockMarkerStartBit = 0
  m_u32BBMarkerPhysicalOffset = 2048
  m_u32NumberBB = 102317136
  m_u32Number2KPagesBB = 0
Firmware: image #0 @ 0x100000 size 0x52000 - available 0x980000
Firmware: image #1 @ 0xa80000 size 0x52000 - available 0x980000
NCB versions differ, 3 is used.
mtd: erasing @0:0x0-0x20000
mtd: Writing FCB0 @0:0x0(840)
mtd: erasing @0:0x20000-0x20000
mtd: Writing FCB1 @0:0x20000(840)
mtd: erasing @0:0x40000-0x20000
mtd: Writing FCB2 @0:0x40000(840)
mtd: erasing @0:0x60000-0x20000
mtd: Writing FCB3 @0:0x60000(840)
mtd: erasing @0:0x0-0x20000
mtd: Writing FCB0 @0:0x0(840)
mtd: erasing @0:0x20000-0x20000
mtd: Writing FCB1 @0:0x20000(840)
mtd: erasing @0:0x40000-0x20000
mtd: Writing FCB2 @0:0x40000(840)
mtd: erasing @0:0x60000-0x20000
mtd: Writing FCB3 @0:0x60000(840)
mtd_commit_bcb(FCB): status 0
mtd: erasing @0:0x80000-0x20000
mtd: Writing DBBT0 @0:0x80000(800)
mtd: erasing @0:0xa0000-0x20000
mtd: Writing DBBT1 @0:0xa0000(800)
mtd: erasing @0:0xc0000-0x20000
mtd: Writing DBBT2 @0:0xc0000(800)
mtd: erasing @0:0xe0000-0x20000
mtd: Writing DBBT3 @0:0xe0000(800)
mtd: erasing @0:0x80000-0x20000
mtd: Writing DBBT0 @0:0x80000(800)
mtd: erasing @0:0xa0000-0x20000
mtd: Writing DBBT1 @0:0xa0000(800)
mtd: erasing @0:0xc0000-0x20000
mtd: Writing DBBT2 @0:0xc0000(800)
mtd: erasing @0:0xe0000-0x20000
mtd: Writing DBBT3 @0:0xe0000(800)
mtd_commit_bcb(DBBT): status 0
mtd: Writting firmware image #0 @0: 0x00100000 - 0x00152000
mtd: erasing @0:0x100000-0x20000
mtd: erasing @0:0x120000-0x20000
mtd: erasing @0:0x140000-0x20000
mtd: Writting firmware image #1 @0: 0x00a80000 - 0x00ad2000
mtd: erasing @0:0xa80000-0x20000
mtd: erasing @0:0xaa0000-0x20000
mtd: erasing @0:0xac0000-0x20000
UTP: sending Success
UTP: received command '$ flash_erase /dev/mtd0 0x200000 32'
UTP: sending Busy
UTP: executing "flash_erase /dev/mtd0 0x200000 32"
Erase Total 32 Units
Performing Flash Erase of length 131072 at offset 0x5e0000 done
UTP: sending Success
UTP: received command 'send'
UTP: sending Success
UTP: received command '$ mtdwrite -d /dev/mtd0 -f $FILE -a 0x200000'
UTP: sending Busy
UTP: executing "mtdwrite -d /dev/mtd0 -f $FILE -a 0x200000"
sh: mtdwrite: not found
UTP: sending Non-success
utp_poll: exit with status 32512

 

 

 

-Thanks

Aditya

Outcomes