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.

am335x u-boot Unknown command 'help' - try 'help'

Hello Ti

We use am335x Starter Kit SDK6 on our custom board and don't found any command in u-boot level after I have build the u-boot.

===========================================

Hit any key to stop autoboot:  0
Unknown command 'mmc' - try 'help'
Unknown command 'mmc' - try 'help'
Unknown command 'run' - try 'help'
U-Boot# help
Unknown command 'help' - try 'help'
U-Boot#

=============================================

These steps we were taking:

  1. cd <SDK_folder>/ti-sdk-am335x-evm-06.00.00.00/board-support/u-boot-2013.01.01-psp06.00.00.00$
  2. export ARCH=arm
  3. export CROSS_COMPILE=~/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-

  4.  export PATH="<SDK INSTALL DIR>/linux-devkit/sysroots/i686-arago-linux/usr/bin:$PATH

  5. make am335x_evm_config

  6  make

====================================================================================

   These are my enviroments:

    $ printenv
SSH_AGENT_PID=2583
GPG_AGENT_INFO=/tmp/keyring-ltTjJC/gpg:0:1
TERM=xterm-256color
SHELL=/bin/bash
XDG_SESSION_COOKIE=c5d844eaa486c24a959661d900000015-1415770149.412823-625948885
WINDOWID=67108869
OLDPWD=/home/bernie/ti-sdk-am335x-evm-06.00.00.00/board-support
GNOME_KEYRING_CONTROL=/tmp/keyring-ltTjJC
LC_ALL=en_US.UTF-8
USER=bernie
JRE_HOME=/usr/lib/jvm/java-6-oracle/jre
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
SSH_AUTH_SOCK=/tmp/keyring-ltTjJC/ssh
SESSION_MANAGER=local/ubuntu:@/tmp/.ICE-unix/2545,unix/ubuntu:/tmp/.ICE-unix/2545
DEFAULTS_PATH=/usr/share/gconf/ubuntu-2d.default.path
WORKON_HOME=/home/bernie/.virtualenvs
PROJECT_HOME=/home/bernie/Devel
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu-2d:/etc/xdg
PATH=/home/bernie/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin:~/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin:/home/bernie/bin:/usr/lib/jvm/java-6-oracle/bin:/usr/lib/jvm/java-6-oracle/jre/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
DESKTOP_SESSION=ubuntu-2d
QT_IM_MODULE=ibus
PWD=/home/bernie/ti-sdk-am335x-evm-06.00.00.00/board-support/u-boot-2013.01.01-psp06.00.00.00
XMODIFIERS=@im=ibus
JAVA_HOME=/usr/lib/jvm/java-6-oracle
GNOME_KEYRING_PID=2534
LANG=en_US.UTF-8
MANDATORY_PATH=/usr/share/gconf/ubuntu-2d.mandatory.path
QMAKESPEC=/home/bernie/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++
UBUNTU_MENUPROXY=libappmenu.so
GDMSESSION=ubuntu-2d
SHLVL=1
HOME=/home/bernie
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
LOGNAME=bernie
XDG_DATA_DIRS=/usr/share/ubuntu-2d:/usr/share/gnome:/usr/local/share/:/usr/share/
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-YPMLNReCd9,guid=86dc88ed93caf9c3a2b0aa750000005e
CLASSPATH=:.:/usr/lib/jvm/java-6-oracle/lib:/usr/lib/jvm/java-6-oracle/jre/lib
LESSOPEN=| /usr/bin/lesspipe %s
ARCH=arm
CROSS_COMPILE=/home/bernie/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-
DISPLAY=:0
XDG_CURRENT_DESKTOP=Unity
GTK_IM_MODULE=ibus
LESSCLOSE=/usr/bin/lesspipe %s %s
COLORTERM=gnome-terminal
XAUTHORITY=/home/bernie/.Xauthority
_=/usr/bin/printenv

============================================================================================

I don't think that my code is wrong , because I just revise the part of read eeprom.   Thank you.

and I attache the patch with u-boot

diff --git a/MLO.byteswap b/MLO.byteswap
index c1b1af2..fa42848 100644
Binary files a/MLO.byteswap and b/MLO.byteswap differ
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 7704718..0837d92 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -90,7 +90,7 @@ int board_is_evm_15_or_later(void)
  * Read header information from EEPROM into global structure.
  */
 static int read_eeprom(void)
