This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EVM335X Linux NAND boot freezes at "Freeing init memory: 248K"

Other Parts Discussed in Thread: TPS65910, DA8XX, TMP275

Hi, I've tried flashing the am335x-evm on-board NAND chip and tried to boot the AM335X EVM it but fails ding the process (log file pasted in below).

- I installed Ubuntu 12.04 and SDK-5.06. Made a clean build to get all files - MLO, u-boot.img, uImage and ubi.img (with installation example version of base tisdk root fs).  the ubi.img is created with mkfs.ubifs and ubinize utilities.

- I then booted the board from SD card and enter U-boot mode. Use U-boot 'nand write' to flash the files in the following order: MLO, u-boot.img, uImage and ubi.img.  All writes are OK.  Version: U-Boot SPL 2012.10

- I ran nandboot and the NAND boot did load the kernel from the NAND flash and started the kernel, however, it stopped after freeing some init memory and not giving me the expected login.

 I attached the uart log to this message. Any assistance or insight as to  why the boot process stalls would be greatly appreciated.

Also, I powered off the board and removed the SD card. Set SW 3 to NAND boot i.e. switch 2 and 5 are set to ON. Then power on the board, uart channel only writes one line and then stopped:

U-Boot SPL 2012.10 (Jan 22 2013 - 13:38:40)  

 Any help to find out what I did wrong, or, some steps I am missing?

Maybe to  take a step back, it would be helpful to have known working images of MLO, u-boot.img, uImage and ubi.img for the am335x-evm board to test with?  is this something that can be supplied?

Best Regards,

John

U-Boot# setenv bootcmd 'run nand_boot'
U-Boot# boot
## Error: "nand_boot" not defined
U-Boot# run nand_boot
## Error: "nand_boot" not defined
U-Boot# run nandboot
Booting from nand ...

NAND read: device 0 offset 0x280000, size 0x500000
 5242880 bytes read: OK
