How to program SD card via mfgtools

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

How to program SD card via mfgtools

2,190 Views
pt
Senior Contributor I

EVK                                : MCIMX28EVK

Linux Kernel version     : 2.6.35

Mfgtools                         : Mfgtools-Rel-1.6.2.048

I configured the firmware build profile

./ltib -selectype

(imx28) --->

(mfg firmware profile) --->

   

Toolchain (ARM, gcc-4.4.4, multilib, neon optimized)

command line : noinitrd console=ttyAM0,115200 root=/dev/mmcblk0p3 rw rootwait ip=none ssp1

Then I build linux bsp by using ./ltib command.I have extracted the boot stream source file.

./ltib -p boot_stream.spec -m prep

  Applied the following patch

0001-ENGR00243127-MX28-mfg-updater.sb-can-not-run-success.patch

Then I built bootstream

./ltib -p boot_stream.spec -f

The generated files - updater.sb, updater_ivt.sb, imx28_ivt_linux.sb, imx28_ivt_uboot.sb, imx28_linux.sb, imx28_uboot.sb, uImage,rootfs.tar.bz2 are copied to specific folder of mfgtools.

But I am getting the following error.

-------------------------------------------------------------------------------------------------------------------

Freeing init memory: 128K

starting pid 1768, tty '': '/etc/rc.d/rcS'

Mounting /proc and /sys

mount: wrong fs type, bad option, bad superblock on tmpfs,

       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

mknod: /dev/console: File exists

mknod: /dev/null: File exists

Starting the hotplug events dispatcher udevd

udevd[1777]: init_udevd_socket: error getting socket: Address family not supported by protocol

error initializing udevd socket

udevd[1777]: main: error initializing udevd socket

Synthesizing initial hotplug events

Setting the hostname to freescale

Mounting filesystems

mount: wrong fs type, bad option, bad superblock on shm,

       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

mount: wrong fs type, bad option, bad superblock on rwfs,

       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

mount: sysfs already mounted or /sys busy

mount: according to mtab, /sys is already mounted on /sys

mount: mount point /proc/bus/usb does not exist

starting pid 1804, tty '': '/etc/rc.d/rc_gpu.S'

can't run '/etc/rc.d/rc_gpu.S': No such file or directory

starting pid 1805, tty '': '/sbin/getty -L ttyAM0 115200 vt100'

process '/sbin/getty -L ttyAM0 115200 vt100' (pid 1805) exited. Scheduling for restart.

starting pid 1806, tty '': '/sbin/getty -L ttyAM0 115200 vt100'

Unable to handle kernel NULL pointer dereference at virtual address 00000008

pgd = c0004000

[00000008] *pgd=00000000