-{
+{	
 	/* Check if baseboard eeprom is available */
 	if (i2c_probe(CONFIG_SYS_I2C_EEPROM_ADDR)) {
 		puts("Could not probe the EEPROM; something fundamentally "
@@ -106,12 +106,12 @@ static int read_eeprom(void)
 		return -EIO;
 	}
 
-	if (header.magic != 0xEE3355AA) {
+	//if (header.magic != 0xEE3355AA) {
 		/*
 		 * read the eeprom using i2c again,
 		 * but use only a 1 byte address
 		 */
-		if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 1,
+	/*	if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 1,
 					(uchar *)&header, sizeof(header))) {
 			puts("Could not read the EEPROM; something "
 				"fundamentally wrong on the I2C bus.\n");
@@ -123,7 +123,7 @@ static int read_eeprom(void)
 					header.magic);
 			return -EINVAL;
 		}
-	}
+	}*/
 
 	return 0;
 }
@@ -651,13 +651,16 @@ void s_init(void)
 #endif
 
 	/* Initalize the board header */
-	enable_i2c0_pin_mux();
+	enable_i2c1_pin_mux();
+	i2c_set_bus_num(1);
 	i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
 #ifndef CONFIG_NOR_BOOT
-	if (read_eeprom() < 0)
-		puts("Could not get board ID.\n");
+	//if (read_eeprom() < 0)
+	//	puts("Could not get board ID.\n");
 #endif
 
+	
+
 	/* Check if baseboard eeprom is available */
 	if (i2c_probe(CONFIG_SYS_I2C_EEPROM_ADDR)) {
 		puts("Could not probe the EEPROM; something fundamentally "
@@ -671,12 +674,12 @@ void s_init(void)
 			" wrong on the I2C bus.\n");
 	}
 
-	if (header.magic != 0xEE3355AA) {
+	//if (header.magic != 0xEE3355AA) {
 		/*
 		 * read the eeprom using i2c again,
 		 * but use only a 1 byte address
 		 */
-		if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 1,
+		/*if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 1,
 					(uchar *)&header, sizeof(header))) {
 			puts("Could not read the EEPROM; something "
 				"fundamentally wrong on the I2C bus.\n");
@@ -688,8 +691,11 @@ void s_init(void)
 					header.magic);
 			hang();
 		}
-	}
-
+	}*/
+	header.magic=0xEE3355AA;
+	strcpy(header.name,"A335X_SK");
+	strcpy(header.version,"1.2B");
+	strcpy(header.serial,"8SKU");
 	enable_board_pin_mux(&header);
 	if (!strncmp("A335X_SK", header.name, HDR_NAME_LEN)) {
 		/*
@@ -728,8 +734,8 @@ void s_init(void)
 int board_init(void)
 {
 	i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-	if (read_eeprom() < 0)
-		puts("Could not get board ID.\n");
+	//if (read_eeprom() < 0)
+	//	puts("Could not get board ID.\n");
 
 	gd->bd->bi_boot_params = PHYS_DRAM_1 + 0x100;
 
diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h
index 48e112e..598d4bd 100644
--- a/board/ti/am335x/board.h
+++ b/board/ti/am335x/board.h
@@ -50,5 +50,6 @@ void enable_uart3_pin_mux(void);
 void enable_uart4_pin_mux(void);
 void enable_uart5_pin_mux(void);
 void enable_i2c0_pin_mux(void);
+void enable_i2c1_pin_mux(void);
 void enable_board_pin_mux(struct am335x_baseboard_id *header);
 #endif
diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c
index 85e83bb..529a224 100644
--- a/board/ti/am335x/mux.c
+++ b/board/ti/am335x/mux.c
@@ -275,6 +275,11 @@ void enable_i2c0_pin_mux(void)
 	configure_module_pin_mux(i2c0_pin_mux);
 }
 
+void enable_i2c1_pin_mux(void)
+{
+	configure_module_pin_mux(i2c1_pin_mux);
+}
+
 /*
  * The AM335x GP EVM, if daughter card(s) are connected, can have 8
  * different profiles.  These profiles determine what peripherals are
@@ -349,7 +354,7 @@ void enable_board_pin_mux(struct am335x_baseboard_id *header)
 		configure_module_pin_mux(mmc0_no_cd_pin_mux);
 	} else if (!strncmp(header->name, "A335X_SK", HDR_NAME_LEN)) {
 		/* Starter Kit EVM */
-		configure_module_pin_mux(i2c1_pin_mux);
+		configure_module_pin_mux(i2c0_pin_mux);
 		configure_module_pin_mux(gpio0_7_pin_mux);
 		configure_module_pin_mux(rgmii1_pin_mux);
 		configure_module_pin_mux(mmc0_pin_mux_sk_evm);

  • Hi Bernie,

    I will forward this to the Linux experts.

  • Hi Bernie,

    If you installed SDK 6 well the help commands have to work in u-boot. I type my environment setting because there are some differences. BTW after p.5 the u-boot have to compile and what doing with p6.

    You need to run the <SDK_folder>/bin/setup-package-install.sh script that will install some needed packages to your host linux system. The included toolchain is Linaro GCC 2013.03 (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03). The toolchain resides in <SDK_folder>/linux-devkit/sysroots/i686-arago-linux/usr/bin.

    Setup the system:
    ~/ti-sdk-am335x-evm-06.00.00.00/bin$
    sudo ./setup-package-install.sh

        Export the needed environment:
    export CROSS_COMPILE=arm-linux-gnueabihf-
    export ARCH=arm
    export PATH=$PATH:$HOME/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin

    Build instructions
        How to build the U-Boot:
    export ARCH=arm
    export CROSS_COMPILE=~/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-
    make am335x_evm

        How to build the linux kernel:
    export ARCH=arm
    export CROSS_COMPILE=~/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-
    make tisdk_am335x-evm_defconfig
    make uImage

    BR
    Ivan

  •  

    I follow your steps...

    Setup the system:
    ~/ti-sdk-am335x-evm-06.00.00.00/bin$
    sudo ./setup-package-install.sh

        Export the needed environment:
    export CROSS_COMPILE=arm-linux-gnueabihf-
    export ARCH=arm
    export PATH=$PATH:$HOME/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin

    Build instructions
        How to build the U-Boot:
    export ARCH=arm
    export CROSS_COMPILE=~/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-

    cd ~/ti-sdk-am335x-evm-06.00.00.00/board-support/u-boot-2013.01.01-psp06.00.00.00
    make am335x_evm

     

    The same...........

    Thank you.

  • Hi Ivan

    Maybe you can apply my patch and build MLO and u-boot.img for me so that I can verify our cross-compiler or sdk source code are OK. Thanks

    diff --git a/MLO.byteswap b/MLO.byteswap
    index c1b1af2..fa42848 100644
    Binary files a/MLO.byteswap and b/MLO.byteswap differ
    diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
    index 7704718..0837d92 100644
    --- a/board/ti/am335x/board.c
    +++ b/board/ti/am335x/board.c
    @@ -90,7 +90,7 @@ int board_is_evm_15_or_later(void)
      * Read header information from EEPROM into global structure.
      */
     static int read_eeprom(void)
    -{
    +{	
     	/* Check if baseboard eeprom is available */
     	if (i2c_probe(CONFIG_SYS_I2C_EEPROM_ADDR)) {
     		puts("Could not probe the EEPROM; something fundamentally "
    @@ -106,12 +106,12 @@ static int read_eeprom(void)
     		return -EIO;
     	}
     
    -	if (header.magic != 0xEE3355AA) {
    +	//if (header.magic != 0xEE3355AA) {
     		/*
     		 * read the eeprom using i2c again,
     		 * but use only a 1 byte address
     		 */
    -		if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 1,
    +	/*	if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 1,
     					(uchar *)&header, sizeof(header))) {
     			puts("Could not read the EEPROM; something "
     				"fundamentally wrong on the I2C bus.\n");
    @@ -123,7 +123,7 @@ static int read_eeprom(void)
     					header.magic);
     			return -EINVAL;
     		}
    -	}
    +	}*/
     
     	return 0;
     }
    @@ -651,13 +651,16 @@ void s_init(void)
     #endif
     
     	/* Initalize the board header */
    -	enable_i2c0_pin_mux();
    +	enable_i2c1_pin_mux();
    +	i2c_set_bus_num(1);
     	i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
     #ifndef CONFIG_NOR_BOOT
    -	if (read_eeprom() < 0)
    -		puts("Could not get board ID.\n");
    +	//if (read_eeprom() < 0)
    +	//	puts("Could not get board ID.\n");
     #endif
     
    +	
    +
     	/* Check if baseboard eeprom is available */
     	if (i2c_probe(CONFIG_SYS_I2C_EEPROM_ADDR)) {
     		puts("Could not probe the EEPROM; something fundamentally "
    @@ -671,12 +674,12 @@ void s_init(void)
     			" wrong on the I2C bus.\n");
     	}
     
    -	if (header.magic != 0xEE3355AA) {
    +	//if (header.magic != 0xEE3355AA) {
     		/*
     		 * read the eeprom using i2c again,
     		 * but use only a 1 byte address
     		 */
    -		if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 1,
    +		/*if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 1,
     					(uchar *)&header, sizeof(header))) {
     			puts("Could not read the EEPROM; something "
     				"fundamentally wrong on the I2C bus.\n");
    @@ -688,8 +691,11 @@ void s_init(void)
     					header.magic);
     			hang();
     		}
    -	}
    -
    +	}*/
    +	header.magic=0xEE3355AA;
    +	strcpy(header.name,"A335X_SK");
    +	strcpy(header.version,"1.2B");
    +	strcpy(header.serial,"8SKU");
     	enable_board_pin_mux(&header);
     	if (!strncmp("A335X_SK", header.name, HDR_NAME_LEN)) {
     		/*
    @@ -728,8 +734,8 @@ void s_init(void)
     int board_init(void)
     {
     	i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
    -	if (read_eeprom() < 0)
    -		puts("Could not get board ID.\n");
    +	//if (read_eeprom() < 0)
    +	//	puts("Could not get board ID.\n");
     
     	gd->bd->bi_boot_params = PHYS_DRAM_1 + 0x100;
     
    diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h
    index 48e112e..598d4bd 100644
    --- a/board/ti/am335x/board.h
    +++ b/board/ti/am335x/board.h
    @@ -50,5 +50,6 @@ void enable_uart3_pin_mux(void);
     void enable_uart4_pin_mux(void);
     void enable_uart5_pin_mux(void);
     void enable_i2c0_pin_mux(void);
    +void enable_i2c1_pin_mux(void);
     void enable_board_pin_mux(struct am335x_baseboard_id *header);
     #endif
    diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c
    index 85e83bb..529a224 100644
    --- a/board/ti/am335x/mux.c
    +++ b/board/ti/am335x/mux.c
    @@ -275,6 +275,11 @@ void enable_i2c0_pin_mux(void)
     	configure_module_pin_mux(i2c0_pin_mux);
     }
     
    +void enable_i2c1_pin_mux(void)
    +{
    +	configure_module_pin_mux(i2c1_pin_mux);
    +}
    +
     /*
      * The AM335x GP EVM, if daughter card(s) are connected, can have 8
      * different profiles.  These profiles determine what peripherals are
    @@ -349,7 +354,7 @@ void enable_board_pin_mux(struct am335x_baseboard_id *header)
     		configure_module_pin_mux(mmc0_no_cd_pin_mux);
     	} else if (!strncmp(header->name, "A335X_SK", HDR_NAME_LEN)) {
     		/* Starter Kit EVM */
    -		configure_module_pin_mux(i2c1_pin_mux);
    +		configure_module_pin_mux(i2c0_pin_mux);
     		configure_module_pin_mux(gpio0_7_pin_mux);
     		configure_module_pin_mux(rgmii1_pin_mux);
     		configure_module_pin_mux(mmc0_pin_mux_sk_evm);
    

  • I attach the files.

    http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/791/5618.MLO

    http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/791/3010.u_2D00_boot.img

  • Hi Ivan

      It is work fine!  So it is my cross compiler maybe wrong...

      Is any advise ?

      Thank you.

  • Hi Ivan

    The download web page I referenced is 

        http://software-dl.ti.com/sitara_linux/esd/AM335xSDK/06_00_00_00/index_FDS.html

    and download this one ti-sdk-am335x-evm-06.00.00.00-Linux-x86-Install.bin

     

    right?

    Thank you....

  • Hi Ti


    I found that I unset environment LC_ALL, it is working fine! But I don't know why this would impact result.

    I need someone can response my question. Thank you.

    Bernie

  • Hi Bernie,

    My sent my setting. If this not work, re-install SDK 6.0. The toolchain in a SDK.

    BR
    Ivan

  • Hi Ivan

    Indeed, I have resolved the problem, I unset the environment "LC_ALL", then the u-boot compiled work fine.

    Thank you.