## Booting kernel from Legacy Image at 80007fc0 ...
   Image Name:   Linux-3.2.0
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3169216 Bytes = 3 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   XIP Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Linux version 3.2.0 (root@ubuntu) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #1 Tue Jan 22 13:36:44 EST 2013
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: am335xevm
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] AM335X ES1.0 (sgx neon )
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=7,2048 noinitrd rootfstype=ubifs rootwait=1 i
p=none
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 512MB = 512MB total
[    0.000000] Memory: 513144k/513144k available, 11144k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc05a0000   (5728 kB)
[    0.000000]       .init : 0xc05a0000 - 0xc05de000   ( 248 kB)
[    0.000000]       .data : 0xc05de000 - 0xc0646448   ( 418 kB)
[    0.000000]        .bss : 0xc064646c - 0xc0673324   ( 180 kB)
[    0.000000] NR_IRQS:396
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] Total of 128 interrupts on 1 active controller
[    0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
[    0.000000] OMAP clocksource: GPTIMER1 at 32768 Hz
[    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
[    0.000000] Console: colour dummy device 80x30
[    0.000152] Calibrating delay loop... 718.02 BogoMIPS (lpj=3590144)
[    0.058929] pid_max: default: 32768 minimum: 301
[    0.059051] Security Framework initialized
[    0.059143] Mount-cache hash table entries: 512
[    0.059539] CPU: Testing write buffer coherency: ok
[    0.080047] omap_hwmod: pruss: failed to hardreset
[    0.081176] print_constraints: dummy:
[    0.081542] NET: Registered protocol family 16
[    0.083709] OMAP GPIO hardware version 0.1
[    0.086364] omap_mux_init: Add partition: #1: core, flags: 0
[    0.088317]  omap_i2c.1: alias fck already exists
[    0.089294]  omap2_mcspi.1: alias fck already exists
[    0.089508]  omap2_mcspi.2: alias fck already exists
[    0.090454]  edma.0: alias fck already exists
[    0.090484]  edma.0: alias fck already exists
[    0.090515]  edma.0: alias fck already exists
[    0.117279] bio: create slab <bio-0> at 0
[    0.119537] SCSI subsystem initialized
[    0.121185] usbcore: registered new interface driver usbfs
[    0.121490] usbcore: registered new interface driver hub
[    0.121673] usbcore: registered new device driver usb
[    0.121826] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
[    0.122131] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
[    0.123260] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
[    0.125122] tps65910 1-002d: JTAGREVNUM 0x0
[    0.127502] print_constraints: VRTC:
[    0.128967] print_constraints: VIO: at 1800 mV
[    0.131286] print_constraints: VDD1: 600 <--> 1500 mV at 1262 mV normal
[    0.133605] print_constraints: VDD2: 600 <--> 1500 mV at 1137 mV normal
[    0.134582] print_constraints: VDD3: 5000 mV
[    0.136016] print_constraints: VDIG1: at 1800 mV
[    0.137420] print_constraints: VDIG2: at 1800 mV
[    0.138854] print_constraints: VPLL: at 1800 mV
[    0.140289] print_constraints: VDAC: at 1800 mV
[    0.141723] print_constraints: VAUX1: at 1800 mV
[    0.143157] print_constraints: VAUX2: at 3300 mV
[    0.144561] print_constraints: VAUX33: at 3300 mV
[    0.145996] print_constraints: VMMC: at 3300 mV
[    0.146484] tps65910 1-002d: No interrupt support, no core IRQ
[    0.147735] Advanced Linux Sound Architecture Driver Version 1.0.24.
[    0.148864] Switching to clocksource gp timer
[    0.164276] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[    0.164459] musb-hdrc musb-hdrc.0: dma type: pio
[    0.164794] MUSB0 controller's USBSS revision = 4ea20800
[    0.165435] musb-hdrc musb-hdrc.0: USB OTG mode controller at e083c000 using PIO, IRQ 18
[    0.165588] musb-hdrc musb-hdrc.1: dma type: pio
[    0.165924] MUSB1 controller's USBSS revision = 4ea20800
[    0.166076] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[    0.166168] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[    0.166290] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.166320] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.166320] usb usb1: Product: MUSB HDRC host driver
[    0.166351] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd
[    0.166351] usb usb1: SerialNumber: musb-hdrc.1
[    0.167144] hub 1-0:1.0: USB hub found
[    0.167175] hub 1-0:1.0: 1 port detected
[    0.167724] musb-hdrc musb-hdrc.1: USB Host mode controller at e083e800 using PIO, IRQ 19
[    0.168151] NET: Registered protocol family 2
[    0.168334] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.168670] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.169036] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
[    0.169219] TCP: Hash tables configured (established 16384 bind 16384)
[    0.169219] TCP reno registered
[    0.169250] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.169250] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.169433] NET: Registered protocol family 1
[    0.169708] RPC: Registered named UNIX socket transport module.
[    0.169738] RPC: Registered udp transport module.
[    0.169738] RPC: Registered tcp transport module.
[    0.169738] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.169982] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.191253] VFS: Disk quotas dquot_6.5.2
[    0.191314] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.191864] msgmni has been set to 1002
[    0.195098] alg: No test for stdrng (krng)
[    0.195770] io scheduler noop registered
[    0.195800] io scheduler deadline registered
[    0.195861] io scheduler cfq registered (default)
[    0.199645] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[    0.817077] console [ttyO0] enabled
[    0.821350] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[    0.829132] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[    0.836944] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[    0.844726] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[    0.852539] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
[    0.860778] omap4_rng omap4_rng: OMAP4 Random Number Generator ver. 2.00
[    0.877075] brd: module loaded
[    0.885131] loop: module loaded
[    0.888610] i2c-core: driver [tsl2550] using legacy suspend method
[    0.895080] i2c-core: driver [tsl2550] using legacy resume method
[    0.901519] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[    0.915435] Detected a daughter card on AM335x EVM..
[    0.920440] CPLD version: CPLD1.0F
[    0.924194] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[    0.939361] Board name: A33515BB
[    0.942718] Board version: 1.4A
[    0.946014] SKU: SKU#01
[    0.949066] The board is general purpose EVM in profile 0
[    0.955749]  da8xx_lcdc.0: alias fck already exists
[    0.961273] da8xx_lcdc da8xx_lcdc.0: GLCD: Found TFC_S9700RTWV35TR_01B panel
[    0.984924] Console: switching to colour frame buffer device 100x30
[    1.001556] omap-gpmc omap-gpmc: GPMC revision 6.0
[    1.006561] Registering NAND on CS0
[    1.010955]  omap_i2c.2: alias fck already exists
[    1.016204] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 100 kHz
[    1.022705] tsl2550 2-0039: standard operating mode
[    1.028472] tsl2550 2-0039: support ver. 1.2 enabled
[    1.034332]  davinci-mcasp.1: alias fck already exists
[    1.040191]  omap_hsmmc.0: alias fck already exists
[    1.045562]  omap_hsmmc.2: alias fck already exists
[    1.051147] Configure Bluetooth Enable pin...
[    1.057128] registered am33xx_sr device
[    1.061431] _regulator_get: 2-0018 supply Vdd not found, using dummy regulator
[    1.069061] _regulator_get: 2-0018 supply Vdd_IO not found, using dummy regulator
[    1.097503] lis3lv02d: 8 bits 3DLH sensor found
[    1.189910] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input0
[    1.201721] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.208984] omap2-nand driver initializing
[    1.213623] ONFI flash detected
[    1.217041] ONFI param page 0 valid
[    1.220703] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAWP)
[    1.229278] Creating 8 MTD partitions on "omap2-nand.0":
[    1.234832] 0x000000000000-0x000000020000 : "SPL"
[    1.241149] 0x000000020000-0x000000040000 : "SPL.backup1"
[    1.248046] 0x000000040000-0x000000060000 : "SPL.backup2"
[    1.254943] 0x000000060000-0x000000080000 : "SPL.backup3"
[    1.261871] 0x000000080000-0x000000260000 : "U-Boot"
[    1.269042] 0x000000260000-0x000000280000 : "U-Boot Env"
[    1.275909] 0x000000280000-0x000000780000 : "Kernel"
[    1.284454] 0x000000780000-0x000010000000 : "File System"
[    1.394622] OneNAND driver initializing
[    1.399383] UBI: attaching mtd7 to ubi0
[    1.403411] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[    1.409973] UBI: logical eraseblock size:    126976 bytes
[    1.415588] UBI: smallest flash I/O unit:    2048
[    1.420501] UBI: VID header offset:          2048 (aligned 2048)
[    1.426757] UBI: data offset:                4096
[    2.642333] UBI: max. sequence number:       0
[    2.678131] UBI: volume 0 ("rootfs") re-sized from 1586 to 1965 LEBs
[    2.685729] UBI: attached mtd7 to ubi0
[    2.689666] UBI: MTD device name:            "File System"
[    2.695373] UBI: MTD device size:            248 MiB
[    2.700561] UBI: number of good PEBs:        1988
[    2.705474] UBI: number of bad PEBs:         0
[    2.710113] UBI: number of corrupted PEBs:   0
[    2.714721] UBI: max. allowed volumes:       128
[    2.719543] UBI: wear-leveling threshold:    4096
[    2.724456] UBI: number of internal volumes: 1
[    2.729064] UBI: number of user volumes:     1
[    2.733703] UBI: available PEBs:             0
[    2.738342] UBI: total number of reserved PEBs: 1988
[    2.743530] UBI: number of PEBs reserved for bad PEB handling: 19
[    2.749877] UBI: max/mean erase counter: 1/0
[    2.754333] UBI: image sequence number:  979674349
[    2.759429] UBI: background thread "ubi_bgt0d" started, PID 606
[    2.779968] CAN device driver interface
[    2.783966] CAN bus driver for Bosch D_CAN controller 1.0
[    2.849548] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
[    2.856018] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
[    2.879974] davinci_mdio.0: probed
[    2.883544] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
[    2.899810] usbcore: registered new interface driver zd1201
[    2.909942] usbcore: registered new interface driver cdc_ether
[    2.929870] usbcore: registered new interface driver cdc_eem
[    2.935943] usbcore: registered new interface driver dm9601
[    2.941802] cdc_ncm: 04-Aug-2011
[    2.959564] usbcore: registered new interface driver cdc_ncm
[    2.965454] Initializing USB Mass Storage driver...
[    2.979827] usbcore: registered new interface driver usb-storage
[    2.986114] USB Mass Storage support registered.
[    2.999816] mousedev: PS/2 mouse device common for all mice
[    3.019653] input: matrix-keypad as /devices/platform/matrix-keypad/input/input1
[    3.040374] input: ti-tsc as /devices/platform/omap/ti_tscadc/tsc/input/input2
[    3.059692] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0
[    3.066864] i2c /dev entries driver
[    3.080200] Linux video capture interface: v2.00
[    3.089630] usbcore: registered new interface driver uvcvideo
[    3.095642] USB Video Class driver (1.1.1)
[    3.119659] lm75 2-0048: hwmon0: sensor 'tmp275'
[    3.349639] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    3.370208] cpuidle: using governor ladder
[    3.380218] cpuidle: using governor menu
[    3.469696] omap4_aes_mod_init: loading AM33X AES driver
[    3.475341] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02
[    3.499786] omap4_aes_probe: probe() done
[    3.504241] omap4_sham_mod_init: loading AM33X SHA/MD5 driver
[    3.510375] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03
[    3.581512] omap4_sham_probe: probe() done
[    3.600097] mmc1: card claims to support voltages below the defined range. These will be ignored.
[    3.620819] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
[    3.640014] usbcore: registered new interface driver usbhid
[    3.645812] usbhid: USB HID core driver
[    3.650543] usbcore: registered new interface driver snd-usb-audio
[    3.658630] mmc1: new SDIO card at address 0001
[    3.680541] _regulator_get: 2-001b supply IOVDD not found, using dummy regulator
[    3.688323] _regulator_get: 2-001b supply DVDD not found, using dummy regulator
[    3.696014] _regulator_get: 2-001b supply AVDD not found, using dummy regulator
[    3.703704] _regulator_get: 2-001b supply DRVDD not found, using dummy regulator
[    3.750457] asoc: tlv320aic3x-hifi <-> davinci-mcasp.1 mapping ok
[    3.770355] ALSA device list:
[    3.773437]   #0: AM335X EVM
[    3.776428] oprofile: hardware counters not available
[    3.781738] oprofile: using timer interrupt.
[    3.786224] nf_conntrack version 0.5.0 (8017 buckets, 32068 max)
[    3.793090] ip_tables: (C) 2000-2006 Netfilter Core Team
[    3.798736] TCP cubic registered
[    3.802124] NET: Registered protocol family 17
[    3.806762] can: controller area network core (rev 20090105 abi 8)
[    3.813323] NET: Registered protocol family 29
[    3.817962] can: raw protocol (rev 20090105)
[    3.822418] can: broadcast manager protocol (rev 20090105 t)
[    3.828369] Registering the dns_resolver key type
[    3.833343] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    3.841339] ThumbEE CPU extension supported.
[    3.845855] mux: Failed to setup hwmod io irq -22
[    3.851409] Power Management for AM33XX family
[    3.856262] Trying to load am335x-pm-firmware.bin (60 secs timeout)
[    3.862945] Copied the M3 firmware to UMEM
[    3.867431] smartreflex smartreflex: am33xx_sr_probe: Zero NValue read from EFUSE
[    3.875274] smartreflex: probe of smartreflex failed with error -22
[    3.889923] sr_init: platform driver register failed
[    3.913543] clock: disabling unused clocks to save power
[    4.160064] Detected MACID=0:18:31:e2:66:93
[    4.165466] cpsw: Detected MACID = 00:18:31:e2:66:94
[    4.180938] input: gpio-keys as /devices/platform/gpio-keys/input/input3
[    4.200195] omap_rtc am33xx-rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801)
[    4.371307] UBIFS: start fixing up free space
[    8.677398] UBIFS: free space fixup complete
[    8.721221] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    8.727508] UBIFS: file system size:   199225344 bytes (194556 KiB, 189 MiB, 1569 LEBs)
[    8.735870] UBIFS: journal size:       9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
[    8.743499] UBIFS: media format:       w4/r0 (latest is w4/r0)
[    8.749572] UBIFS: default compressor: lzo
[    8.753875] UBIFS: reserved for root:  0 bytes (0 KiB)
[    8.773864] VFS: Mounted root (ubifs filesystem) on device 0:13.
[    8.780548] Freeing init memory: 248K

  • I don't know the reason for your boot failure, but on your question concerning availability of pre-built images - they are available.  Look at your SDK installation and you will find pre-built images for MLO, U-Boot and uImage in folder \board-support\prebuilt-images.

    Regards.

  • Thanks for the pointer to the pre built images.  I will give those a try.  Here's some further information on whats been done/tried so far:

    Right out of the ti am335x evm shipping box, I followed the Linux SDK 05.06 guide and,


    - downloaded and created VM Ubuntu 12.04 Linux host on my Windows XP computer

     

    - downloaded and installed ti-sdk-am335x-evm-05.06.00.00 into Ubuntu 12.04

     

    - run setup script OK

     

    - installed MTD-UTILS v1.5 to Linux host

     

    - untared the arago-base-tisdk-image-am335x-evm.tar.gz

     

    - run create SD card script to create a bootable SD with the freshly untared base target filesystem

     

    - on the bootable SD, 'boot' folder contains MLO, u-boot.img and uImage files copied from the 'boot' folder of the base target filesystem.

     

    - the bootable SD's 'rootfs' folder contains the base target filesystem.

     

    - use mkfs.ubifs -r [base targetfs dir] -F -o ubifs.img -m 2048 -e 126976 -c 1580 and then

     

    - use ubinize -o ubi.img -m 2048 -p 128KiB -s 512 -O ubinize.cfg to create an ubi.img

     

    - my ubinize.cfg has:
    [ubifs]
    mode=ubi
    image=ubifs.img
    vol_id=0
    vol_size=192MiB
    vol_type=dynamic
    vol_name=rootfs
    vol_flags=autoresize

     

    - copy the ubi.img to bootable SD card's 'boot' directory.

     

    - booted the evm board successfully with the SD card.

     

    - re-boot the board with the SD card and enter U-boot mode.

     

    - flashed MLO, u-boot.img, uImage, and ubi.img all successfully to the NAND flash on the evm board

     

    - at U-boot, type 'run nandboot' (or 'nand_boot', depending on which version of U-boot is using: 2011.09 or 2012.10)

     

    - nand read is OK and Linux kernel runs OK until it reached the following line then it hang there.
     [    8.780548] Freeing init memory: 248K

  • As a further update.  I tried the pre built images.  Same result.  System hangs after Freeing init memory.  What's confusing is the images work fine from SD card.  Images are successfully programmed into the nand flash. Kernel boots but appears to never get past the init process.

  • Your issue is being investigated.  Expect some additional feedback early next week.

    Regards.

  • There has been some signficant progress made on this issue...below is an update:

    What I figured out is that I made some changes to a couple 'Makefile'  and did a clean build of Linux kernel. With the new kernel (EABI is still on) image and a new ubi.img created from base rootfs tar file, I flashed them all to the NAND.

    Then start with SD boot to u-boot mode, remove the SD card from the slot and I can run 'nandboot' to boot the kernel and roofs! It no longer hangs at 'free memory'.  I think this indicates that NAND boot is ready to go on my board.

    However, I then tried to power off the board, set SW3 switches to 'NAND' boot mode i.e., Switch 2 and 5 are on. Power the board on and it now hangs with only one line displayed:

    'U-Boot 2012.10 (Jan 30 2013 - 19:03:52)'

     I've pasted in my environment settings below.  Any idea why it might be hangin here?

    U-Boot# printenv
    baudrate=115200
    bootargs_defaults=setenv bootargs console=${console} ${optargs}
    bootcmd=if mmc rescan ${mmcdev}; then echo SD/MMC found on device ${mmcdev};if run loadbootenv; then echo Loaded environment from ${
    bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;if run loaduimagefat; then run mmcbo
    ot;elif run loaduimage; then run mmcboot;else echo Cound not find ${bootfile} ;fi;else run nandboot;fi;
    bootdelay=3
    bootenv=uEnv.txt
    bootfile=uImage
    console=ttyO0,115200n8
    dfu_alt_info=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;kernel part 0 7;rootfs part
     0 8
    ethact=cpsw
    ethaddr=00:18:31:e2:66:93
    fdtaddr=0x80F80000
    importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
    ip_method=none
    kloadaddr=0x80007fc0
    loadaddr=0x80200000
    loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}
    loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz
    loaduimage=ext2load mmc ${mmcdev}:2 ${kloadaddr} /boot/${bootfile}
    loaduimagefat=fatload mmc ${mmcdev} ${kloadaddr} ${bootfile}
    mmcargs=run bootargs_defaults;setenv bootargs ${bootargs} root=${mmcroot} rootfstype=${mmcrootfstype} ip=${ip_method}
    mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${kloadaddr}
    mmcdev=0
    mmcroot=/dev/mmcblk0p2 ro
    mmcrootfstype=ext3 rootwait
    mtdids=nand0=omap2-nand.0
    mtdparts=mtdparts=omap2-nand.0:128k(SPL),128k(SPL.backup1),128k(SPL.backup2),128k(SPL.backup3),1920k(u-boot),128k(u-boot-env),5m(ker
    nel),-(rootfs)
    nandargs=run bootargs_defaults;setenv bootargs ${bootargs} root=${nandroot} noinitrd rootfstype=${nandrootfstype} ip=${ip_method}
    nandboot=echo Booting from nand ...; run nandargs; nand read.i ${kloadaddr} ${nandsrcaddr} ${nandimgsize}; bootm ${kloadaddr}
    nandimgsize=0x500000
    nandroot=ubi0:rootfs rw ubi.mtd=7,2048
    nandrootfstype=ubifs rootwait=1
    nandsrcaddr=0x280000
    netargs=run bootargs_defaults;setenv bootargs ${bootargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
    netboot=echo Booting from network ...; setenv autoload no; dhcp; tftp ${kloadaddr} ${bootfile}; run netargs; bootm ${kloadaddr}
    nfsopts=nolock
    ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}
    ramboot=echo Booting from ramdisk ...; run ramargs; bootm ${loadaddr}
    ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M
    ramrootfstype=ext2
    rdaddr=0x81000000
    rootpath=/export/rootfs
    spiargs=run bootargs_defaults;setenv bootargs ${bootargs} rootfstype=${spirootfstype} ip=${ip_method}
    spiboot=echo Booting from spi ...; run spiargs; sf probe ${spibusno}:0; sf read ${kloadaddr} ${spisrcaddr} ${spiimgsize}; bootm ${kl
    oadaddr}
    spibusno=0
    spiimgsize=0x362000
    spiroot=/dev/mtdblock4 rw
    spirootfstype=jffs2
    spisrcaddr=0x80000
    static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
    stderr=serial
    stdin=serial
    stdout=serial
    usbnet_devaddr=00:18:31:e2:66:93
    ver=U-Boot 2012.10 (Feb 04 2013 - 13:07:04)

     

  • Can you clarify what is flashed to SD card and what to nand?  From your discription it sounds like only Linux image and FS are in nand.

  • Hi, jschipp,

    I'm currently investigating your issue. I'll post an update by tomorrow.

    Meanwhile would you please give an answer to Tommy's question:

    TommyG said:

    Can you clarify what is flashed to SD card and what to nand?  From your discription it sounds like only Linux image and FS are in nand.

    Thank you!

    Best regards,

    Miroslav

  • The following is all programmed to NAND flash:

    MLO, u-boot.img, uImage, and ubi.img all programmed successfully to the NAND flash on the evm board

     

    Best Regards,

    John

  • Hi John,

    I managed to successfully flash MLO, u-boot.img, uImage and ubi.img to NAND and then boot them entirely from NAND by following the steps below.

    I'm using Ubuntu 12.04 with ti-sdk-am335x-evm-05.06.00.00 and MTD-UTILS v1.5.

    # cd ti-sdk-am335x-evm-05.06.00.00/

    1. Create bootable sd card using the pre-built images (MLO, u-boot.img and uImage) located in ti-sdk-am335x-evm-05.06.00.00/board-support/prebuilt-images/ :
    # ./bin/create-sdcard.sh

    2. Remove all contents from rootfs partition on the sd card:
    # sudo rm -rf /media/rootfs/*

    3. Copy and untar the arago-base-tisdk-image-am335x-evm.tar.gz file system to the root partition of the sd card:
    # sudo cp ./filesystem/arago-base-tisdk-image-am335x-evm.tar.gz /media/rootfs/
    # cd /media/rootfs/
    # sudo tar xvf ./arago-base-tisdk-image-am335x-evm.tar.gz
    # cd -

    4. Create a ubinize.cfg file with the following contents:
    [ubifs]
    mode=ubi
    image=ubifs.img
    vol_id=0
    vol_size=192MiB
    vol_type=dynamic
    vol_name=rootfs
    vol_flags=autoresize

    5. Create ubifs.img and ubi.img from the target filesystem located in /media/rootfs/
    # sudo mkfs.ubifs -r /media/rootfs/ -F -o ubifs.img -m 2048 -e 126976 -c 1580
    # ubinize -o ubi.img -m 2048 -p 128KiB -s 512 -O 2048 ubinize.cfg

    6. Copy ubi.img to the /boot partition of the sd card (the pre-built images MLO, u-boot.img and uImage are already there) :
    # cp ubi.img /media/boot/

    7. Shut down the EVM board and be sure that the SW3 switches are set to boot from SD card. Please refer to AM335x_U-Boot_User's_Guide and please note that "ON" is labeled on the wrong side of SW3 boot mode switch (check the picture in the link). You may also want to check Table 26-7. SYSBOOT Configuration Pins from the AM335x TRM - there you can see what would the boot sequence be with the different SW3 configurations. Also please note that the SW3 contains sysboot switches from 0-7 (0 is the leftmost and 7 is the rightmost).
    If these switches are not set correctly, then maybe this might be causing the issues.

    8. Start the EVM board and boot to U-Boot from the SD Card. In U-Boot run the following commands (marked in bold black color in the log below) to write the images from the sd card to NAND:
    (please check the NAND Layout from the AM335x U-Boot User's Guide)

    U-Boot# mmc rescan
    U-Boot# nand erase 0x0 0x10000000

    NAND erase: device 0 whole chip
    Erasing at 0xffe0000 -- 100% complete.
    OK
    U-Boot# fatload mmc 0 0x81000000 MLO
    reading MLO

    85861 bytes read
    U-Boot# cp.b 0x81000000 0x81020000 20000
    U-Boot# cp.b 0x81000000 0x81040000 20000
    U-Boot# cp.b 0x81000000 0x81060000 20000
    U-Boot# fatload mmc 0 0x81080000 u-boot.img
    reading u-boot.img

    355376 bytes read
    U-Boot# fatload mmc 0 0x81280000 uImage
    reading uImage

    3169408 bytes read
    U-Boot# fatload mmc 0 0x81780000 ubi.img
    reading ubi.img

    25690112 bytes read
    U-Boot# nand write 0x81000000 0x0 0x2000000

    NAND write: device 0 offset 0x0, size 0x2000000
     33554432 bytes written: OK
    U-Boot# saveenv
    Saving Environment to NAND...
    Erasing Nand...
    Erasing at 0x260000 -- 100% complete.
    Writing to Nand... done

    9. Shut down the EVM board and be sure to set the switches on SW3 correctly to boot from NAND (refer to the links from step 7.)

    10. Remove the SD card and start the EVM board. Here is what the log messages look like when the board successfully boots entirely from NAND:

    U-Boot SPL 2012.10 (Dec 16 2012 - 13:54:10)


    U-Boot 2012.10 (Dec 16 2012 - 13:54:10)

    I2C:   ready
    DRAM:  512 MiB
    WARNING: Caches not enabled
    NAND:  256 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Peripheral mode controller at 47401000 using PIO, IRQ 0
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Host mode controller at 47401800 using PIO, IRQ 0
    Net:   cpsw, usb_ether
    Hit any key to stop autoboot:  0
    mmc_send_cmd : timeout: No status update
    Card did not respond to voltage select!
    Booting from nand ...

    NAND read: device 0 offset 0x280000, size 0x500000
     5242880 bytes read: OK
    ## Booting kernel from Legacy Image at 80007fc0 ...
       Image Name:   Arago/3.2.0-psp05.06.00.00/am335
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3169344 Bytes = 3 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       XIP Kernel Image ... OK
    OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    [    0.000000] Linux version 3.2.0 (jenkins@sdit-build02) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #1 Sun Dec 16 13:55:55 CST 2012
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] Machine: am335xevm
    [    0.000000] Memory policy: ECC disabled, Data cache writeback
    [    0.000000] AM335X ES1.0 (sgx neon )
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=7,2048 noinitrd rootfstype=ubifs rootwait=1 ip=none
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 512MB = 512MB total
    [    0.000000] Memory: 513144k/513144k available, 11144k reserved, 0K highmem
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    [    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc05a0000   (5728 kB)
    [    0.000000]       .init : 0xc05a0000 - 0xc05de000   ( 248 kB)
    [    0.000000]       .data : 0xc05de000 - 0xc0646448   ( 418 kB)
    [    0.000000]        .bss : 0xc064646c - 0xc0673324   ( 180 kB)
    [    0.000000] NR_IRQS:396
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [    0.000000] Total of 128 interrupts on 1 active controller
    [    0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
    [    0.000000] OMAP clocksource: GPTIMER1 at 32768 Hz
    [    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
    [    0.000000] Console: colour dummy device 80x30
    [    0.000152] Calibrating delay loop... 718.02 BogoMIPS (lpj=3590144)
    [    0.058959] pid_max: default: 32768 minimum: 301
    [    0.059082] Security Framework initialized
    [    0.059173] Mount-cache hash table entries: 512
    [    0.059570] CPU: Testing write buffer coherency: ok
    [    0.080108] omap_hwmod: pruss: failed to hardreset
    [    0.081207] print_constraints: dummy:
    [    0.081573] NET: Registered protocol family 16
    [    0.083770] OMAP GPIO hardware version 0.1
    [    0.086364] omap_mux_init: Add partition: #1: core, flags: 0
    [    0.088348]  omap_i2c.1: alias fck already exists
    [    0.089263]  omap2_mcspi.1: alias fck already exists
    [    0.089508]  omap2_mcspi.2: alias fck already exists
    [    0.090423]  edma.0: alias fck already exists
    [    0.090454]  edma.0: alias fck already exists
    [    0.090484]  edma.0: alias fck already exists
    [    0.117248] bio: create slab <bio-0> at 0
    [    0.119537] SCSI subsystem initialized
    [    0.121154] usbcore: registered new interface driver usbfs
    [    0.121459] usbcore: registered new interface driver hub
    [    0.121673] usbcore: registered new device driver usb
    [    0.121826] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
    [    0.122100] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
    [    0.123229] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
    [    0.125091] tps65910 1-002d: JTAGREVNUM 0x0
    [    0.127502] print_constraints: VRTC:
    [    0.128936] print_constraints: VIO: at 1800 mV
    [    0.131286] print_constraints: VDD1: 600 <--> 1500 mV at 1262 mV normal
    [    0.133575] print_constraints: VDD2: 600 <--> 1500 mV at 1137 mV normal
    [    0.134582] print_constraints: VDD3: 5000 mV
    [    0.135986] print_constraints: VDIG1: at 1800 mV
    [    0.137420] print_constraints: VDIG2: at 1800 mV
    [    0.138824] print_constraints: VPLL: at 1800 mV
    [    0.140289] print_constraints: VDAC: at 1800 mV
    [    0.141693] print_constraints: VAUX1: at 1800 mV
    [    0.143127] print_constraints: VAUX2: at 3300 mV
    [    0.144561] print_constraints: VAUX33: at 3300 mV
    [    0.145996] print_constraints: VMMC: at 3300 mV
    [    0.146484] tps65910 1-002d: No interrupt support, no core IRQ
    [    0.147735] Advanced Linux Sound Architecture Driver Version 1.0.24.
    [    0.148864] Switching to clocksource gp timer
    [    0.164276] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
    [    0.164459] musb-hdrc musb-hdrc.0: dma type: pio
    [    0.164794] MUSB0 controller's USBSS revision = 4ea20800
    [    0.165405] musb-hdrc musb-hdrc.0: USB OTG mode controller at e083c000 using PIO, IRQ 18
    [    0.165588] musb-hdrc musb-hdrc.1: dma type: pio
    [    0.165893] MUSB1 controller's USBSS revision = 4ea20800
    [    0.166076] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [    0.166137] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
    [    0.166290] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [    0.166290] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    0.166320] usb usb1: Product: MUSB HDRC host driver
    [    0.166320] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd
    [    0.166320] usb usb1: SerialNumber: musb-hdrc.1
    [    0.167114] hub 1-0:1.0: USB hub found
    [    0.167144] hub 1-0:1.0: 1 port detected
    [    0.167694] musb-hdrc musb-hdrc.1: USB Host mode controller at e083e800 using PIO, IRQ 19
    [    0.168090] NET: Registered protocol family 2
    [    0.168304] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.168609] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
    [    0.168975] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
    [    0.169158] TCP: Hash tables configured (established 16384 bind 16384)
    [    0.169189] TCP reno registered
    [    0.169189] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.169219] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.169403] NET: Registered protocol family 1
    [    0.169677] RPC: Registered named UNIX socket transport module.
    [    0.169677] RPC: Registered udp transport module.
    [    0.169677] RPC: Registered tcp transport module.
    [    0.169708] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.169952] NetWinder Floating Point Emulator V0.97 (double precision)
    [    0.191192] VFS: Disk quotas dquot_6.5.2
    [    0.191253] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [    0.191802] msgmni has been set to 1002
    [    0.195037] alg: No test for stdrng (krng)
    [    0.195709] io scheduler noop registered
    [    0.195709] io scheduler deadline registered
    [    0.195770] io scheduler cfq registered (default)
    [    0.199523] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
    [    0.817810] console [ttyO0] enabled
    [    0.822082] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    [    0.829925] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    [    0.837677] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
    [    0.845489] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
    [    0.853271] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
    [    0.861511] omap4_rng omap4_rng: OMAP4 Random Number Generator ver. 2.00
    [    0.877838] brd: module loaded
    [    0.885894] loop: module loaded
    [    0.889373] i2c-core: driver [tsl2550] using legacy suspend method
    [    0.895843] i2c-core: driver [tsl2550] using legacy resume method
    [    0.902282] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
    [    0.916198] Detected a daughter card on AM335x EVM..
    [    0.921203] CPLD version: CPLD1.0F
    [    0.924957] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
    [    0.940124] Board name: A33515BB
    [    0.943481] Board version: 1.4A
    [    0.946746] SKU: SKU#01
    [    0.949829] The board is general purpose EVM in profile 0
    [    0.956481]  da8xx_lcdc.0: alias fck already exists
    [    0.962036] da8xx_lcdc da8xx_lcdc.0: GLCD: Found TFC_S9700RTWV35TR_01B panel
    [    0.985656] Console: switching to colour frame buffer device 100x30
    [    1.002319] omap-gpmc omap-gpmc: GPMC revision 6.0
    [    1.007324] Registering NAND on CS0
    [    1.011718]  omap_i2c.2: alias fck already exists
    [    1.016998] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 100 kHz
    [    1.023468] tsl2550 2-0039: standard operating mode
    [    1.029266] tsl2550 2-0039: support ver. 1.2 enabled
    [    1.035125]  davinci-mcasp.1: alias fck already exists
    [    1.040954]  omap_hsmmc.0: alias fck already exists
    [    1.046325]  omap_hsmmc.2: alias fck already exists
    [    1.051910] Configure Bluetooth Enable pin...
    [    1.057891] registered am33xx_sr device
    [    1.062194] _regulator_get: 2-0018 supply Vdd not found, using dummy regulator
    [    1.069824] _regulator_get: 2-0018 supply Vdd_IO not found, using dummy regulator
    [    1.098266] lis3lv02d: 8 bits 3DLH sensor found
    [    1.189941] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input0
    [    1.201782] mtdoops: mtd device (mtddev=name/number) must be supplied
    [    1.209014] omap2-nand driver initializing
    [    1.213684] ONFI flash detected
    [    1.217071] ONFI param page 0 valid
    [    1.220733] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAWP)
    [    1.229278] Creating 8 MTD partitions on "omap2-nand.0":
    [    1.234893] 0x000000000000-0x000000020000 : "SPL"
    [    1.241210] 0x000000020000-0x000000040000 : "SPL.backup1"
    [    1.248107] 0x000000040000-0x000000060000 : "SPL.backup2"
    [    1.255004] 0x000000060000-0x000000080000 : "SPL.backup3"
    [    1.261962] 0x000000080000-0x000000260000 : "U-Boot"
    [    1.269104] 0x000000260000-0x000000280000 : "U-Boot Env"
    [    1.275970] 0x000000280000-0x000000780000 : "Kernel"
    [    1.284515] 0x000000780000-0x000010000000 : "File System"
    [    1.394714] OneNAND driver initializing
    [    1.399444] UBI: attaching mtd7 to ubi0
    [    1.403503] UBI: physical eraseblock size:   131072 bytes (128 KiB)
    [    1.410064] UBI: logical eraseblock size:    126976 bytes
    [    1.415679] UBI: smallest flash I/O unit:    2048
    [    1.420593] UBI: VID header offset:          2048 (aligned 2048)
    [    1.426849] UBI: data offset:                4096
    [    3.550018] UBI: max. sequence number:       85
    [    3.570190] UBI: attached mtd7 to ubi0
    [    3.574096] UBI: MTD device name:            "File System"
    [    3.579864] UBI: MTD device size:            248 MiB
    [    3.585021] UBI: number of good PEBs:        1988
    [    3.589935] UBI: number of bad PEBs:         0
    [    3.594573] UBI: number of corrupted PEBs:   0
    [    3.599182] UBI: max. allowed volumes:       128
    [    3.604003] UBI: wear-leveling threshold:    4096
    [    3.608917] UBI: number of internal volumes: 1
    [    3.613555] UBI: number of user volumes:     1
    [    3.618164] UBI: available PEBs:             0
    [    3.622802] UBI: total number of reserved PEBs: 1988
    [    3.627960] UBI: number of PEBs reserved for bad PEB handling: 19
    [    3.634338] UBI: max/mean erase counter: 2/0
    [    3.638763] UBI: image sequence number:  269484813
    [    3.643890] UBI: background thread "ubi_bgt0d" started, PID 606
    [    3.650695] CAN device driver interface
    [    3.654693] CAN bus driver for Bosch D_CAN controller 1.0
    [    3.709564] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
    [    3.716033] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
    [    3.723449] davinci_mdio.0: probed
    [    3.727020] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
    [    3.734710] usbcore: registered new interface driver zd1201
    [    3.740753] usbcore: registered new interface driver cdc_ether
    [    3.746978] usbcore: registered new interface driver cdc_eem
    [    3.753051] usbcore: registered new interface driver dm9601
    [    3.758880] cdc_ncm: 04-Aug-2011
    [    3.762420] usbcore: registered new interface driver cdc_ncm
    [    3.768341] Initializing USB Mass Storage driver...
    [    3.773712] usbcore: registered new interface driver usb-storage
    [    3.779968] USB Mass Storage support registered.
    [    3.785247] mousedev: PS/2 mouse device common for all mice
    [    3.791992] input: matrix-keypad as /devices/platform/matrix-keypad/input/input1
    [    3.800994] input: ti-tsc as /devices/platform/omap/ti_tscadc/tsc/input/input2
    [    3.809600] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0
    [    3.816772] i2c /dev entries driver
    [    3.821075] Linux video capture interface: v2.00
    [    3.826232] usbcore: registered new interface driver uvcvideo
    [    3.832244] USB Video Class driver (1.1.1)
    [    3.837432] lm75 2-0048: hwmon0: sensor 'tmp275'
    [    3.845184] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    3.853790] cpuidle: using governor ladder
    [    3.858551] cpuidle: using governor menu
    [    3.936523] omap4_aes_mod_init: loading AM33X AES driver
    [    3.942199] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02
    [    3.948730] omap4_aes_probe: probe() done
    [    3.953186] omap4_sham_mod_init: loading AM33X SHA/MD5 driver
    [    3.959320] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03
    [    3.971282] omap4_sham_probe: probe() done
    [    3.978057] usbcore: registered new interface driver usbhid
    [    3.983917] usbhid: USB HID core driver
    [    3.988616] usbcore: registered new interface driver snd-usb-audio
    [    3.999572] mmc1: card claims to support voltages below the defined range. These will be ignored.
    [    4.009674] _regulator_get: 2-001b supply IOVDD not found, using dummy regulator
    [    4.017425] _regulator_get: 2-001b supply DVDD not found, using dummy regulator
    [    4.025146] _regulator_get: 2-001b supply AVDD not found, using dummy regulator
    [    4.032806] _regulator_get: 2-001b supply DRVDD not found, using dummy regulator
    [    4.043365] asoc: tlv320aic3x-hifi <-> davinci-mcasp.1 mapping ok
    [    4.051239] ALSA device list:
    [    4.054351]   #0: AM335X EVM
    [    4.057342] oprofile: hardware counters not available
    [    4.062652] oprofile: using timer interrupt.
    [    4.067108] nf_conntrack version 0.5.0 (8017 buckets, 32068 max)
    [    4.073974] ip_tables: (C) 2000-2006 Netfilter Core Team
    [    4.079650] TCP cubic registered
    [    4.083007] NET: Registered protocol family 17
    [    4.087646] can: controller area network core (rev 20090105 abi 8)
    [    4.094207] NET: Registered protocol family 29
    [    4.098846] can: raw protocol (rev 20090105)
    [    4.103302] can: broadcast manager protocol (rev 20090105 t)
    [    4.109252] Registering the dns_resolver key type
    [    4.114227] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    4.122222] ThumbEE CPU extension supported.
    [    4.126739] mux: Failed to setup hwmod io irq -22
    [    4.132293] Power Management for AM33XX family
    [    4.137145] Trying to load am335x-pm-firmware.bin (60 secs timeout)
    [    4.143829] Copied the M3 firmware to UMEM
    [    4.148315] smartreflex smartreflex: am33xx_sr_probe: Zero NValue read from EFUSE
    [    4.156158] smartreflex: probe of smartreflex failed with error -22
    [    4.163269] sr_init: platform driver register failed
    [    4.173767] clock: disabling unused clocks to save power
    [    4.187713] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
    [    4.195556] mmc1: new SDIO card at address 0001
    [    4.206268] Detected MACID=0:18:31:e2:5f:29
    [    4.211700] cpsw: Detected MACID = 00:18:31:e2:5f:2a
    [    4.218475] input: gpio-keys as /devices/platform/gpio-keys/input/input3
    [    4.226165] omap_rtc am33xx-rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
    [    4.371246] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
    [    4.377502] UBIFS: file system size:   199225344 bytes (194556 KiB, 189 MiB, 1569 LEBs)
    [    4.385894] UBIFS: journal size:       9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
    [    4.393524] UBIFS: media format:       w4/r0 (latest is w4/r0)
    [    4.399597] UBIFS: default compressor: lzo
    [    4.403869] UBIFS: reserved for root:  0 bytes (0 KiB)
    [    4.410949] VFS: Mounted root (ubifs filesystem) on device 0:13.
    [    4.417572] Freeing init memory: 248K
    INIT: version 2.88 booting
    Starting udev
    Starting Bootlog daemon: bootlogd: cannot allocate pseudo tty: No such file or directory
    bootlogd.
    ALSA: Restoring mixer settings...
    Configuring network interfaces... [    8.731964] net eth0: CPSW phy found : id is : 0x4dd074
    udhcpc (v1.19.4) started
    Sending discover...
    Sending discover...
    Sending discover...
    No lease, failing
    done.
    Mon Dec 17 06:08:00 UTC 2012
    INIT: Entering runlevel: 5
    Starting system message bus: dbus.
    Starting telnet daemon.
    Starting syslogd/klogd: done
    Starting thttpd.
    Stopping Bootlog daemon: bootlogd.

     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            

    Arago Project http://arago-project.org am335x-evm ttyO0

    Arago 2012.10 am335x-evm ttyO0

    am335x-evm login: root
    root@am335x-evm:~#

    My environment settings below are almost identical to yours except for the $ethaddr variable (which is normal) and the $filesize variable, but I don't think this would cause any issue since it's only used for importing environment from mmc:

    U-Boot# print
    baudrate=115200
    bootargs_defaults=setenv bootargs console=${console} ${optargs}
    bootcmd=if mmc rescan ${mmcdev}; then echo SD/MMC found on device ${mmcdev};if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;if run loaduimagefat; then run mmcboot;elif run loaduimage; then run mmcboot;else echo Cound not find ${bootfile} ;fi;else run nandboot;fi;
    bootdelay=3
    bootenv=uEnv.txt
    bootfile=uImage
    console=ttyO0,115200n8
    dfu_alt_info=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;kernel part 0 7;rootfs part 0 8
    ethact=cpsw
    ethaddr=00:18:31:e2:5f:29
    fdtaddr=0x80F80000
    filesize=1880000
    importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
    ip_method=none
    kloadaddr=0x80007fc0
    loadaddr=0x80200000
    loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}
    loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz
    loaduimage=ext2load mmc ${mmcdev}:2 ${kloadaddr} /boot/${bootfile}
    loaduimagefat=fatload mmc ${mmcdev} ${kloadaddr} ${bootfile}
    mmcargs=run bootargs_defaults;setenv bootargs ${bootargs} root=${mmcroot} rootfstype=${mmcrootfstype} ip=${ip_method}
    mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${kloadaddr}
    mmcdev=0
    mmcroot=/dev/mmcblk0p2 ro
    mmcrootfstype=ext3 rootwait
    mtdids=nand0=omap2-nand.0
    mtdparts=mtdparts=omap2-nand.0:128k(SPL),128k(SPL.backup1),128k(SPL.backup2),128k(SPL.backup3),1920k(u-boot),128k(u-boot-env),5m(kernel),-(rootfs)
    nandargs=run bootargs_defaults;setenv bootargs ${bootargs} root=${nandroot} noinitrd rootfstype=${nandrootfstype} ip=${ip_method}
    nandboot=echo Booting from nand ...; run nandargs; nand read.i ${kloadaddr} ${nandsrcaddr} ${nandimgsize}; bootm ${kloadaddr}
    nandimgsize=0x500000
    nandroot=ubi0:rootfs rw ubi.mtd=7,2048
    nandrootfstype=ubifs rootwait=1
    nandsrcaddr=0x280000
    netargs=run bootargs_defaults;setenv bootargs ${bootargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
    netboot=echo Booting from network ...; setenv autoload no; dhcp; tftp ${kloadaddr} ${bootfile}; run netargs; bootm ${kloadaddr}
    nfsopts=nolock
    ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}
    ramboot=echo Booting from ramdisk ...; run ramargs; bootm ${loadaddr}
    ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M
    ramrootfstype=ext2
    rdaddr=0x81000000
    rootpath=/export/rootfs
    spiargs=run bootargs_defaults;setenv bootargs ${bootargs} rootfstype=${spirootfstype} ip=${ip_method}
    spiboot=echo Booting from spi ...; run spiargs; sf probe ${spibusno}:0; sf read ${kloadaddr} ${spisrcaddr} ${spiimgsize}; bootm ${kloadaddr}
    spibusno=0
    spiimgsize=0x362000
    spiroot=/dev/mtdblock4 rw
    spirootfstype=jffs2
    spisrcaddr=0x80000
    static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
    stderr=serial
    stdin=serial
    stdout=serial
    usbnet_devaddr=00:18:31:e2:5f:29
    ver=U-Boot 2012.10 (Dec 16 2012 - 13:54:10)

    Environment size: 3102/131068 bytes

    Please try following the steps above and update the thread with your progress.

    Best regards,
    Miroslav

    ---------------------------------------------------------------------------------------------------------------------------------
    Note: If this post answers your question, please click the Verify Answer button on this post.
    ---------------------------------------------------------------------------------------------------------------------------------
  • Miroslave,

    Thank you for the very detailed instructions and outputs.  I followed your instructions exactly and confirmed NAND booting is now working correctly.  Thank you for all your help.

     

    Best Regards,

    John

     

  • My 2 cents to the  's  artwork:

    If your U-boot includes USB mass storage support (it does, from the PSP05.06), you may flash the NAND within seconds

    - from USB flash drive

    - from uSD card inserted in the USB-attched card adapter.

    First, place to the root directory of your card (uSD or USB stick) the files: MLO, u-boot.img, uImage, ubi.img

    Then copy-paste to the U-boot prompt the following 5 command lines, one by one:


    usb start; fatls usb 0

    mw.b 82000000 ff 2000000; fatload usb 0 82000000 MLO

    cp.b 82000000 82020000 20000; cp.b 82000000 82040000 20000; cp.b 82000000 82060000 20000

    fatload usb 0 82080000 u-boot.img;fatload usb 0 82280000 uImage;fatload usb 0 82780000 ubi.img

    nand erase.chip; nand write.i 82000000 0 2000000



  • Hi, I followed the instructions of this post. My filesystem does not charge in VFS. Bellow is showed the log in boot process and my environment variables.

    LOG:

    [ 2.528350] input: gpio-keys as /devices/platform/gpio-keys/input/input3
    [ 2.536010] omap_rtc am33xx-rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
    [ 2.545288] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
    [ 2.552673] Please append a correct "root=" boot option; here are the available partitions:
    [ 2.561431] 1f00 128 mtdblock0 (driver?)
    [ 2.566711] 1f01 128 mtdblock1 (driver?)
    [ 2.571990] 1f02 128 mtdblock2 (driver?)
    [ 2.577270] 1f03 128 mtdblock3 (driver?)
    [ 2.582550] 1f04 1920 mtdblock4 (driver?)
    [ 2.587829] 1f05 128 mtdblock5 (driver?)
    [ 2.593109] 1f06 5120 mtdblock6 (driver?)
    [ 2.598358] 1f07 254464 mtdblock7 (driver?)
    [ 2.603668] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [ 2.612274] Backtrace:
    [ 2.614868] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c0423c5c>] (dump_stack+0x18/0x1c)
    [ 2.623687] r6:df924000 r5:c05cf3ac r4:c0647488 r3:c0600788
    [ 2.629608] [<c0423c44>] (dump_stack+0x0/0x1c) from [<c0423ccc>] (panic+0x6c/0x1a0)
    [ 2.637603] [<c0423c60>] (panic+0x0/0x1a0) from [<c05a0cb4>] (mount_block_root+0x184/0x228)
    [ 2.646331] r3:c0600788 r2:00000000 r1:df82df78 r0:c0500a10
    [ 2.652252] r7:00008000
    [ 2.654876] [<c05a0b30>] (mount_block_root+0x0/0x228) from [<c05a0fd0>] (prepare_namespace+0xac/0x1d4)
    [ 2.664611] [<c05a0f24>] (prepare_namespace+0x0/0x1d4) from [<c05a090c>] (kernel_init+0x124/0x130)
    [ 2.673950] r5:c05dd654 r4:c05dd654
    [ 2.677703] [<c05a07e8>] (kernel_init+0x0/0x130) from [<c0041724>] (do_exit+0x0/0x67c)
    [ 2.685974] r5:c05a07e8 r4:00000000

    ENVIRONMENT VARIABLES:

    U-Boot# print
    baudrate=115200
    boootcmd=bootcmd=if mmc rescan 0; then echo SD/MMC found on device 0;if run loadbootenv;thenenvironment
    bootargs=root=/dev/mtdblock4 rw initrd=0x81280000,128M
    bootargs_defaults=setenv bootargs console=${console} ${optargs}
    bootcmd=run nandboot;
    bootdelay=3
    bootenv=uEnv.txt
    bootfile=uImage
    console=ttyO0,115200n8
    dfu_alt_info=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;kernel part 0 7;rootfs part 0 8
    ethact=cpsw
    ethaddr=00:18:31:e0:9a:d1
    fdtaddr=0x80F80000
    filesize=25A
    importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
    ip_method=none
    kloadaddr=0x80007fc0
    loadaddr=0x80200000
    loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}
    loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz
    loaduimage=ext2load mmc ${mmcdev}:2 ${kloadaddr} /boot/${bootfile}
    loaduimagefat=fatload mmc ${mmcdev} ${kloadaddr} ${bootfile}
    mmcargs=run bootargs_defaults;setenv bootargs ${bootargs} root=${mmcroot} rootfstype=${mmcrootfstype} ip=${ip_method}
    mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${kloadaddr}
    mmcdev=0
    mmcroot=/dev/mmcblk0p2 ro
    mmcrootfstype=ext3 rootwait
    mtdids=nand0=omap2-nand.0
    mtdparts=mtdparts=omap2-nand.0:128k(SPL),128k(SPL.backup1),128k(SPL.backup2),128k(SPL.backup3),1920k(u-boot),128k(u-boot-env),5m(kernel),-(ro
    otfs)
    nandargs=run bootargs_defaults;setenv bootargs ${bootargs} root=${nandroot} noinitrd rootfstype=${nandrootfstype} ip=${ip_method}
    nandboot=echo Booting from nand ...; run nandargs; nand read.i ${kloadaddr} ${nandsrcaddr} ${nandimgsize}; bootm ${kloadaddr}
    nandimgsize=0x500000
    nandroot=ubi0:rootfs rw ubi.mtd=7,2048
    nandrootfstype=ubifs rootwait=1
    nandsrcaddr=0x280000
    netargs=run bootargs_defaults;setenv bootargs ${bootargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
    netboot=echo Booting from network ...; setenv autoload no; dhcp; tftp ${kloadaddr} ${bootfile}; run netargs; bootm ${kloadaddr}
    nfsopts=nolock
    ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}
    ramboot=echo Booting from ramdisk ...; run ramargs; bootm ${loadaddr}
    ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M
    ramrootfstype=ext2
    rdaddr=0x81000000
    root=/dev/mtdblock7
    rootpath=/export/rootfs
    spiargs=run bootargs_defaults;setenv bootargs ${bootargs} rootfstype=${spirootfstype} ip=${ip_method}
    spiboot=echo Booting from spi ...; run spiargs; sf probe ${spibusno}:0; sf read ${kloadaddr} ${spisrcaddr} ${spiimgsize}; bootm ${kloadaddr}
    spibusno=0
    spiimgsize=0x362000
    spiroot=/dev/mtdblock4 rw
    spirootfstype=jffs2
    spisrcaddr=0x80000
    static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
    stderr=serial
    stdin=serial
    stdout=serial
    usbnet_devaddr=00:18:31:e0:9a:d1
    ver=U-Boot 2012.10 (Dec 16 2012 - 13:54:10)

    Environment size: 2937/131068 bytes

    uEnv.txt file:

    serverip=192.168.1.164
    netmask=255.255.255.0
    ipaddr=192.168.1.188
    mmc rescan
    root=/dev/mtdblock7
    bootargs=root=/dev/mtdblock7 rw initrd=0x81280000,64
    ramboot=mmc 0 0x81280000 uImage.bin; mmc 0 0x81780000 ubi.img; bootm 0x81280000

    could someone help me?