tftpboot ${loadaddr} uImage problem

cancel
Showing results for 
Search instead for 
Did you mean: 

tftpboot ${loadaddr} uImage problem

429 Views
caoping
Contributor II

now i want to boot from SPI3:0,and i modify the code like this:

void spi_io_init(struct imx_spi_dev_t *dev)
{
u32 reg;

switch (dev->base) {
case ECSPI1_BASE_ADDR:
  /* Enable clock */
  reg = readl(CCM_BASE_ADDR + CLKCTL_CCGR1);
  reg |= 0x3;
  writel(reg, CCM_BASE_ADDR + CLKCTL_CCGR1);

#if defined CONFIG_MX6Q
  /* SCLK */
  mxc_iomux_v3_setup_pad(MX6Q_PAD_KEY_COL0__ECSPI1_SCLK);

  /* MISO */
  mxc_iomux_v3_setup_pad(MX6Q_PAD_KEY_COL1__ECSPI1_MISO);

  /* MOSI */
  mxc_iomux_v3_setup_pad(MX6Q_PAD_KEY_ROW0__ECSPI1_MOSI);

  mxc_iomux_v3_setup_pad(MX6Q_PAD_KEY_ROW1__ECSPI1_SS0);
#elif defined CONFIG_MX6DL
  /* SCLK */
  mxc_iomux_v3_setup_pad(MX6DL_PAD_KEY_COL0__ECSPI1_SCLK);

  /* MISO */
  mxc_iomux_v3_setup_pad(MX6DL_PAD_KEY_COL1__ECSPI1_MISO);

  /* MOSI */
  mxc_iomux_v3_setup_pad(MX6DL_PAD_KEY_ROW0__ECSPI1_MOSI);

  mxc_iomux_v3_setup_pad(MX6DL_PAD_KEY_ROW1__ECSPI1_SS0);
#endif
  break;
case ECSPI2_BASE_ADDR:
case ECSPI3_BASE_ADDR:
  /* ecspi2-3 fall through */
  break;
default:
  break;
}

s32 spi_get_cfg(struct imx_spi_dev_t *dev)
{
switch (dev->slave.cs) {
case 0:
  /* SPI-NOR */
  dev->base = ECSPI1_BASE_ADDR;
  dev->freq = 25000000;
  dev->ss_pol = IMX_SPI_ACTIVE_LOW;
  dev->ss = 0;
  dev->fifo_sz = 64 * 4;
  dev->us_delay = 0;
  break;
case 1:
  /* SPI-NOR */
  dev->base = ECSPI1_BASE_ADDR;
  dev->freq = 25000000;
  dev->ss_pol = IMX_SPI_ACTIVE_LOW;
  dev->ss = 1;
  dev->fifo_sz = 64 * 4;
  dev->us_delay = 0;
  break;
default:
  printf("Invalid Bus ID!\n");
}

return 0;

}

and under uboot, when i input:

MX6Q  U-Boot > sf probe 2:0

it display like this:

JEDEC ID: 0x20:0x20:0x16

4096 KiB M25P32 - 4MB at 2:0 is now current device

but when i use tftpboot cmd,errors occur:

MX6Q  U-Boot > tftpboot ${loadaddr} uImage

PHY indentify @ 0x0 = 0x0007c0f1

FEC: Link is Up 782d

Using FEC0 device

TFTP from server 192.168.3.153; our IP address is 192.168.3.221

Filename 'uImage'.

Load address: 0x10800000

Loading: TX timeout packet at 2786e2c0

TX timeout packet at 2786e2c0

TX not ready

TX timeout packet at 2786e2c0

T TX not ready

TX timeout packet at 2786e2c0

and when the image starts in linux,it can exchange data with my computer by net,so i don't why it can not transfer data with tftp?

Labels (2)
3 Replies

110 Views
caoping
Contributor II

may be the ethernet communication problem,i use lan8720,

now i' ve coped uImage from mmc to spi, and i'm finding ways to use MFG tool to burn SPI3:0,

0 Kudos

110 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Have you tried to reproduce the problem in one of our boards?

Is it a custom hardware? If you use other SPI module you have the same error?

When you say you want to boot from SPI, do you mean fetching the rootfs or kernel from serial flash? or get U-boot Image from serial flash?

Best Regards,

Alejandro

0 Kudos

110 Views
justin_jiang
NXP Employee
NXP Employee

what's your boot command? You can refer to below command.

  U-Boot > setenv loadaddr 0x10800000
  U-Boot > setenv bootdelay 3

  U-Boot > setenv serverip 10.192.241.222
  U-Boot > setenv tftpaddr 10.192.241.222
  U-Boot > setenv kernel uImage

  U-Boot > setenv bootcmd_net 'run bootargs_base bootargs_nfs;bootp ${loadaddr} ${tftpaddr}:${kernel};bootm'