Hello, I'm struggling to setup u-boot to be able to save the environment.
The board is Pine64 QuartzPro64. ATF is collabora's: https://gitlab.collabora.com/hardware-enablement/rockchip-3588/trusted-firmware-a.git collabora-enablement-tfa/master 44418fce30938ee483fbfc79cc32fde33753d1aa rkbin is https://github.com/rockchip-linux/rkbin.git master a2a0b89b6c8c612dca5ed9ed8a68db8a07f68bc0 U-boot is: https://source.denx.de/u-boot/u-boot.git master 1630ff26cc960439b5949b80cfc604a2c8aa47dd export BL31=../trusted-firmware-a/build/rk3588/release/bl31/bl31.elf export ROCKCHIP_TPL=../rkbin/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_eyescan_v1.11.bin make quartzpro64-rk3588_defconfig make CROSS_COMPILE=aarch64-linux-gnu- SD card is GPT partitionned: Device Start End Sectors Size Type /dev/mmcblk1p1 64 16383 16320 8M Linux filesystem /dev/mmcblk1p2 16384 32767 16384 8M Linux filesystem /dev/mmcblk1p3 32768 65535 32768 16M Linux filesystem /dev/mmcblk1p4 65536 1114111 1048576 512M EFI System /dev/mmcblk1p5 1114112 8388607 7274496 3.5G Linux filesystem I put on: * mmcblk1p1: idbloader.img * mmcblk1p2: u-boot.itb environment should be on : mmcblk1p3 I tried to use: CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_MMC_ENV_DEV=1 CONFIG_SYS_MMC_ENV_PART=3 CONFIG_ENV_SIZE=0x1f000 CONFIG_ENV_OFFSET=0x3f8000 I tried to add: * USE_ENV_MMC_PARTITION I tried to change ENV_OFFSET to 0x0 I'm getting: Loading Environment from MMC... MMC partition switch failed *** Warning - MMC partition switch failed, using default environment [...] => env info env_valid = valid env_ready = true env_use_default = true => env erase Erasing Environment on MMC... MMC partition switch failed MMC partition switch failed Failed (1) => env select MMC Select Environment on MMC: OK => env select MMC 1:3 Select Environment on MMC: OK => env erase Erasing Environment on MMC... MMC partition switch failed MMC partition switch failed Failed (1) I've attached the config and a more complete serial console log. I'm probably doing something wrong, but I can't see it. I'd like some hints about how to get further. Thanks -- Vincent Legoll
DDR 9fffbe1e78 cym 24/02/04-10:09:20,fwver: v1.16 LPDDR4X, 2112MHz channel[0] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB channel[1] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB channel[2] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB channel[3] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB Manufacturer ID:0x6 CH0 RX Vref:29.3%, TX Vref:22.8%,21.8% CH1 RX Vref:27.9%, TX Vref:23.8%,23.8% CH2 RX Vref:29.7%, TX Vref:22.8%,22.8% CH3 RX Vref:31.8%, TX Vref:22.8%,22.8% change to F1: 528MHz change to F2: 1068MHz change to F3: 1560MHz change to F0: 2112MHz out U-Boot SPL board init U-Boot SPL 2017.09-ge4e124926e-230922 #lxh (Sep 25 2023 - 10:58:38), fwver: v1.13 unknown raw ID 0 0 0 unrecognized JEDEC id bytes: 00, 00, 00 Trying to boot from MMC2 No misc partition Trying fit image at 0x4000 sector ## Verified-boot: 0 ## Checking atf-1 0x00040000 ... sha256(ac29204a02...) + OK ## Checking u-boot 0x00a00000 ... sha256(c7f492bdd7...) + OK ## Checking fdt-1 0x00ad39e0 ... sha256(e0dcab4e7d...) + OK ## Checking atf-2 0xff100000 ... sha256(7341f9cf77...) + OK Jumping to U-Boot(0x00a00000) via ARM Trusted Firmware(0x00040000) Total: 311.670/475.856 ms NOTICE: BL31: v2.11.0(release):v2.11.0-533-g44418fce3 NOTICE: BL31: Built : 10:42:36, Sep 8 2024 U-Boot 2024.10-rc4-00004-g1630ff26cc96 (Sep 08 2024 - 18:41:36 +0200) Model: Pine64 QuartzPro64 DRAM: 16 GiB Core: 338 devices, 31 uclasses, devicetree: separate MMC: mmc@fe2c0000: 1, mmc@fe2e0000: 0 Loading Environment from MMC... MMC partition switch failed *** Warning - MMC partition switch failed, using default environment In: serial@feb50000 Out: serial@feb50000 Err: serial@feb50000 Model: Pine64 QuartzPro64 Net: eth0: ethernet@fe1b0000 Hit any key to stop autoboot: 0 => env info env_valid = valid env_ready = true env_use_default = true => env save Saving Environment to MMC... MMC partition switch failed MMC partition switch failed Failed (1) => env erase Erasing Environment on MMC... MMC partition switch failed MMC partition switch failed Failed (1) => env select MMC Select Environment on MMC: OK => env erase Erasing Environment on MMC... MMC partition switch failed MMC partition switch failed Failed (1) => env select MMC 1:3 Select Environment on MMC: OK => env erase Erasing Environment on MMC... MMC partition switch failed MMC partition switch failed Failed (1) => mmc dev 1 switch to partitions #0, OK mmc1 is current device => mmc dev 0 switch to partitions #0, OK mmc0(part 0) is current device => mmc dev 1 switch to partitions #0, OK mmc1 is current device => env select MMC 1:3 Select Environment on MMC: OK => env erase Erasing Environment on MMC... MMC partition switch failed MMC partition switch failed Failed (1) => env select MMC 0 Select Environment on MMC: OK => env erase Erasing Environment on MMC... MMC partition switch failed MMC partition switch failed Failed (1) => env select mmc 0 Select Environment on mmc: driver not found => env select MMC 0 Select Environment on MMC: OK => env select Select Environment on <NULL>: "Synchronous Abort" handler, esr 0x96000010, far 0x0 elr: 0000000000a8e784 lr : 0000000000a65c40 (reloc) elr: 00000000eff9c784 lr : 00000000eff73c40 x0 : 00000000effba133 x1 : 0000000000000000 x2 : 0000000000000020 x3 : 0000000000000000 x4 : 00000000feb50000 x5 : 00000000effba133 x6 : 0000000000000074 x7 : 00000000effc5f88 x8 : 00000000000000c0 x9 : 00000000ffffffd0 x10: 000000000000000d x11: 0000000000000006 x12: 0000000000000002 x13: 0000000000000200 x14: 00000000ffffffff x15: 00000000edbe1f50 x16: 00000000eff63d2c x17: 0000000000000000 x18: 00000000edbffd20 x19: 00000000effcc700 x20: 00000000effcc6d0 x21: 0000000000000000 x22: 00000000effcc6d0 x23: 0000000000000002 x24: 00000000effe7cac x25: 0000000000000000 x26: 0000000000000000 x27: 0000000000000000 x28: 00000000edf359b0 x29: 00000000edbe23e0 Code: 3900007f d65f03c0 aa0003e5 d2800003 (38636824) Resetting CPU ... resetting ...
config-u-boot
Description: Binary data