Hi team,
I am using the imx6qsabresd board, and using the UUU tool to flash the image into that. I am using uboot version U-Boot 2021.04.
But uboot 'saveenv' command is not working .Giving below error.
Saving Environment to MMC...
No block device
Failed (1)
I have turned on below configuration in uboot then also its giving same error.
CONFIG_CMD_SAVEENV=y
CONFIG_CMD_ERASEENV=y
CONFIG_CMD_ENV_EXISTS=y
Please help me on this issue.
Regards,
Rk
Hi,
It look like you're having trouble with the 'saveenv' command in U-Boot on your imx6qsabresd board. The error message you're seeing suggests that U-Boot can't find the block device where it's supposed to save the environment variables.
One possible reason for this could be that the MMC device isn't properly configured in U-Boot. You might need to set the 'mmcdev' environment variable to the correct MMC device number.
Regards
Thanks Ramprakash for reply,
I am using UUU tool to flash the image into device with below uboot config. I am using the below uboot configuration to set the mmcdev. But in uboot terminal when i looked for mmcdev , its not availalble.
# }
# use uboot burn bootloader to eMMC
# becaue difference chip, offset is difference
# you can use kernel to do that for specific boards
FB: ucmd setenv fastboot_dev mmc3
FB: ucmd setenv mmcdev ${emmc_dev}
FB: flash bootloader u-boot-dtb.imx
FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;
FB: ucmd setenv emmc_cmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0
#flashing the kernel image
U-Boot > printenv mmcdev
## Error: "mmcdev" not defined
But I am not using saveenv command in UUU script . Could it be the possible reason?
Regards,
Rk
Maybe you can check the following discussion.
Re: saveenv is not working from uuu script - NXP Community
Hi @rakesh3
Thanks Dhruvit for your respond,
I think, I am using the same configuration in the UUU script. Below is my UUU script for loading the uboot.
uuu_version 1.5.21
# This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
SDP: boot -f u-boot-dtb.imx
# This command will be run when ROM support stream mode
# i.MX8QXP, i.MX8QM
SDPS: boot -f u-boot-dtb.imx
# These commands will be run when use SPL and will be skipped if no spl
# SDPU will be deprecated. please use SDPV instead of SDPU
# {
SDPU: delay 1000
SDPU: write -f u-boot-dtb.imx -offset 0x57c00
SDPU: jump
# }
# These commands will be run when use SPL and will be skipped if no spl
# if (SPL support SDPV)
# {
SDPV: delay 1000
SDPV: write -f u-boot-dtb.imx -skipspl
SDPV: jump
# }
# use uboot burn bootloader to eMMC
# becaue difference chip, offset is difference
# you can use kernel to do that for specific boards
FB: ucmd setenv fastboot_dev mmc3
FB: ucmd setenv mmcdev ${emmc_dev}
FB: ucmd mmc dev ${emmc_dev}
I using the below uboot config
CONFIG_ENV_SUPPORT=y
CONFIG_SAVEENV=y
CONFIG_CMD_SAVEENV =y
CONFIG_ENV_OFFSET=0xE0000
# CONFIG_CMD_ERASEENV is not set
CONFIG_CMD_TFTPBOOT=y
# CONFIG_ENV_IS_NOWHERE is not set
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_MMC_ENV_DEV=2
CONFIG_SYS_MMC_ENV_PART=0
# CONFIG_SUPPORT_EMMC_BOOT is not set
But on flashing the board with UUU tools using above UUU script then its showing the below o/p.
flash target is MMC:3
But after flashing the board when Its reboot its changing the MMC and showing below o/p.
flash target is MMC:2
and on using the ">saveenv " command its giving
No block device
Failed (1)
Please have a look into this script and help me if any thing seems misconfigure in this.
Hi jackie, thanks for reply,
I am also using the same
uuu_version 1.5.21
# This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
SDP: boot -f u-boot-dtb.imx
# This command will be run when ROM support stream mode
# i.MX8QXP, i.MX8QM
SDPS: boot -f u-boot-dtb.imx
# These commands will be run when use SPL and will be skipped if no spl
# SDPU will be deprecated. please use SDPV instead of SDPU
# {
SDPU: delay 1000
SDPU: write -f u-boot-dtb.imx -offset 0x57c00
SDPU: jump
# }
# These commands will be run when use SPL and will be skipped if no spl
# if (SPL support SDPV)
# {
SDPV: delay 1000
SDPV: write -f u-boot-dtb.imx -skipspl
SDPV: jump
# }
# use uboot burn bootloader to eMMC
# becaue difference chip, offset is difference
# you can use kernel to do that for specific boards
FB: ucmd setenv fastboot_dev mmc3
FB: ucmd setenv mmcdev ${emmc_dev}
FB: ucmd mmc dev ${emmc_dev}
FB: ucmd saveenv
FB: flash bootloader u-boot-dtb.imx
#FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;
#FB: ucmd setenv emmc_cmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0
#FB: ucmd saveenv
FBK: DONE
But I am getting below error on using the saveenv command in UUU .
New USB Device Attached at 2:8
2:8>Start Cmd:SDP: boot -f u-boot-dtb.imx
100%2:8>Okay (1.399s)
New USB Device Attached at 2:8
New USB Device Attached at 1:9
1:9>Start Cmd:SDP: boot -f u-boot-dtb.imx
100%1:9>Okay (1.283s)
New USB Device Attached at 1:9
1:9>Start Cmd:FB: ucmd setenv fastboot_dev mmc3
1:9>Okay (0.001s)
1:9>Start Cmd:FB: ucmd setenv mmcdev ${emmc_dev}
1:9>Okay (0s)
1:9>Start Cmd:FB: ucmd saveenv
1:9>Fail Bulk(R):LIBUSB_ERROR_IO(0.148s)
1:9>Start Cmd:FB: flash bootloader u-boot-dtb.imx
0x400000001:9>Okay (0.18s)
1:9>Start Cmd:FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;
1:9>Okay (0.001s)
1:9>Start Cmd:FB: ucmd setenv emmc_cmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0
1:9>Okay (0s)
and on terminal , I am getting below.
U-Boot 2021.04-00007-g7ea82d90df-dirty (Feb 28 2023 - 18:09:37 +0530)
I am getting "LIBUSB_ERROR_IO(0.148s)" error while using the saveenv cmd in UUU.
But on reboot its "falsh target is getting to MMC:2 " and then all issue starts.
flash target is MMC:2
Card did not respond to voltage select! : -110
MMC card init failed!
Card did not respond to voltage select! : -110
** Block device MMC 2 not supported
Is this line correct ? Not mentioning the mmc dev in fastboot_dev any thing ?
Below is my u-boot fast boot configuration for emmc_dev 3.
+CONFIG_CMD_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_FASTBOOT_UUU_SUPPORT=y
+CONFIG_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x12000000
+CONFIG_FASTBOOT_BUF_SIZE=0x40000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=3
+CONFIG_EFI_PARTITION=y
+CONFIG_DISTRO_DEFAULTS=y
+CONFIG_USB_GADGET_MANUFACTURER="FSL"
+CONFIG_USB_GADGET_VENDOR_NUM=0x0525
+CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
Please suggest on this error .
Hi @rakesh3,
Sorry , I dont have that file in my rootfs.
/etc# ls -l fw_env.config
ls: cannot access 'fw_env.config': No such file or directory
How to get that file or enable any config for this ?
Do we need the fastboot configuration to use below in UUU.
FB: ucmd setenv fastboot_dev mmc3
FB: ucmd setenv mmcdev ${emmc_dev}
FB: ucmd saveenv
Sorry ,I am not using the EVK board here, I am using the custom board based on imx6dsabresd.
Please help on this.
Regards,
Rk
Hi @rakesh3,
=> For the Uboot config-related information please refer to section 10 Uboot config requirement from UUU.pdf.