Internal error: Oops: 17 [#1]

last sysfs file: /sys/devices/virtual/vtconsole/vtcon1/uevent

CPU: 0    Not tainted  (2.6.35.3-670-g914558e #3)

PC is at fsg_main_thread+0xb40/0x2424

LR is at fsg_main_thread+0xb40/0x2424

pc : [<c023ce8c>]    lr : [<c023ce8c>]    psr: 60000013

sp : c7c65ef8  ip : c7c65ef8  fp : c7c65fc4

r10: c7c64000  r9 : 00c03965  r8 : c0396514

r7 : 00000000  r6 : c034e490  r5 : c0396504  r4 : c7c98600

r3 : 00000000  r2 : 00000001  r1 : c7c65f7c  r0 : c0396514

Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel

Control: 0005317f  Table: 46fc8000  DAC: 00000017

Process file-storage-ga (pid: 164, stack limit = 0xc7c64270)

Stack: (0xc7c65ef8 to 0xc7c66000)

5ee0:                                                       c7c9865c c031e318

5f00: c7c259e0 00000026 00000000 000000c0 0000c039 c7c986ba c7c986bd c7c986bc

5f20: c7c986bb c7c65f88 00000000 00000000 c7c98604 00c03965 c7c986b0 c7c98640

5f40: c7c986b3 c7c986b4 c7c986b5 c7c986b2 c7c986b6 c7c986b9 000000c0 0000c039

5f60: c7c24000 c034475c c7c65f94 c7c986b8 c7c986b7 c7c9ec80 c033c318 00000000

5f80: c7c259e0 c0057a1c c7c65f88 c7c65f88 c02a141c c00405e4 00000000 c7c27ed0

5fa0: c7c65fcc c023c34c c7c98600 00000000 00000000 00000000 c7c65ff4 c7c65fc8

5fc0: c0057588 c023c35c 00000000 00000000 c7c65fd0 c7c65fd0 c7c27ed0 c0057504

5fe0: c0045c28 00000013 00000000 c7c65ff8 c0045c28 c0057514 00000000 00000000

Backtrace:

[<c023c34c>] (fsg_main_thread+0x0/0x2424) from [<c0057588>] (kthread+0x84/0x8c)

[<c0057504>] (kthread+0x0/0x8c) from [<c0045c28>] (do_exit+0x0/0x5f0)

r7:00000013 r6:c0045c28 r5:c0057504 r4:c7c27ed0

Code: e1530007 03a07000 e1a00008 eb019316 (e5d73008)

---[ end trace 7ab07b70219ce5af ]---

process '/sbin/getty -L ttyAM0 115200 vt100' (pid 1806) exited. Scheduling for restart.

starting pid 1807, tty '': '/sbin/getty -L ttyAM0 115200 vt100'

process '/sbin/getty -L ttyAM0 115200 vt100' (pid 1807) exited. Scheduling for restart.

starting pid 1808, tty '': '/sbin/getty -L ttyAM0 115200 vt100'

process '/sbin/getty -L ttyAM0 115200 vt100' (pid 1808) exited. Scheduling for restart.


How to solve this?


pastedImage_37.png

Labels (2)
0 Kudos
5 Replies

855 Views
igorpadykov
NXP Employee
NXP Employee

Hi Pt

you can try kernel command line: -e console=ttyAM0,115200 rdinit=/linuxrc rw gpmi

Best regards

igor

0 Kudos

855 Views
pt
Senior Contributor I

Hi

I have change the command line to console=ttyAM0,115200 rdinit=/linuxrc rw gpmi

It fails at 'partitioning SD card' Stage

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

HTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLC

PowerPrep start initialize power...

Battery Voltage = 4.23VLLLCOct 17 201412:30:45

FRAC 0x92925552

memory type is DDR2

                   Wait for ddr ready 1power 0x00820710

Frac 0x92925552

start change cpu freq

hbus 0x00000003

cpu 0x00010001

LLLLLLLFLCLFLLJUncompressing Linux... done, booting the kernel.

Linux version 2.6.35.3-670-g914558e (dtsuser@dtsmachine) (gcc version 4.4.4 (4.4.4_09.06.2010) ) #3 Fri Oct 17 12:11:06 IST 2014

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: -e console=ttyAM0,115200 rdinit=/linuxrc rw gpmi

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: 120120k/120120k available, 10952k 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 - 0xc0331000   (3108 kB)

      .data : 0xc0332000 - 0xc03522a0   ( 129 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

i.MX IRAM pool: 124 KB@0xc8820000

Initializing GPMI pins

audit: cannot initialize inotify handle

bio: create slab <bio-0> at 0

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

IMX usb wakeup probe

usb DR wakeup device is registered

Switching to clocksource mxs clock source

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

Trying to unpack rootfs image as initramfs...

g_file_storage gadget: high speed config #1

Freeing initrd memory: 6144K

Bus freq driver module loaded

mxs_cpu_init: cpufreq init finished

audit: initializing netlink socket (disabled)

type=2000 audit(2.310: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)

Console: switching to colour frame buffer device 100x30

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.

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...

No NAND device found.

gpmi-nfc gpmi-nfc.0: Chip scan failed

mxs-spi mxs-spi.0: Max possible speed 24000 = 24000000/2 kHz

mxs-spi mxs-spi.0: at 0x80014000 mapped to 0xF0014000, irq=84, bus 1, DMA ver_major 4

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

mxs-rtc mxs-rtc.0: rtc core: registered mxs-rtc as rtc0

mxs-mmc: MXS SSP Controller MMC Interface driver

mxs-mmc mxs-mmc.0: mmc0: MXS SSP MMC DMAIRQ 82 ERRIRQ 96

mmc0: new high speed SDHC card at address e624

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

mmcblk0: mmc0:e624 SU04G 3.69 GiB

mmcblk0: p1 p2 p3

mxs-rtc mxs-rtc.0: setting system clock to 1970-01-01 00:05:41 UTC (341)

Freeing init memory: 128K

Starting UTP

ln: /etc/mtab: File exists

disable turn off display

uuc 0.4 [built Oct 17 2014 12:16:14]

UTP: Waiting for device to appear

utp_mk_devnode: creating node '/dev/utp' with 10+222

cpu_id is 28

UTP: received command 'mknod block,mmcblk0,/dev/mmcblk0,block'

class = 'block'

item = 'mmcblk0'

node = /dev/mmcblk0

type = block

UTP: running utp_mk_devnode(block,mmcblk0,/dev/mmcblk0,0x6000)

utp_mk_devnode: creating node '/dev/mmcblk0' with 179+0

UTP: sending Success

g_file_storage gadget: high speed config #1

UTP: received command 'send'

UTP: sending Success

UTP: received command '$ fdisk -u /dev/mmcblk0 < $FILE'

UTP: sending Busy

UTP: executing "fdisk -u /dev/mmcblk0 < $FILE"

The number of cylinders for this disk is set to 121008.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): Partition number (1-4): Warning: partition 4 has empty type

Command (m for help): Partition number (1-4):

Command (m for help): Partition number (1-4): Warning: partition 2 has empty type

Command (m for help): Selected partition 1

Command (m for help): 1: unknown command

Command action

   a   toggle a bootable flag

   b   edit bsd disklabel

   c   toggle the dos compatibility flag

   d   delete a partition

   l   list known partition types

   m   print this menu

   n   add a new partition

   o   create a new empty DOS partition table

   p   print the partition table

   q   quit without saving changes

   s   create a new empty Sun disklabel

   t   change a partition's system id

   u   change display/entry units

   v   verify the partition table

   w   write table to disk and exit

   x   extra functionality (experts only)

Command (m for help): Command action

   e   extended

   p   primary partition (1-4)

Partition number (1-4): First sector (16-7744511, default 16): Last sector or +size or +sizeM or +sizeK (16384-7744511, default 7744511):

Command (m for help): Command action

   e   extended

   p   primary partition (1-4)

Partition number (1-4): First sector (16-7744511, default 16): Last sector or +size or +sizeM or +sizeK (1064961-7744511, default 7744511):

Command (m for help): Command action

   e   extended

   p   primary partition (1-4)

Partition number (1-4): First sector (16-7744511, default 16): Last sector or +size or +sizeM or +sizeK (1081346-7744511, default 7744511): Using default value 7744511

Command (m for help): Partition number (1-4): Hex code (type L to list codes): Type 0 means free space to many systems

(but not to Linux). Having partitions of

type 0 is probably unwise. You can delete

a partition using the `d' command.

Changed system type of partition 2 to 0 (Empty)

Command (m for help): The partition table has been altered!

Calling ioctl() to re-read partition table.

mmcblk0: p1 p2 p3

mmcblk0: p1 p2 p3

Syncing disks.

UTP: sending Success

utp_poll: pass returned.

UTP: received command 'mknod block/mmcblk0,mmcblk0p1,/dev/mmcblk0p1,block'

class = 'block/mmcblk0'

item = 'mmcblk0p1'

node = /dev/mmcblk0p1

type = block

UTP: running utp_mk_devnode(block/mmcblk0,mmcblk0p1,/dev/mmcblk0p1,0x6000)

utp_mk_devnode: creating node '/dev/mmcblk0p1' with 179+1

UTP: sending Success

UTP: received command 'mknod block/mmcblk0,mmcblk0p2,/dev/mmcblk0p2,block'

class = 'block/mmcblk0'

item = 'mmcblk0p2'

node = /dev/mmcblk0p2

type = block

UTP: running utp_mk_devnode(block/mmcblk0,mmcblk0p2,/dev/mmcblk0p2,0x6000)

utp_mk_devnode: creating node '/dev/mmcblk0p2' with 179+2

UTP: sending Success

UTP: received command 'mknod block/mmcblk0,mmcblk0p3,/dev/mmcblk0p3,block'

class = 'block/mmcblk0'

item = 'mmcblk0p3'

node = /dev/mmcblk0p3

type = block

UTP: running utp_mk_devnode(block/mmcblk0,mmcblk0p3,/dev/mmcblk0p3,0x6000)

utp_mk_devnode: creating node '/dev/mmcblk0p3' with 179+3

UTP: sending Success

UTP: received command 'send'

UTP: sending Success

UTP: received command '$ sdimage -f $FILE -d /dev/mmcblk0'

UTP: sending Busy

UTP: executing "sdimage -f $FILE -d /dev/mmcblk0"

Can't found boot stream partition

UTP: sending Non-success

utp_poll: exit with status 65280

0 Kudos

855 Views
igorpadykov
NXP Employee
NXP Employee

what is device you are trying to write to ?

In general you can try other new card from well known vendors.

0 Kudos

855 Views
pt
Senior Contributor I

Hi

I am using SD card.

0 Kudos

855 Views
igorpadykov
NXP Employee
NXP Employee

just for test recommend to check with ordinary (<2GB) SD card.

0 Kudos