can not save parameters into SD in boot in IMX6QSD

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

can not save parameters into SD in boot in IMX6QSD

Jump to solution
6,325 Views
jojorong
Contributor IV

Hi,

    I can not save parameters into SD in boot in IMX6QSD with bellow SD, but i use the classc 4 SD is ok, any limits with bellow SD or my mistake ?

  TOSHIBA EXCERIA Type Ⅱ SDHC-16G UHS/CL10 R95M W60M

    I want to use speeder SD to start up my image :smileysad:

    

U-Boot > printenv

baudrate=115200

boot_fdt=try

bootcmd=mmc dev ${mmcdev};if mmc rescan; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run netboot; fi; fi; else run netboot; fi

bootdelay=1

bootscript=echo Running bootscript from mmc ...; source

console=ttymxc0

ethact=FEC

ethaddr=00:04:9f:02:6f:9e

ethprime=FEC

fdt_addr=0x11000000

fdt_file=imx6q-sabresd.dtb

fdt_high=0xffffffff

initrd_high=0xffffffff

ip_dyn=yes

loadaddr=0x12000000

loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};

loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}

loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}

mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot}

mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootm ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootm; else echo WARN: Cannot load the DT; fi; fi; else bootm; fi;

mmcdev=1

mmcpart=1

mmcroot=/dev/mmcblk1p2 rootwait rw

netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp

netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${uimage}; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then bootm ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootm; else echo WARN: Cannot load the DT; fi; fi; else bootm; fi;

script=boot.scr

stderr=serial

stdin=serial

stdout=serial

uimage=uImage

Environment size: 1691/8188 bytes

U-Boot > setenv mmcargs 'setenv bootargs console=${console},${baudrate} root=${mmcroot} video=mxcfb1:off video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 dmfc=3'

U-Boot > saveenv

Saving Environment to MMC...

MMC partition switch failed

U-Boot > saveenv

Saving Environment to MMC...

Writing to MMC(1)... failed

U-Boot >

Labels (3)
0 Kudos
Reply
1 Solution
3,750 Views
jojorong
Contributor IV

This issue is fixed by yocto branch dora duto my testing :smileyhappy:

View solution in original post

0 Kudos
Reply
7 Replies
3,750 Views
sinanakman
Senior Contributor III

Hi Jojo, I have a sabresd board here and with mainline u-boot I can save the env to SD without a problem. Is this what you are trying to achieve ?

As Vladan notes, the ERROR in your post above is not related to saving env to SD.

0 Kudos
Reply
3,751 Views
jojorong
Contributor IV

This issue is fixed by yocto branch dora duto my testing :smileyhappy:

0 Kudos
Reply
3,750 Views
VladanJovanovic
NXP Employee
NXP Employee

Try inserting the SD card to the other SD slot and boot from it (you will have to change boot device in boot switches in SW6 as well).

You're probably booting from MMC 0 or 2 (don't remember right now how u-boot numers them), and u-boot is trying to save to MMC 1.

0 Kudos
Reply
3,750 Views
jojorong
Contributor IV

Hi,

     I switch to SD2 to boot up, but it's failed as bellow, how to setup the boot line ?

U-Boot 2013.04-00053-g08868db (Sep 12 2013 - 11:15:29)

CPU:   Freescale i.MX6Q rev1.2 at 792 MHz

Reset cause: POR

Board: MX6Q-SabreSD

DRAM:  1 GiB

MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2

MMC: no card present

MMC init failed

Using default environment

In:    serial

Out:   serial

Err:   serial

Net:   FEC [PRIME]

Warning: FEC using MAC address from net device

Hit any key to stop autoboot:  0

MMC: no card present

mmc1(part 0) is current device

MMC: no card present

Booting from net ...

FEC Waiting for PHY auto negotiation to complete. done

BOOTP broadcast 1

DHCP client bound to address 192.168.10.238

Using FEC device

TFTP from server 0.0.0.0; our IP address is 192.168.10.238; sending through gateway 192.168.10.1

Filename 'uImage'.

Load address: 0x12000000

Loading: #################################################################

         #################################################################

         #################################################################

         #################################################################

         #####

         3 MiB/s

done

Bytes transferred = 3887020 (3b4fac hex)

BOOTP broadcast 1

DHCP client bound to address 192.168.10.238

Using FEC device

TFTP from server 0.0.0.0; our IP address is 192.168.10.238; sending through gateway 192.168.10.1

Filename 'imx6q-sabresd.dtb'.

Load address: 0x11000000

Loading: *

TFTP error: 'File not found' (1)

Not retrying...

Wrong Image Format for bootm command

ERROR: can't get kernel image!

0 Kudos
Reply
3,750 Views
VladanJovanovic
NXP Employee
NXP Employee

Can you save parameters to SD card?

For new issue please open a new topic and close this one if solved.

In general, you can see in what step u-boot is failing, so please check if that file is available in your TFTP server's location. Unless you're using mainline kernel with device tree support, you'll probably just want to load uImage directly. follow instructions in Linux User Guide (check documentation package for Linux) to see how to load system via TFTP/NFS.

0 Kudos
Reply
3,750 Views
jojorong
Contributor IV

Hi,

     I switch to SD2 to boot up, but it's failed as bellow, it's the same problems with SD3

U-Boot > mmc parts   

Partition Map for MMC device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type

  1     8192            16384           000eb2b7-01     0c

  2     24576           1753088         000eb2b7-02     83

U-Boot > setenv mmcdev 0

U-Boot > saveenv

Saving Environment to MMC...

MMC: no card present

MMC init failed

0 Kudos
Reply
3,750 Views
sinanakman
Senior Contributor III

Are you able to write anything with mmc write to that device ?

0 Kudos
Reply