Trouble loading rootfs to NAND from MFGtool

Showing results for 
Search instead for 
Did you mean: 

Trouble loading rootfs to NAND from MFGtool

Contributor I

I am using the Buildroot 2018.08.2 for my development on IMX7Dual Sabre Board trying to resolve loading issue with custom hardware.   Prebuilt MFGTool doesn't work with custom hardware.  So I'm working on a custom initramfs to flash into nand using MFGTool.  So I've been developing with known working Sabre board.

For the Kernel defconfig, I chose to use imx_v7_defconfig.  And the Kernel version is rel_imx_4.9.x_1.0.0_ga

I can successfully build the uboot, kernel, and rootfs.  MFGTool successfully loads uboot, kernel, and DTB file into nand partitons but I have been unable to load the rootfs.   I think board is hanging at mkvol command of the ucl script file.  I have attached my MFGTool script ,configuration, and MFGTool log.

Here is the boot log.  Please advice. Thanks all!  I can provide more information if needed.

U-Boot 2017.03 (Jan 07 2019 - 19:50:55 -0600)

CPU: Freescale i.MX7D rev1.2 996 MHz (running at 792 MHz)
CPU: Commercial temperature grade (0C to 95C) at 38C
Reset cause: POR
Model: Freescale i.MX7D SabreSD Board
Board: i.MX7D SABRESD RevA in secure mode
NAND: 256 MiB
MMC: MMC/SD: Reset never completed.
voltage not supported by controller

