Hi, our headless product consists of AM3352 (Rev 1.0 silicon), MT41K256M16HA-125 DDR3, S34ML04G200TFI000 NAND, TPS65217 PMIC. No ethernet, eMMC, SD Card, etc. We're using SDK 06.00.00.00
HW design has been validated. spl, u-boot, & kernel are all ported and running great. We've been loading NAND using serial connection and it is so painfully slow. We are releasing the design to production and we've purchased 1K of the AM3352 parts but they're all 1.0 silicon and USB boot won't work in the ROM loader. We obviously need a better option for loading flash in production so we're using Uniflash in combination with special loads of spl & uboot built using am335x_evm_restore_flash_usbspl & am335x_evm_uart_usbspl make targets. We load the special version of spl over serial then Uniflash takes over and loads the special u-boot build that consumes the concatenated image consisting of MLO, u-boot.img, uImage, & ubi.img and stores them into flash using debrick.scr. Programming completes successfully (see log below); however, u-boot cannot boot the kernel. It gives us the following error:
Wrong Image Format for bootm command
ERROR: can't get kernel image!
We've tried changing bootargs with:
What are we doing wrong? We can load the same exact images over serial and everything works just fine.
Thanks!
Phillip
Here's the log:
CCC?OpenSSL libraries do not match required version:
. C-Kermit built with OpenSSL 1.0.0e 6 Sep 2011
. Version found OpenSSL 1.0.1 14 Mar 2012
OpenSSL versions prior to 1.0.0 must be the same.
Set LD_LIBRARY_PATH for OpenSSL 1.0.0e 6 Sep 2011.
Or rebuild C-Kermit from source on this computer to make versions agree.
C-Kermit makefile target: linux+krb5+openssl
Or if that is what you did then try to find out why
the program loader (image activator) is choosing a
different OpenSSL library than the one specified in the build.
All SSL/TLS features disabled.
Target Search...
SUCCEEDED Target Search.
Load SPL RAM Image...
SUCCEEDED SPL RAM Image Load.
Connecting to /dev/ttyUSB0, speed 115200
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
u-boot SPL 2013.01.01-g8745ebe-dirty (Feb 18 2015 - 10:06:56)
2015_02_16 12:40 genesis
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
boot_device = 68
Using default environment
usb_ether
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC d0:ff:50:23:ba:0b
HOST MAC de:ad:be:af:00:00
RNDIS ready
musb-hdrc: peripheral reset irq lost!
high speed config #2: 2 mA, Ethernet Gadget, using RNDIS
USB RNDIS network up!
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
Using usb_ether device
TFTP from server 192.168.100.1; our IP address is 192.168.100.2
Filename 'u-boot-restore.img'.
Load address: 0x807fffc0
Loading: *########################
836.9 KiB/s
done
Bytes transferred = 346320 (548d0 hex)
U-Boot 2013.01.01-g8745ebe-dirty (Feb 18 2015 - 10:09:18)
I2C: ready
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: 512 MiB
*** Warning - bad CRC, using default environment
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: <ethaddr> not set. Validating first E-fuse MAC
wait_for_user_access Timeout
wait_for_user_access Timeout
wait_for_user_access Timeout
wait_for_user_access Timeout
wait_for_user_access Timeout
wait_for_user_access Timeout
PHY reset timed out
wait_for_user_access Timeout
wait_for_user_access Timeout
wait_for_user_access Timeout
wait_for_user_access Timeout
wait_for_user_access Timeout
wait_for_user_access Timeout
wait_for_user_access Timeout
wait_for_user_access Timeout
wait_for_user_access Timeout
wait_for_user_access Timeout
wait_for_user_access Timeout
wait_for_user_access Timeout
wait_for_user_access Timeout
wait_for_user_access Timeout
cpsw, usb_ether
Hit any key to stop autoboot: 0
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC d0:ff:50:23:ba:0b
HOST MAC de:ad:be:af:00:00
RNDIS ready
musb-hdrc: peripheral reset irq lost!
high speed config #2: 2 mA, Ethernet Gadget, using RNDIS
USB RNDIS network up!
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 192.168.100.2
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC d0:ff:50:23:ba:0b
HOST MAC de:ad:be:af:00:00
RNDIS ready
high speed config #2: 2 mA, Ethernet Gadget, using RNDIS
USB RNDIS network up!
Using usb_ether device
TFTP from server 192.168.100.1; our IP address is 192.168.100.2
Filename 'debrick.scr'.
Load address: 0x80000000
Loading: *T #
1000 Bytes/s
done
Bytes transferred = 8406 (20d6 hex)
## Executing script at 80000000
Indicates to the host the Debrick script is running
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC d0:ff:50:23:ba:0b
HOST MAC de:ad:be:af:00:00
RNDIS ready
high speed config #2: 2 mA, Ethernet Gadget, using RNDIS
USB RNDIS network up!
Using usb_ether device
TFTP from server 192.168.100.1; our IP address is 192.168.100.2
Filename 'DebrickTargetReady:d0:ff:50:23:ba:0b'.
Load address: 0x80001000
Loading: *T
TFTP error: 'File not found or No Access' (1)
Not retrying...
Erasing NAND
NAND erase.chip: device 0 whole chip
Erasing at 0x1ffe0000 -- 100% complete.
OK
NAND Erased
Get Image containing all images to be flashed
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC d0:ff:50:23:ba:0b
HOST MAC de:ad:be:af:00:00
RNDIS ready
high speed config #2: 2 mA, Ethernet Gadget, using RNDIS
USB RNDIS network up!
Using usb_ether device
TFTP from server 192.168.100.1; our IP address is 192.168.100.2
Filename 'flash-image.out'.
Load address: 0x80200000
Loading: #################################################################
686.5 KiB/s
done
Bytes transferred = 27179008 (19eb800 hex)
Got Flash Image
NAND write: device 0 offset 0x0, size 0x136a1
79521 bytes written: OK
MLO succesfully programmed
NAND write: device 0 offset 0x80000, size 0x54870
346224 bytes written: OK
u-boot.img succesfully programmed
NAND write: device 0 offset 0x280000, size 0x2a2778
2762616 bytes written: OK
uImage succesfully programmed
NAND write: device 0 offset 0x780000, size 0x16e0000
23986176 bytes written: OK
ubi.img succesfully programmed
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC d0:ff:50:23:ba:0b
HOST MAC de:ad:be:af:00:00
RNDIS ready
high speed config #2: 2 mA, Ethernet Gadget, using RNDIS
USB RNDIS network up!
Using usb_ether device
TFTP from server 192.168.100.1; our IP address is 192.168.100.2
Filename 'TargetProgrammingComplete:d0:ff:50:23:ba:0b'.
Load address: 0x80001000
Loading: *T
TFTP error: 'File not found or No Access' (1)
Not retrying...
Target Flash Complete........
U-Boot# nand read 0x82000000 0x280000 0x2A2778
NAND read: device 0 offset 0x280000, size 0x2a2778
2762616 bytes read: OK
U-Boot# bootm 0x82000000
Wrong Image Format for bootm command
ERROR: can't get kernel image!
U-Boot#
Here's the debrick.scr
# Module: debrick script
#
# Description: This program is used to demostrate concatenate binary
# images.
#
# Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the
# distribution.
#
# Neither the name of Texas Instruments Incorporated nor the names of
# its contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#
# expect the following parameters to be set outside this script
# serverip which should happen as part of the dhcp process
#
setenv READY_RETRY_DELAY 5
setenv IMAGE_CNT 4
# Name of Image containing all images to be tftp'd from host
setenv ImageName flash-image.out
#Name of Images to be flashed
setenv Image1_Name MLO
setenv Image2_Name u-boot.img
setenv Image3_Name uImage
setenv Image4_Name ubi.img
# Image offsets into NAND - these are defined in the linux board file
setenv Image1_NAND_Offset 0x0
setenv Image2_NAND_Offset 0x80000
setenv Image3_NAND_Offset 0x280000
setenv Image4_NAND_Offset 0x780000
# Image offsets in ddr
# This has to be calculated from the load address
# this assumes the load address is 0x80200000
# Use the load address and the offset provided from the flash-cat utility to calculate
#setenv Image1_DDR_ADDR 0x80200000
#setenv Image2_DDR_ADDR 0x80219000
#setenv Image3_DDR_ADDR 0x80272000
#setenv Image4_DDR_ADDR 0x8057E000
#The below DDR addresses are for genesis
setenv Image1_DDR_ADDR 0x80200000
setenv Image2_DDR_ADDR 0x80213800
setenv Image3_DDR_ADDR 0x8027C000
setenv Image4_DDR_ADDR 0x80587000
# These numbers come from the flash-cat utility
#setenv Image1_Length 0x1880D
#setenv Image2_Length 0x58E00
#setenv Image3_Length 0x30BE18
#setenv Image4_Length 0x19A0000
#The below lengths are for genesis
setenv Image1_Length 0x136A1
setenv Image2_Length 0x54870
setenv Image3_Length 0x2A2778
setenv Image4_Length 0x16E0000
# Set File Names to indicate progress <DO NOT MODIFY>
setenv DebrickTargetReady DebrickTargetReady:${ethaddr}
setenv TargetProgrammingComplete TargetProgrammingComplete:${ethaddr}
setenv TargetErrorExit TargetErrorExit:${ethaddr}
setenv TargetEraseError TargetEraseError:${ethaddr}
setenv TargetProgrammingError TargetProgrammingError:${ethaddr}
setenv TargetGetFileError TargetGetFileError:${ethaddr}
#Need to halt processor due to a processing error in the script
setenv DataAbort 'echo Halting processor.....; go 0x2001c;'
# Define addresses where the messages will be sourced for the TFTP puts
setenv image_msg1_addr 0x80008100
# Define System status messages of flashing <DO NOT MODIFY>
#setenv GetReadyFileFromHost "tftp 0x80001000 ${serverip}:${HostReadyFile}"
setenv DebrickStartingToHost "tftp 0x80001000 ${serverip}:${DebrickTargetReady}"
setenv TargetProgrammingComplete "tftp 0x80001000 ${serverip}:${TargetProgrammingComplete}"
setenv TargetProgrammingFailure "tftp 0x80001000 ${serverip}:${TargetProgrammingError}"
setenv TargetErrorExit "tftp 0x80001000 ${serverip}:${TargetErrorExit}"
setenv TargetEraseErrorExit "tftp 0x80001000 ${serverip}:${TargetEraseError}"
setenv TargetGetFileFailure "tftp 0x80001000 ${serverip}:${TargetGetFileError}"
# Define Image get command <DO NOT MODIFY>
setenv GetImage 'tftpboot ${loadaddr} ${serverip}:${ImageName}'
# Define Image succesful Complete get commands, these requests are detected
# the gets will fail as the files don't exist, that ok. Using this as a
# feedback feedback mechanism to indicate statusi
# <DO NOT MODIFY>
setenv DoneWithImage "tftp ${image_msg1_addr} ${serverip}:${ImageName}_Complete"
# Erase NAND Macro <Does not need to be Modified, typically>
#
setenv EraseNand 'echo Erasing NAND; if nand erase.chip; then echo NAND Erased; echo; else echo NAND Erase Failure Error Exit; run TargetEraseErrorExit; run TargetErrorExit; run DataAbort; fi;'
# Get Image Macro <Does not need to be Modified, typically>
setenv GetFlashImage 'if run GetImage; then echo; echo Got Flash Image; else echo Get Flash Image Failed;run TargetGetFileFailure;run TargetErrorExit; run DataAbort; fi;'
# Flash Image Macro <Does not need to be Modified, typically>
setenv FlashImage 'if nand write ${source_addr} ${storage_offset} ${image_length}; then echo; echo ${ImageName} succesfully programmed;echo; else echo ${ImageName} Programming Failed... error exit;run TargetProgrammingFailure;run TargetErrorExit;echo; run DataAbort; fi;'
# -------------------------------------------------------------------
# --- Execution Starts Here
# -------------------------------------------------------------------
# --- Start The Process of Flashing
#
echo
echo "Indicates to the host the Debrick script is running"
echo
run DebrickStartingToHost
#
#run EraseChip
run EraseNand
#
# <<<<<<<<<<<< Start of Image Flashing>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#
# -------------------------------------------------------------------
# Get the single image containing all the files.
# -------------------------------------------------------------------
echo
echo Get Image containing all images to be flashed
echo
run GetFlashImage
# -------------------------------------------------------------------
# Add a section for each Image to be flashed
# For each Image to be flashed you will need to set the
# following environments:
# - Source Address in the Single Image
# - Storage Offset into the Storage device
# - Length of the image
# - Image Name
# -------------------------------------------------------------------
# Flash Image 1
#--------------------------------------------------------------------
setenv source_addr ${Image1_DDR_ADDR}
setenv storage_offset ${Image1_NAND_Offset}
setenv image_length ${Image1_Length}
setenv ImageName ${Image1_Name}
run FlashImage
#--------------------------------------------------------------------
# Flash Image 2
#--------------------------------------------------------------------
setenv source_addr ${Image2_DDR_ADDR}
setenv storage_offset ${Image2_NAND_Offset}
setenv image_length ${Image2_Length}
setenv ImageName ${Image2_Name}
run FlashImage
#--------------------------------------------------------------------
# Flash Image 3
#--------------------------------------------------------------------
setenv source_addr ${Image3_DDR_ADDR}
setenv storage_offset ${Image3_NAND_Offset}
setenv image_length ${Image3_Length}
setenv ImageName ${Image3_Name}
run FlashImage
#--------------------------------------------------------------------
# Flash image 4
#--------------------------------------------------------------------
setenv source_addr ${Image4_DDR_ADDR}
setenv storage_offset ${Image4_NAND_Offset}
setenv image_length ${Image4_Length}
setenv ImageName ${Image4_Name}
run FlashImage
#--------------------------------------------------------------------
#
# <<<<<<<<<<<<< End of Image Flashing >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#
#
# -------------------------------------------------------------------
# Indicate to Host successful completion
run TargetProgrammingComplete
echo
echo " Target Flash Complete........"
echo