Hashimoto Kenichi 0 Posted June 5, 2023 (edited) The following settings were made to save the u-boot env to eMMC. U-Boot 2022.01 CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_MMC_ENV_DEV=0 CONFIG_SYS_MMC_ENV_PART=0 The write operation succeeds once, but then the eMMC stops responding. Writing by ums is also successful, so writing itself seems to be OK, but there seems to be a problem in the subsequent operation. What are the problems with writing to eMMC? Edited June 5, 2023 by Hashimoto Kenichi Share this post Link to post Share on other sites
Hashimoto Kenichi 0 Posted June 5, 2023 Even if You don't write mmc dev 0 was not working. Share this post Link to post Share on other sites
Hashimoto Kenichi 0 Posted June 5, 2023 => mmc dev 0 CMD_SEND:0 ARG 0x00000000 MMC_RSP_NONE CMD_SEND:8 ARG 0x000000aa RET -110 CMD_SEND:55 ARG 0x00000000 RET -110 CMD_SEND:0 ARG 0x00000000 MMC_RSP_NONE CMD_SEND:8 ARG 0x000000aa RET -110 CMD_SEND:55 ARG 0x00000000 RET -110 CMD_SEND:0 ARG 0x00000000 MMC_RSP_NONE CMD_SEND:1 ARG 0x00000000 MMC_RSP_R3,4 0xffffffff CMD_SEND:2 ARG 0x00000000 RET -110 CMD_SEND:2 ARG 0x00000000 RET -110 CMD_SEND:2 ARG 0x00000000 RET -110 CMD_SEND:2 ARG 0x00000000 RET -110 CMD_SEND:2 ARG 0x00000000 RET -110 Enable CONFIG_MMC_TRACE Share this post Link to post Share on other sites
tooz 53 Posted June 6, 2023 hello @Hashimoto Kenichi, 1. are you using tinker os? On 6/5/2023 at 1:20 PM, Hashimoto Kenichi said: but there seems to be a problem in the subsequent operation. What are the problems with writing to eMMC? 2. what's the error you encountered? to write in uboot: 1. connect tinker board 2s to an ubuntu machine (tinker board 2s should be in ums mode while connecting) 2. press any key during booting to enter u-boot 3. here's an example using setenv/ printenv, and then savenv 4. saveenv and reboot, printenv test and it returns the right value Share this post Link to post Share on other sites
Hashimoto Kenichi 0 Posted June 7, 2023 1. are you using tinker os? No. I am using Yocto (kirkstone) with patches. u-boot version is 2022.01. 2. what's the error you encountered? The second "mmc dev 0" execution results in an error. Writing to eMMC, such as saveenv, succeeds, but distro_bootcmd executes "mmc dev 0", so it fails there. Share this post Link to post Share on other sites
Hashimoto Kenichi 0 Posted June 7, 2023 CMD_SEND:1 ARG 0x00000000 MMC_RSP_R3,4 0xffffffff The above is clearly an outlier and we are trying to find the cause. Share this post Link to post Share on other sites
tooz 53 Posted June 7, 2023 @Hashimoto Kenichi, one possible reason might be broken emmc, but we'll need more information to confirm if it's the cause 1, what are the results of: printenv devnum and printenv devtype ? 2. where was the uboot flashed onto? (such as emmc/ sd card/ other storage ... etc) 3. is there any other storage (such as sd card/ usb flash storage ... etc) attached to tinker board 2s? Share this post Link to post Share on other sites
Hashimoto Kenichi 0 Posted June 7, 2023 1. what are the results of: devnum and devtype is not set. Because I use distro_bootcmd. 2. where was the uboot flashed onto? eMMC 3. is there any other storage (such as sd card/ usb flash storage ... etc) attached to tinker board 2s? SD card is removed. Share this post Link to post Share on other sites
tooz 53 Posted June 8, 2023 hello @Hashimoto Kenichi, devnum and devtype are set by default if you're using tinker os, may i know what's the source code you're using for compiling os/ uboot, so we can have a look at the configs? Share this post Link to post Share on other sites
Hashimoto Kenichi 0 Posted June 12, 2023 I don't use Tinker OS. git://git.yoctoproject.org/meta-rockchip https://source.denx.de/u-boot/u-boot.git v2022.01 Share this post Link to post Share on other sites
tooz 53 Posted June 12, 2023 hello @Hashimoto Kenichi, both devtype and devnum need to be set, please try using the uboot sources from: TinkerBoard2/u-boot (github.com) TinkerBoard2/u-boot at linux4.19-rk3399-debian10 (github.com) kernel base = 4.19 Share this post Link to post Share on other sites