*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: CPU Net Initialization Failed
No ethernet found.
Boot from USB for mfgtools
Use default environment for mfgtools
Run bootcmd_mfg: run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};
Hit any key to stop autoboot: 0
Kernel image @ 0x80800000 [ 0x000000 - 0x133a6f8 ]
## Loading init Ramdisk from Legacy Image at 83800000 ...
Image Name:
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 14943520 Bytes = 14.3 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 83000000
Booting using the fdt blob at 0x83000000
Using Device Tree in place at 83000000, end 8300e7b1

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.9.11 (josh@josh-Precision-7510) (gcc version 4.9.4 (Buildroot 2018.08.2) ) #2 SMP PREEMPT Mon Jan 7 19:51:22 CST 2019
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
CPU: div instructions available: patching division code
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt:Machine model: Freescale i.MX7 SabreSD Board
Reserved memory: created CMA memory pool at 0xac000000, size 320 MiB
OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
Memory policy: Data cache writealloc
percpu: Embedded 13 pages/cpu @ab71d000 s21708 r8192 d23348 u53248
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260096
Kernel command line: console=ttymxc0,115200 rdinit=/linuxrc g_mass_storage.stall=0 g_mass_storage.removable=1 g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF g_mass_storage.iSerialNumber= mtdparts=gpmi-nand:64m(boot),64m(kernel),16m(dtb),1m(misc),-(rootfs) clk_ignore_unused
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 669996K/1048576K available (7168K kernel code, 312K rwdata, 2416K rodata, 15360K init, 436K bss, 50900K reserved, 327680K cma-reserved, 0K highmem)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xc0800000 - 0xff800000 (1008 MB)
lowmem : 0x80000000 - 0xc0000000 (1024 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.text : 0x80008000 - 0x80800000 (8160 kB)
.init : 0x80b00000 - 0x81a00000 (15360 kB)
.data : 0x81a00000 - 0x81a4e060 ( 313 kB)
.bss : 0x81a50000 - 0x81abd3ac ( 437 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Preemptible hierarchical RCU implementation.
Build-time adjustment of leaf fanout to 32.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
arm_arch_timer: Architected cp15 timer(s) running at 8.00MHz (phys).
clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 440795202120 ns
sched_clock: 56 bits at 8MHz, resolution 125ns, wraps every 2199023255500ns
Switching to timer-based delay loop, resolution 125ns
Ignoring duplicate/late registration of read_current_timer delay
clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 16.00 BogoMIPS (lpj=80000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
CPU: Testing write buffer coherency: ok
CPU0: update cpu_capacity 1024
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x80100000 - 0x80100070
CPU1: update cpu_capacity 1024
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (32.00 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
DDR type is DDR3!
hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 8 bytes.
imx7d-pinctrl 302c0000.iomuxc-lpsr: initialized IMX pinctrl driver
imx7d-pinctrl 30330000.iomuxc: initialized IMX pinctrl driver
MU is ready for cross core communication!
mxs-dma 33000000.dma-apbh: initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
30800000.aips-bus:usbphynop1 supply vcc not found, using dummy regulator
30800000.aips-bus:usbphynop2 supply vcc not found, using dummy regulator
i2c i2c-0: IMX I2C adapter registered
i2c i2c-0: can't use DMA, using PIO instead.
i2c i2c-1: IMX I2C adapter registered
i2c i2c-1: can't use DMA, using PIO instead.
i2c i2c-2: IMX I2C adapter registered
i2c i2c-2: can't use DMA, using PIO instead.
i2c i2c-3: of_i2c: modalias failure on /soc/aips-bus@30800000/i2c@30a50000/ov5647_mipi@36
i2c i2c-3: Failed to create I2C device for /soc/aips-bus@30800000/i2c@30a50000/ov5647_mipi@36
i2c i2c-3: IMX I2C adapter registered
i2c i2c-3: can't use DMA, using PIO instead.
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <>
PTP clock support registered
imx rpmsg driver is registered.
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arch_sys_counter
VFS: Disk quotas dquot_6.6.0
VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 14596K (83800000 - 84641000)
Bus freq driver module loaded
futex hash table entries: 512 (order: 3, 32768 bytes)
workingset: timestamp_bits=30 max_order=18 bucket_order=0
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.26)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
backlight supply power not found, using dummy regulator
imx-sdma 30bd0000.sdma: no iram assigned, using external mem
imx-sdma 30bd0000.sdma: loaded firmware 4.2
pfuze100-regulator 0-0008: Full layer: 1, Metal layer: 1
pfuze100-regulator 0-0008: FAB: 0, FIN: 0
pfuze100-regulator 0-0008: pfuze3000 found.
30860000.serial: ttymxc0 at MMIO 0x30860000 (irq = 51, base_baud = 1500000) is a IMX
console [ttymxc0] enabled
30a80000.serial: ttymxc5 at MMIO 0x30a80000 (irq = 58, base_baud = 5000000) is a IMX
imx sema4 driver is registered.
[drm] Initialized
[drm] Initialized vivante 1.0.0 20120216 on minor 0
brd: module loaded
loop: module loaded
random: fast init done
nand: device found, Manufacturer ID: 0x01, Chip ID: 0xda
nand: AMD/Spansion S34ML02G1
nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
gpmi-nand 33002000.gpmi-nand: mode:4 ,failed in set feature.
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
5 cmdlinepart partitions found on MTD device gpmi-nand
Creating 5 MTD partitions on "gpmi-nand":
0x000000000000-0x000004000000 : "boot"
0x000004000000-0x000008000000 : "kernel"
0x000008000000-0x000009000000 : "dtb"
0x000009000000-0x000009100000 : "misc"
0x000009100000-0x000010000000 : "rootfs"
gpmi-nand 33002000.gpmi-nand: driver registered.
libphy: Fixed MDIO Bus: probed
30be0000.ethernet supply phy not found, using dummy regulator
pps pps0: new PPS source ptp0
libphy: fec_enet_mii_bus: probed
fec 30be0000.ethernet eth0: registered PHC device 0
30bf0000.ethernet supply phy not found, using dummy regulator
pps pps1: new PPS source ptp1
fec 30bf0000.ethernet eth1: registered PHC device 1
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-mxc: Freescale On-Chip EHCI Host driver
30b10200.usbmisc supply vbus-wakeup not found, using dummy regulator
30b30200.usbmisc supply vbus-wakeup not found, using dummy regulator
30b20200.usbmisc supply vbus-wakeup not found, using dummy regulator
ci_hdrc ci_hdrc.1: EHCI Host Controller
ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Mass Storage Function, version: 2009/09/11
LUN: removable file: (no medium)
LUN: removable file: (no medium)
Number of LUNs=1
g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
g_mass_storage gadget: g_mass_storage ready
mousedev: PS/2 mouse device common for all mice
input: 30370000.snvs:snvs-powerkey as /devices/soc0/soc/30000000.aips-bus/30370000.snvs/30370000.snvs:snvs-powerkey/input/input0
snvs_rtc 30370000.snvs:snvs-rtc-lp: rtc core: registered 30370000.snvs:snvs- as rtc0
i2c /dev entries driver
IR NEC protocol handler initialized
IR RC5(x/sz) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR SANYO protocol handler initialized
IR Sharp protocol handler initialized
IR MCE Keyboard/mouse protocol handler initialized
IR XMP protocol handler initialized
pxp-v4l2 pxp_v4l2_out: initialized
imx2-wdt 30280000.wdog: timeout 60 sec (nowayout=0)
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
sdhci-esdhc-imx 30b40000.usdhc: Got CD GPIO
sdhci-esdhc-imx 30b40000.usdhc: Got WP GPIO
g_mass_storage gadget: high-speed config #1: Linux File-Backed Storage
mmc0: SDHCI controller on 30b40000.usdhc [30b40000.usdhc] using ADMA
sdhci-esdhc-imx 30b50000.usdhc: assigned as wifi host
mmc1: SDHCI controller on 30b50000.usdhc [30b50000.usdhc] using ADMA
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 10
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
Key type dns_resolver registered
Registering SWP/SWPB emulation handler
snvs_rtc 30370000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01 00:00:00 UTC (0)
clk: Not disabling unused clocks
usb_otg1_vbus: disabling
vref-1v8: disabling
VDD_SD1: disabling
wlreg_on: disabling
VLDO2: disabling
ALSA device list:
No soundcards found.
Freeing unused kernel memory: 15360K (80b00000 - 81a00000)
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
Starting logging: OK
Starting mdev...
Populating /dev using udev: udevd[123]: starting version 3.2.5
udevd[124]: starting eudev-3.2.5
pxp-v4l2 pxp_v4l2_out: failed to call pxp_set_fbinfo
Initializing random number generator... done.
Starting network: OK
Starting uuc: OK

Welcome to Neo Hardware
neo login: utp_poll: pass returned.
utp_poll: pass returned.
utp_poll: pass returned.
utp_poll: pass returned.
random: crng init done
utp_poll: pass returned.
utp_poll: pass returned.
utp_poll: pass returned.
utp_poll: pass returned.
utp_poll: pass returned.
ubi0: attaching mtd4
ubi0: scanning is finished
ubi0: attached mtd4 (name "rootfs", size 111 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi0: good PEBs: 884, bad PEBs: 4, corrupted PEBs: 0
ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 133916487
ubi0: available PEBs: 844, total reserved PEBs: 40, PEBs reserved for bad PEB handling: 36
ubi0: background thread "ubi_bgt0d" started, PID 180
utp_poll: pass returned.
utp_poll: exit with status 65280

Also default initramfs shows tranfer progress of nand erase and write but custom initramfs doesn't. I'm not what I'm missing.

Labels (2)
0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport

Hi josh

one can try with nxp official linux from
linux-imx - i.MX Linux kernel 

use recipe linux-imx-mfgtool for building a manufacturing image as described in

sect.6.2 Manufacturing Tool, MFGTool attached Yocto Guide.

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

0 Kudos