Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odroidm1: u-boot: enable setexpr; patch 2025.01 for fileenv; enable squashfs support #7769

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rpardini
Copy link
Member

  • as Armbian u-boot is possibly deployed to SPI (replacing Petitboot),
    try to make as compatible as possible; eg enable squashfs support
  • in this case, setexpr and fileenv are used by HAOS

@github-actions github-actions bot added size/medium PR with more then 50 and less then 250 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Jan 31, 2025
@rpardini rpardini marked this pull request as ready for review January 31, 2025 18:59
@iav
Copy link
Contributor

iav commented Feb 1, 2025

I have M1 and can do the test. If you tell how to perform this test.

@rpardini
Copy link
Member Author

rpardini commented Feb 2, 2025

I have M1 and can do the test. If you tell how to perform this test.

Nice, thanks.

First: If you already have Armbian u-boot on SPI from before this PR: try the HAOS image on SD and see it fail (bootloop).

Then: deploy Armbian to the ODROID-M1 as per the instructions (build image from this PR, write image to SD, hold RCY button for a little while, boot image, armbian-install the u-boot to MTD; alternatively: use Petitboot to remove itself with flash_eraseall).

Then: download HAOS M1 image, write to SD and boot it, it should just work. I've sent a patch to HAOS to enable booting from NVMe as well but that's not yet merged nor released yet.

@rpardini rpardini force-pushed the pr/odroidm1-u-boot-enable-setexpr-patch-202501-for-fileenv-enable-squashfs-support branch from 8b1462e to 4df2850 Compare February 2, 2025 06:31
@iav
Copy link
Contributor

iav commented Feb 3, 2025

Sorry, but no.
Trying to boot HAOS after flashing spi from this branch I see Bootp, then prompt.
complete boot log attached
new 1.txt

@iav
Copy link
Contributor

iav commented Feb 3, 2025

If I press recovery button on power on, HAOS booting hangs on kernel load:
new 2.txt

@iav
Copy link
Contributor

iav commented Feb 3, 2025

Normal armbian image I build some weeks ago not boots without button, but boots with recovery button.

@rpardini rpardini force-pushed the pr/odroidm1-u-boot-enable-setexpr-patch-202501-for-fileenv-enable-squashfs-support branch from 4df2850 to d71aff0 Compare February 3, 2025 07:31
@rpardini
Copy link
Member Author

rpardini commented Feb 3, 2025

Hi, the first bootlog you sent seems to not find anything bootable (and thus goes to bootp). I've not changed anything regarding this. Can you check SD is fine?

Second bootlog, seems to be with button, and thus uses the uboot from the card (not us). HAOS does not have serial console enabled (check cmdline.txt in the HAOS image to enable) and thus seems to hang -- I have the same.

@iav
Copy link
Contributor

iav commented Feb 3, 2025

Not sure it related... I use BalenaEtcher for microsdcard writing.
And I can't create HAOS sdcard with etcher without error. I try 3 different card readers, 3 different sdcard, usb card reader and internal sd reader in my thinkpad... But HAOS image creation always finishes as "error" of etcher.
But armbian images always writes without errors.

So, I add console=ttyS2,1500000 into just to check about kernel hang. And now I see on serial console at the end of boot (booted with recovery button)

[  OK  ] Started Serial Getty on ttyS2.
[  OK  ] Reached target Login Prompts.
[  OK  ] Reached target Multi-User System.

Welcome to Home Assistant
homeassistant login:

I think it means, at least, my HAOS image is bootable itself, despite of etcher error.

Log of boot without button shows

U-Boot SPL 2025.01-armbian-2025.01-S6d41-P6f62-H4cab-V390e-Bb703-R448a-dirty (Feb 02 2025 - 23:23:57 +0000)
Trying to boot from SPI

now I check, and see — this branch (pr/odroidm1-u-boot-enable-setexpr-patch-202501-for-fileenv-enable-squashfs-support) produces package 14141632 Feb 3 20:59 linux-u-boot-odroidm1-edge_25.02.0-trunk_arm64__2025.01-S6d41-P6f62-H4cab-V390e-Bb703-R448a.deb

Hash equal.

Now I rebuild uboot ad armbian image with your latest commit.
I see no changes in boot process, no boot without recovery button.
Take note uboot build date-time
U-Boot SPL 2025.01-armbian-2025.01-S6d41-P6f62-H4cab-V390e-Bb703-R448a-dirty (Feb 03 2025 - 19:34:24 +0000)

new 3.txt

@rpardini
Copy link
Member Author

rpardini commented Feb 4, 2025

Indeed. It seems all checks out. I'm puzzled as to why. I will get the odroidm1 going again and capture some bootlogs so we can compare.

In the end, all this PR does is enable a few uboot commands so that the boot.scr from HAOS works, and enables squashfs so it can read the kernel Image from HAOS correctly -- it shouldn't change anything regarding readability of SD.

If you build HAOS from the PR I linked somewhere above, you can also boot and run it directly from NVMe, which is my use case, for performance and stability -- too many flukes with SD and eMMC over the years. I use a USB micro cable and uboot UMS command to write the HAOS image directly to NVMe.

@iav
Copy link
Contributor

iav commented Feb 4, 2025

I not build HAOS image, I build only armbian. HAOS image I got by your link. Currently I have no nvme disk available for testing — maybe, later, but not nearest days.
But I have free emmc module, and can do something with emmc and microsd combination — if it will do any good.

I'd like add to context fact that current armbian uboot can't boot M1 from sdcard without recovery button too: https://forum.armbian.com/topic/45671-odroid-m1-wont-boot-on-recent-images-in-armbian-download-section/#findComment-211555

@rpardini
Copy link
Member Author

rpardini commented Feb 4, 2025

As promised a complete bootlog.

This is the u-boot from this PR on SPI, and eMMC.

eMMC has been flashed using a micro-usb cable to desktop computer and raspberrypi-imager with HAOS image 14.2 and using ums 0 mmc 0 in uboot.


DDR 2d653b3476 typ 24/01/20-15:04:19,fwver: v1.21
In
LP4/4x derate en, other dram:1x trefi
ddrconfig:7
LPDDR4X, 324MHz
BW=32 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=8192MB
tdqss: cs0 dqs0: 48ps, dqs1: -96ps, dqs2: -72ps, dqs3: -144ps,
tdqss: cs1 dqs0: 48ps, dqs1: -120ps, dqs2: -48ps, dqs3: -144ps,

change to: 324MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vrefinner:24%, vrefout:41%
dram drv:40,odt:0
clk skew:0x61
rx vref: 34.4%
tx vref: 42.0%

change to: 528MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vrefinner:24%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58
rx vref: 32.4%
tx vref: 40.0%

change to: 780MHz
PHY drv:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58
rx vref: 16.6%
tx vref: 36.0%

change to: 1560MHz(final freq)
PHY drv:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:22%
dram drv:40,odt:80
vref_ca:00000071
clk skew:0x21
rx vref: 17.6%
tx vref: 23.8%
cs 0:
the read training result:
DQS0:0x32, DQS1:0x32, DQS2:0x35, DQS3:0x2d,
min  : 0xd  0xf 0x12 0x12  0x2  0x7  0xa  0x7 , 0xa  0x9  0x3  0x2  0xd  0xb  0xb  0x9 ,
       0xf  0xf  0x9  0xb  0x5  0x0  0x2  0x5 , 0x9  0x6  0x6  0x1  0xd  0xd  0x9  0xd ,
mid  :0x29 0x2a 0x2d 0x2c 0x1c 0x21 0x24 0x22 ,0x24 0x24 0x1c 0x1d 0x27 0x24 0x26 0x23 ,
      0x2a 0x2b 0x23 0x25 0x1e 0x1a 0x1c 0x20 ,0x24 0x21 0x21 0x1b 0x28 0x28 0x23 0x26 ,
max  :0x45 0x46 0x48 0x46 0x37 0x3b 0x3f 0x3d ,0x3f 0x3f 0x35 0x38 0x42 0x3e 0x41 0x3d ,
      0x46 0x47 0x3e 0x3f 0x38 0x35 0x37 0x3b ,0x40 0x3d 0x3c 0x35 0x44 0x44 0x3e 0x40 ,
range:0x38 0x37 0x36 0x34 0x35 0x34 0x35 0x36 ,0x35 0x36 0x32 0x36 0x35 0x33 0x36 0x34 ,
      0x37 0x38 0x35 0x34 0x33 0x35 0x35 0x36 ,0x37 0x37 0x36 0x34 0x37 0x37 0x35 0x33 ,
the write training result:
DQS0:0x2a, DQS1:0xa, DQS2:0x18, DQS3:0x5,
min  :0x72 0x74 0x76 0x72 0x67 0x69 0x6c 0x6d 0x6b ,0x4d 0x4a 0x45 0x44 0x4f 0x4d 0x4f 0x4d 0x49 ,
      0x61 0x60 0x5c 0x59 0x52 0x51 0x52 0x58 0x58 ,0x4f 0x4b 0x4a 0x45 0x4e 0x52 0x4d 0x54 0x49 ,
mid  :0x8e 0x8f 0x91 0x8e 0x80 0x82 0x87 0x87 0x82 ,0x69 0x65 0x5e 0x5c 0x6a 0x67 0x69 0x67 0x62 ,
      0x7c 0x7b 0x75 0x74 0x6d 0x6b 0x6d 0x72 0x72 ,0x69 0x66 0x63 0x5e 0x6a 0x6b 0x68 0x6e 0x62 ,
max  :0xaa 0xab 0xac 0xaa 0x99 0x9b 0xa2 0xa1 0x9a ,0x86 0x81 0x77 0x75 0x85 0x81 0x83 0x81 0x7b ,
      0x98 0x97 0x8f 0x8f 0x89 0x86 0x88 0x8c 0x8c ,0x84 0x81 0x7c 0x77 0x86 0x85 0x83 0x88 0x7c ,
range:0x38 0x37 0x36 0x38 0x32 0x32 0x36 0x34 0x2f ,0x39 0x37 0x32 0x31 0x36 0x34 0x34 0x34 0x32 ,
      0x37 0x37 0x33 0x36 0x37 0x35 0x36 0x34 0x34 ,0x35 0x36 0x32 0x32 0x38 0x33 0x36 0x34 0x33 ,
cs 1:
the read training result:
DQS0:0x32, DQS1:0x32, DQS2:0x35, DQS3:0x2d,
min  : 0xd  0xf 0x12 0x12  0x2  0x7  0xa  0x7 , 0xa  0x9  0x3  0x2  0xd  0xb  0xb  0x9 ,
       0xf  0xf  0x9  0xb  0x5  0x0  0x2  0x5 , 0x9  0x6  0x6  0x1  0xd  0xd  0x9  0xd ,
mid  :0x29 0x2a 0x2d 0x2c 0x1c 0x21 0x24 0x22 ,0x24 0x24 0x1c 0x1d 0x27 0x24 0x26 0x23 ,
      0x2a 0x2b 0x23 0x25 0x1e 0x1a 0x1c 0x20 ,0x24 0x21 0x21 0x1b 0x28 0x28 0x23 0x26 ,
max  :0x45 0x46 0x48 0x46 0x37 0x3b 0x3f 0x3d ,0x3f 0x3f 0x35 0x38 0x42 0x3e 0x41 0x3d ,
      0x46 0x47 0x3e 0x3f 0x38 0x35 0x37 0x3b ,0x40 0x3d 0x3c 0x35 0x44 0x44 0x3e 0x40 ,
range:0x38 0x37 0x36 0x34 0x35 0x34 0x35 0x36 ,0x35 0x36 0x32 0x36 0x35 0x33 0x36 0x34 ,
      0x37 0x38 0x35 0x34 0x33 0x35 0x35 0x36 ,0x37 0x37 0x36 0x34 0x37 0x37 0x35 0x33 ,
the write training result:
DQS0:0x2a, DQS1:0xa, DQS2:0x18, DQS3:0x5,
min  :0x72 0x74 0x76 0x72 0x67 0x69 0x6c 0x6d 0x6b ,0x4d 0x4a 0x45 0x44 0x4f 0x4d 0x4f 0x4d 0x49 ,
      0x61 0x60 0x5c 0x59 0x52 0x51 0x52 0x58 0x58 ,0x4f 0x4b 0x4a 0x45 0x4e 0x52 0x4d 0x54 0x49 ,
mid  :0x8e 0x8f 0x91 0x8e 0x80 0x82 0x87 0x87 0x82 ,0x69 0x65 0x5e 0x5c 0x6a 0x67 0x69 0x67 0x62 ,
      0x7c 0x7b 0x75 0x74 0x6d 0x6b 0x6d 0x72 0x72 ,0x69 0x66 0x63 0x5e 0x6a 0x6b 0x68 0x6e 0x62 ,
max  :0xaa 0xab 0xac 0xaa 0x99 0x9b 0xa2 0xa1 0x9a ,0x86 0x81 0x77 0x75 0x85 0x81 0x83 0x81 0x7b ,
      0x98 0x97 0x8f 0x8f 0x89 0x86 0x88 0x8c 0x8c ,0x84 0x81 0x7c 0x77 0x86 0x85 0x83 0x88 0x7c ,
range:0x38 0x37 0x36 0x38 0x32 0x32 0x36 0x34 0x2f ,0x39 0x37 0x32 0x31 0x36 0x34 0x34 0x34 0x32 ,
      0x37 0x37 0x33 0x36 0x37 0x35 0x36 0x34 0x34 ,0x35 0x36 0x32 0x32 0x38 0x33 0x36 0x34 0x33 ,
CA Training result:
cs:0 min  :0x53 0x4f 0x49 0x42 0x49 0x3c 0x4d ,0x4d 0x47 0x44 0x3c 0x46 0x3e 0x49 ,
cs:0 mid  :0x8f 0x8f 0x84 0x82 0x85 0x7d 0x7d ,0x8a 0x88 0x7f 0x7c 0x82 0x7e 0x7a ,
cs:0 max  :0xcc 0xcf 0xbf 0xc3 0xc1 0xbf 0xae ,0xc8 0xc9 0xbb 0xbd 0xbe 0xbe 0xab ,
cs:0 range:0x79 0x80 0x76 0x81 0x78 0x83 0x61 ,0x7b 0x82 0x77 0x81 0x78 0x80 0x62 ,
cs:1 min  :0x54 0x58 0x48 0x4d 0x49 0x47 0x54 ,0x4d 0x52 0x42 0x45 0x43 0x47 0x4b ,
cs:1 mid  :0x94 0x93 0x89 0x88 0x89 0x83 0x85 ,0x8f 0x8c 0x84 0x81 0x84 0x82 0x7e ,
cs:1 max  :0xd5 0xce 0xca 0xc3 0xca 0xbf 0xb7 ,0xd1 0xc6 0xc6 0xbd 0xc6 0xbd 0xb2 ,
cs:1 range:0x81 0x76 0x82 0x76 0x81 0x78 0x63 ,0x84 0x74 0x84 0x78 0x83 0x76 0x67 ,
out

U-Boot SPL 2025.01-armbian-2025.01-S6d41-P6f62-H4666-V390e-B1e5e-R448a-dirty (Jan 31 2025 - 17:29:22 +0000)
Trying to boot from SPI
## Checking hash(es) for config config-1 ... OK
## Checking hash(es) for Image atf-1 ... sha256+ OK
## Checking hash(es) for Image u-boot ... sha256+ OK
## Checking hash(es) for Image fdt-1 ... sha256+ OK
## Checking hash(es) for Image atf-2 ... sha256+ OK
## Checking hash(es) for Image atf-3 ... sha256+ OK
## Checking hash(es) for Image atf-4 ... sha256+ OK
## Checking hash(es) for Image atf-5 ... sha256+ OK
## Checking hash(es) for Image atf-6 ... sha256+ OK
INFO:    Preloader serial: 2
NOTICE:  BL31: v2.3():v2.3-645-g8cea6ab0b:cl, fwver: v1.44
NOTICE:  BL31: Built : 16:36:43, Sep 19 2023
INFO:    GICv3 without legacy support detected.
INFO:    ARM GICv3 driver initialized in EL3
INFO:    pmu v1 is valid 220114
INFO:    l3 cache partition cfg-0
INFO:    dfs DDR fsp_param[0].freq_mhz= 1560MHz
INFO:    dfs DDR fsp_param[1].freq_mhz= 324MHz
INFO:    dfs DDR fsp_param[2].freq_mhz= 528MHz
INFO:    dfs DDR fsp_param[3].freq_mhz= 780MHz
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 0
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0xa00000
INFO:    SPSR = 0x3c9


U-Boot 2025.01-armbian-2025.01-S6d41-P6f62-H4666-V390e-B1e5e-R448a-dirty (Jan 31 2025 - 17:29:22 +0000)

Model: Hardkernel ODROID-M1
DRAM:  8 GiB (effective 7.7 GiB)
PMIC:  RK809 (on=0x40, off=0x00)
Core:  328 devices, 35 uclasses, devicetree: separate
MMC:   mmc@fe2b0000: 1, mmc@fe310000: 0
Loading Environment from SPIFlash... SF: Detected mx25u12835f with page size 256 Bytes, erase size 4 KiB, total 16 MiB
OK
In:    serial@fe660000
Out:   serial@fe660000
Err:   serial@fe660000
Model: Hardkernel ODROID-M1
Net:   eth0: ethernet@fe2a0000
armbian leds
armbian env already set once
Hit any key to stop autoboot:  0
Scanning for bootflows in all bootdevs
Seq  Method       State   Uclass    Part  Name                      Filename
---  -----------  ------  --------  ----  ------------------------  ----------------
Scanning global bootmeth 'efi_mgr':
Card did not respond to voltage select! : -110
Failed to load EFI variables
  0  efi_mgr      ready   (none)       0  <NULL>
** Booting bootflow '<NULL>' with efi_mgr
** Cannot find directory. **
Loading Boot0000 'mmc 0' failed
EFI boot manager: Cannot load any image
Boot failed (err=-14)
Bus usb@fd000000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@fd800000: USB EHCI 1.00
Bus usb@fd840000: USB OHCI 1.0
Bus usb@fd880000: USB EHCI 1.00
Bus usb@fd8c0000: USB OHCI 1.0
scanning bus usb@fd000000 for devices... 1 USB Device(s) found
scanning bus usb@fd800000 for devices... 1 USB Device(s) found
scanning bus usb@fd840000 for devices... ERROR:  USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR:  USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR:  USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
unable to get device descriptor (error=-1)
1 USB Device(s) found
scanning bus usb@fd880000 for devices... 1 USB Device(s) found
scanning bus usb@fd8c0000 for devices... 1 USB Device(s) found
Scanning bootdev '[email protected]':
Card did not respond to voltage select! : -110
Scanning bootdev '[email protected]':
  1  script       ready   mmc          2  [email protected] /boot.scr
** Booting bootflow '[email protected]_2' with script
switch to partitions #0, OK
mmc0(part 0) is current device
loading env...
MMC read: dev # 0, block # 1212416, count 64 ... 64 blocks read: OK
## Error: bad CRC, import failed
0 bytes read in 3 ms (0 Bytes/s)
13 bytes read in 5 ms (2 KiB/s)
Loading standard device tree rk3568-odroid-m1.dtb
118453 bytes read in 13 ms (8.7 MiB/s)
Working FDT set to 12000000
Trying to boot slot A, 2 attempts remaining. Loading kernel ...
30921216 bytes read in 1150 ms (25.6 MiB/s)
storing env...
MMC write: dev # 0, block # 1212416, count 64 ... 64 blocks written: OK
Starting kernel
## Flattened Device Tree blob at 12000000
   Booting using the fdt blob at 0x12000000
Working FDT set to 12000000
   Loading Device Tree to 00000000ecde6000, end 00000000ece6bfff ... OK
Working FDT set to ecde6000

Starting kernel ...

@rpardini
Copy link
Member Author

rpardini commented Feb 4, 2025

And this is a boot from SD card (64gb Sandisk gold); HAOS was written on desktop using raspberrypi-imager.

Odroid-M1 in this case has only SD (eMMC was removed).


DDR 2d653b3476 typ 24/01/20-15:04:19,fwver: v1.21
In
LP4/4x derate en, other dram:1x trefi
ddrconfig:7
LPDDR4X, 324MHz
BW=32 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=8192MB
tdqss: cs0 dqs0: 48ps, dqs1: -96ps, dqs2: -72ps, dqs3: -144ps,
tdqss: cs1 dqs0: 48ps, dqs1: -120ps, dqs2: -72ps, dqs3: -144ps,

change to: 324MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vrefinner:24%, vrefout:41%
dram drv:40,odt:0
clk skew:0x61
rx vref: 34.4%
tx vref: 44.0%

change to: 528MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vrefinner:24%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58
rx vref: 34.4%
tx vref: 42.0%

change to: 780MHz
PHY drv:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58
rx vref: 16.6%
tx vref: 36.0%

change to: 1560MHz(final freq)
PHY drv:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:22%
dram drv:40,odt:80
vref_ca:00000071
clk skew:0x21
rx vref: 17.6%
tx vref: 23.8%
cs 0:
the read training result:
DQS0:0x32, DQS1:0x32, DQS2:0x36, DQS3:0x2d,
min  : 0xd  0xf 0x12 0x11  0x2  0x7  0xa  0x7 , 0x9  0x9  0x3  0x2  0xd  0xb  0xb  0x9 ,
      0x11 0x11  0xb  0xd  0x5  0x3  0x4  0x7 , 0x9  0x7  0x6  0x2  0xd  0xd  0x9  0xd ,
mid  :0x28 0x2a 0x2d 0x2b 0x1c 0x21 0x24 0x22 ,0x24 0x24 0x1c 0x1d 0x27 0x24 0x26 0x23 ,
      0x2c 0x2c 0x25 0x27 0x1f 0x1d 0x1e 0x22 ,0x24 0x22 0x21 0x1b 0x28 0x28 0x24 0x26 ,
max  :0x44 0x46 0x48 0x46 0x37 0x3b 0x3f 0x3d ,0x3f 0x3f 0x35 0x38 0x42 0x3e 0x41 0x3d ,
      0x48 0x48 0x40 0x41 0x3a 0x37 0x39 0x3d ,0x40 0x3d 0x3c 0x35 0x43 0x43 0x3f 0x40 ,
range:0x37 0x37 0x36 0x35 0x35 0x34 0x35 0x36 ,0x36 0x36 0x32 0x36 0x35 0x33 0x36 0x34 ,
      0x37 0x37 0x35 0x34 0x35 0x34 0x35 0x36 ,0x37 0x36 0x36 0x33 0x36 0x36 0x36 0x33 ,
the write training result:
DQS0:0x2a, DQS1:0xa, DQS2:0x13, DQS3:0x5,
min  :0x73 0x74 0x77 0x72 0x65 0x69 0x6d 0x6d 0x6b ,0x4d 0x4a 0x45 0x43 0x4f 0x4d 0x4f 0x4e 0x49 ,
      0x5a 0x59 0x56 0x54 0x4b 0x4b 0x4b 0x52 0x52 ,0x4f 0x4b 0x49 0x45 0x4f 0x52 0x4d 0x55 0x49 ,
mid  :0x8e 0x8f 0x91 0x8e 0x7f 0x82 0x87 0x87 0x83 ,0x69 0x65 0x5e 0x5c 0x6a 0x67 0x68 0x67 0x62 ,
      0x75 0x76 0x70 0x6e 0x66 0x65 0x66 0x6c 0x6c ,0x69 0x66 0x63 0x5e 0x6a 0x6b 0x67 0x6e 0x62 ,
max  :0xaa 0xaa 0xac 0xaa 0x99 0x9c 0xa2 0xa1 0x9b ,0x86 0x81 0x77 0x76 0x85 0x81 0x82 0x81 0x7b ,
      0x91 0x93 0x8a 0x88 0x82 0x80 0x82 0x86 0x86 ,0x84 0x81 0x7d 0x77 0x86 0x85 0x82 0x87 0x7c ,
range:0x37 0x36 0x35 0x38 0x34 0x33 0x35 0x34 0x30 ,0x39 0x37 0x32 0x33 0x36 0x34 0x33 0x33 0x32 ,
      0x37 0x3a 0x34 0x34 0x37 0x35 0x37 0x34 0x34 ,0x35 0x36 0x34 0x32 0x37 0x33 0x35 0x32 0x33 ,
cs 1:
the read training result:
DQS0:0x32, DQS1:0x32, DQS2:0x36, DQS3:0x2d,
min  : 0xd  0xf 0x12 0x11  0x2  0x7  0xa  0x7 , 0x9  0x9  0x3  0x2  0xd  0xb  0xb  0x9 ,
      0x11 0x11  0xb  0xd  0x5  0x3  0x4  0x7 , 0x9  0x7  0x6  0x2  0xd  0xd  0x9  0xd ,
mid  :0x28 0x2a 0x2d 0x2b 0x1c 0x21 0x24 0x22 ,0x24 0x24 0x1c 0x1d 0x27 0x24 0x26 0x23 ,
      0x2c 0x2c 0x25 0x27 0x1f 0x1d 0x1e 0x22 ,0x24 0x22 0x21 0x1b 0x28 0x28 0x24 0x26 ,
max  :0x44 0x46 0x48 0x46 0x37 0x3b 0x3f 0x3d ,0x3f 0x3f 0x35 0x38 0x42 0x3e 0x41 0x3d ,
      0x48 0x48 0x40 0x41 0x3a 0x37 0x39 0x3d ,0x40 0x3d 0x3c 0x35 0x43 0x43 0x3f 0x40 ,
range:0x37 0x37 0x36 0x35 0x35 0x34 0x35 0x36 ,0x36 0x36 0x32 0x36 0x35 0x33 0x36 0x34 ,
      0x37 0x37 0x35 0x34 0x35 0x34 0x35 0x36 ,0x37 0x36 0x36 0x33 0x36 0x36 0x36 0x33 ,
the write training result:
DQS0:0x2a, DQS1:0xa, DQS2:0x13, DQS3:0x5,
min  :0x73 0x74 0x77 0x72 0x65 0x69 0x6d 0x6d 0x6b ,0x4d 0x4a 0x45 0x43 0x4f 0x4d 0x4f 0x4e 0x49 ,
      0x5a 0x59 0x56 0x54 0x4b 0x4b 0x4b 0x52 0x52 ,0x4f 0x4b 0x49 0x45 0x4f 0x52 0x4d 0x55 0x49 ,
mid  :0x8e 0x8f 0x91 0x8e 0x7f 0x82 0x87 0x87 0x83 ,0x69 0x65 0x5e 0x5c 0x6a 0x67 0x68 0x67 0x62 ,
      0x75 0x76 0x70 0x6e 0x66 0x65 0x66 0x6c 0x6c ,0x69 0x66 0x63 0x5e 0x6a 0x6b 0x67 0x6e 0x62 ,
max  :0xaa 0xaa 0xac 0xaa 0x99 0x9c 0xa2 0xa1 0x9b ,0x86 0x81 0x77 0x76 0x85 0x81 0x82 0x81 0x7b ,
      0x91 0x93 0x8a 0x88 0x82 0x80 0x82 0x86 0x86 ,0x84 0x81 0x7d 0x77 0x86 0x85 0x82 0x87 0x7c ,
range:0x37 0x36 0x35 0x38 0x34 0x33 0x35 0x34 0x30 ,0x39 0x37 0x32 0x33 0x36 0x34 0x33 0x33 0x32 ,
      0x37 0x3a 0x34 0x34 0x37 0x35 0x37 0x34 0x34 ,0x35 0x36 0x34 0x32 0x37 0x33 0x35 0x32 0x33 ,
CA Training result:
cs:0 min  :0x55 0x50 0x4b 0x45 0x4b 0x3f 0x4e ,0x4f 0x49 0x47 0x3d 0x48 0x40 0x4c ,
cs:0 mid  :0x91 0x90 0x87 0x85 0x87 0x80 0x7f ,0x8c 0x8a 0x82 0x7e 0x83 0x7f 0x7c ,
cs:0 max  :0xce 0xd1 0xc3 0xc6 0xc3 0xc2 0xb1 ,0xca 0xcb 0xbd 0xbf 0xbf 0xbf 0xac ,
cs:0 range:0x79 0x81 0x78 0x81 0x78 0x83 0x63 ,0x7b 0x82 0x76 0x82 0x77 0x7f 0x60 ,
cs:1 min  :0x54 0x58 0x49 0x4d 0x49 0x46 0x54 ,0x4d 0x52 0x43 0x45 0x43 0x47 0x4b ,
cs:1 mid  :0x94 0x93 0x89 0x88 0x89 0x82 0x85 ,0x8f 0x8c 0x84 0x81 0x84 0x82 0x7e ,
cs:1 max  :0xd5 0xce 0xca 0xc3 0xca 0xbe 0xb7 ,0xd1 0xc7 0xc6 0xbd 0xc6 0xbd 0xb1 ,
cs:1 range:0x81 0x76 0x81 0x76 0x81 0x78 0x63 ,0x84 0x75 0x83 0x78 0x83 0x76 0x66 ,
out

U-Boot SPL 2025.01-armbian-2025.01-S6d41-P6f62-H4666-V390e-B1e5e-R448a-dirty (Jan 31 2025 - 17:29:22 +0000)
Trying to boot from SPI
## Checking hash(es) for config config-1 ... OK
## Checking hash(es) for Image atf-1 ... sha256+ OK
## Checking hash(es) for Image u-boot ... sha256+ OK
## Checking hash(es) for Image fdt-1 ... sha256+ OK
## Checking hash(es) for Image atf-2 ... sha256+ OK
## Checking hash(es) for Image atf-3 ... sha256+ OK
## Checking hash(es) for Image atf-4 ... sha256+ OK
## Checking hash(es) for Image atf-5 ... sha256+ OK
## Checking hash(es) for Image atf-6 ... sha256+ OK
INFO:    Preloader serial: 2
NOTICE:  BL31: v2.3():v2.3-645-g8cea6ab0b:cl, fwver: v1.44
NOTICE:  BL31: Built : 16:36:43, Sep 19 2023
INFO:    GICv3 without legacy support detected.
INFO:    ARM GICv3 driver initialized in EL3
INFO:    pmu v1 is valid 220114
INFO:    l3 cache partition cfg-0
INFO:    dfs DDR fsp_param[0].freq_mhz= 1560MHz
INFO:    dfs DDR fsp_param[1].freq_mhz= 324MHz
INFO:    dfs DDR fsp_param[2].freq_mhz= 528MHz
INFO:    dfs DDR fsp_param[3].freq_mhz= 780MHz
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 0
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0xa00000
INFO:    SPSR = 0x3c9


U-Boot 2025.01-armbian-2025.01-S6d41-P6f62-H4666-V390e-B1e5e-R448a-dirty (Jan 31 2025 - 17:29:22 +0000)

Model: Hardkernel ODROID-M1
DRAM:  8 GiB (effective 7.7 GiB)
PMIC:  RK809 (on=0x40, off=0x00)
Core:  328 devices, 35 uclasses, devicetree: separate
MMC:   mmc@fe2b0000: 1, mmc@fe310000: 0
Loading Environment from SPIFlash... SF: Detected mx25u12835f with page size 256 Bytes, erase size 4 KiB, total 16 MiB
OK
In:    serial@fe660000
Out:   serial@fe660000
Err:   serial@fe660000
Model: Hardkernel ODROID-M1
Net:   eth0: ethernet@fe2a0000
armbian leds
armbian env already set once
Hit any key to stop autoboot:  0
Scanning for bootflows in all bootdevs
Seq  Method       State   Uclass    Part  Name                      Filename
---  -----------  ------  --------  ----  ------------------------  ----------------
Scanning global bootmeth 'efi_mgr':
Card did not respond to voltage select! : -110
Failed to load EFI variables
  0  efi_mgr      ready   (none)       0  <NULL>
** Booting bootflow '<NULL>' with efi_mgr
** Cannot find directory. **
Loading Boot0000 'mmc 1' failed
EFI boot manager: Cannot load any image
Boot failed (err=-14)
Bus usb@fd000000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@fd800000: USB EHCI 1.00
Bus usb@fd840000: USB OHCI 1.0
Bus usb@fd880000: USB EHCI 1.00
Bus usb@fd8c0000: USB OHCI 1.0
scanning bus usb@fd000000 for devices... 1 USB Device(s) found
scanning bus usb@fd800000 for devices... 1 USB Device(s) found
scanning bus usb@fd840000 for devices... ERROR:  USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR:  USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR:  USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
unable to get device descriptor (error=-1)
1 USB Device(s) found
scanning bus usb@fd880000 for devices... 1 USB Device(s) found
scanning bus usb@fd8c0000 for devices... 1 USB Device(s) found
Scanning bootdev '[email protected]':
  1  script       ready   mmc          2  [email protected] /boot.scr
** Booting bootflow '[email protected]_2' with script
switch to partitions #0, OK
mmc1 is current device
loading env...
MMC read: dev # 1, block # 1212416, count 64 ... 64 blocks read: OK
## Error: bad CRC, import failed
0 bytes read in 1 ms (0 Bytes/s)
13 bytes read in 1 ms (12.7 KiB/s)
Loading standard device tree rk3568-odroid-m1.dtb
118453 bytes read in 12 ms (9.4 MiB/s)
Working FDT set to 12000000
Trying to boot slot A, 2 attempts remaining. Loading kernel ...
30921216 bytes read in 1616 ms (18.2 MiB/s)
storing env...
MMC write: dev # 1, block # 1212416, count 64 ... 64 blocks written: OK
Starting kernel
## Flattened Device Tree blob at 12000000
   Booting using the fdt blob at 0x12000000
Working FDT set to 12000000
   Loading Device Tree to 00000000ecde6000, end 00000000ece6bfff ... OK
Working FDT set to ecde6000

Starting kernel ...

@rpardini
Copy link
Member Author

rpardini commented Feb 4, 2025

I'd like add to context fact that current armbian uboot can't boot M1 from sdcard without recovery button

Very strange. I've tested all previous versions since 2024.07 and all work with SD on my m1.

This is on the u-boot 2025.01 from this PR, showing SD card details.

U-Boot 2025.01-armbian-2025.01-S6d41-P6f62-H4666-V390e-B1e5e-R448a-dirty (Jan 31 2025 - 17:29:22 +0000)

Model: Hardkernel ODROID-M1
DRAM:  8 GiB (effective 7.7 GiB)
PMIC:  RK809 (on=0x40, off=0x00)
Core:  328 devices, 35 uclasses, devicetree: separate
MMC:   mmc@fe2b0000: 1, mmc@fe310000: 0
Loading Environment from SPIFlash... SF: Detected mx25u12835f with page size 256 Bytes, erase size 4 KiB, total 16 MiB
OK
In:    serial@fe660000
Out:   serial@fe660000
Err:   serial@fe660000
Model: Hardkernel ODROID-M1
Net:   eth0: ethernet@fe2a0000
armbian leds
armbian env already set once
Hit any key to stop autoboot:  0
=> mmc dev 1
switch to partitions #0, OK
mmc1 is current device
=> mmc info
Device: mmc@fe2b0000
Manufacturer ID: 3
OEM: 5344
Name: SN64G
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 59.5 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes

@rpardini rpardini force-pushed the pr/odroidm1-u-boot-enable-setexpr-patch-202501-for-fileenv-enable-squashfs-support branch from d71aff0 to 652aea5 Compare February 4, 2025 19:08
@rpardini
Copy link
Member Author

rpardini commented Feb 4, 2025

But I have free emmc module, and can do something with emmc

Yes, please try eMMC - I suspect there might be the ages-old problem of dubious SD cards involved here.

@igorpecovnik igorpecovnik added the 02 Milestone: First quarter release label Feb 5, 2025
@iav
Copy link
Contributor

iav commented Feb 5, 2025

haos_odroid-m1-14.2.img SHA-1: db323e19e8a38925064ad2946a578572f03932bd
written to emmc, without button

DDR 2d653b3476 typ 24/01/20-15:04:19,fwver: v1.21
In
LP4/4x derate en, other dram:1x trefi
ddrconfig:7
LPDDR4X, 324MHz
BW=32 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=8192MB
tdqss: cs0 dqs0: -72ps, dqs1: -168ps, dqs2: -144ps, dqs3: -217ps,
tdqss: cs1 dqs0: -48ps, dqs1: -144ps, dqs2: -120ps, dqs3: -217ps,

change to: 324MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vrefinner:24%, vrefout:41%
dram drv:40,odt:0
clk skew:0x65
rx vref: 34.4%
tx vref: 44.0%

change to: 528MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vrefinner:24%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58
rx vref: 34.4%
tx vref: 40.0%

change to: 780MHz
PHY drv:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58
rx vref: 17.6%
tx vref: 40.0%

change to: 1560MHz(final freq)
PHY drv:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:22%
dram drv:40,odt:80
vref_ca:00000071
clk skew:0x3a
rx vref: 17.6%
tx vref: 20.8%
cs 0:
the read training result:
DQS0:0x2c, DQS1:0x2e, DQS2:0x2e, DQS3:0x2a,
min  : 0xc  0xc  0xf  0xc  0x2  0x4  0x7  0x4 , 0xa  0xa  0x2  0x3  0xc  0x9  0xc  0x8 ,
      0x10 0x10  0xa  0x8  0x2  0x1  0x3  0x4 , 0x8  0x6  0x5  0x2  0xf  0xe  0xa  0xe ,
mid  :0x25 0x25 0x28 0x25 0x1b 0x1e 0x20 0x1d ,0x24 0x23 0x1a 0x1b 0x25 0x23 0x24 0x21 ,
      0x29 0x2a 0x23 0x22 0x1d 0x1a 0x1b 0x1e ,0x22 0x1e 0x1f 0x1a 0x28 0x28 0x23 0x27 ,
max  :0x3f 0x3e 0x41 0x3f 0x34 0x38 0x3a 0x36 ,0x3f 0x3c 0x32 0x34 0x3e 0x3d 0x3d 0x3b ,
      0x43 0x45 0x3d 0x3c 0x38 0x34 0x34 0x39 ,0x3d 0x37 0x3a 0x32 0x41 0x42 0x3c 0x41 ,
range:0x33 0x32 0x32 0x33 0x32 0x34 0x33 0x32 ,0x35 0x32 0x30 0x31 0x32 0x34 0x31 0x33 ,
      0x33 0x35 0x33 0x34 0x36 0x33 0x31 0x35 ,0x35 0x31 0x35 0x30 0x32 0x34 0x32 0x33 ,
the write training result:
DQS0:0x31, DQS1:0x1e, DQS2:0x23, DQS3:0xf,
min  :0x6c 0x6e 0x72 0x6e 0x63 0x64 0x68 0x66 0x65 ,0x55 0x53 0x4c 0x4f 0x58 0x53 0x55 0x53 0x4f ,
      0x5f 0x61 0x59 0x58 0x53 0x4f 0x50 0x53 0x55 ,0x49 0x45 0x44 0x3d 0x4b 0x4a 0x47 0x4b 0x3f ,
mid  :0x84 0x88 0x8c 0x89 0x7c 0x7d 0x81 0x7e 0x7d ,0x70 0x6e 0x66 0x68 0x72 0x6d 0x70 0x6d 0x6b ,
      0x7a 0x7b 0x73 0x71 0x6e 0x69 0x6b 0x6e 0x70 ,0x63 0x5e 0x5d 0x56 0x66 0x66 0x61 0x67 0x5a ,
max  :0x9d 0xa2 0xa7 0xa4 0x95 0x97 0x9a 0x97 0x96 ,0x8b 0x89 0x81 0x82 0x8d 0x88 0x8b 0x88 0x87 ,
      0x96 0x96 0x8d 0x8b 0x8a 0x83 0x86 0x89 0x8b ,0x7d 0x78 0x77 0x70 0x81 0x83 0x7c 0x83 0x76 ,
range:0x31 0x34 0x35 0x36 0x32 0x33 0x32 0x31 0x31 ,0x36 0x36 0x35 0x33 0x35 0x35 0x36 0x35 0x38 ,
      0x37 0x35 0x34 0x33 0x37 0x34 0x36 0x36 0x36 ,0x34 0x33 0x33 0x33 0x36 0x39 0x35 0x38 0x37 ,
cs 1:
the read training result:
DQS0:0x2c, DQS1:0x2e, DQS2:0x2e, DQS3:0x2a,
min  : 0xc  0xc  0xf  0xc  0x2  0x4  0x7  0x4 , 0xa  0xa  0x2  0x3  0xc  0x9  0xc  0x8 ,
      0x10 0x10  0xa  0x8  0x2  0x1  0x3  0x4 , 0x8  0x6  0x5  0x2  0xf  0xe  0xa  0xe ,
mid  :0x25 0x25 0x28 0x25 0x1b 0x1e 0x20 0x1d ,0x24 0x23 0x1a 0x1b 0x25 0x23 0x24 0x21 ,
      0x29 0x2a 0x23 0x22 0x1d 0x1a 0x1b 0x1e ,0x22 0x1e 0x1f 0x1a 0x28 0x28 0x23 0x27 ,
max  :0x3f 0x3e 0x41 0x3f 0x34 0x38 0x3a 0x36 ,0x3f 0x3c 0x32 0x34 0x3e 0x3d 0x3d 0x3b ,
      0x43 0x45 0x3d 0x3c 0x38 0x34 0x34 0x39 ,0x3d 0x37 0x3a 0x32 0x41 0x42 0x3c 0x41 ,
range:0x33 0x32 0x32 0x33 0x32 0x34 0x33 0x32 ,0x35 0x32 0x30 0x31 0x32 0x34 0x31 0x33 ,
      0x33 0x35 0x33 0x34 0x36 0x33 0x31 0x35 ,0x35 0x31 0x35 0x30 0x32 0x34 0x32 0x33 ,
the write training result:
DQS0:0x31, DQS1:0x1e, DQS2:0x23, DQS3:0xf,
min  :0x6c 0x6e 0x72 0x6e 0x63 0x64 0x68 0x66 0x65 ,0x55 0x53 0x4c 0x4f 0x58 0x53 0x55 0x53 0x4f ,
      0x5f 0x61 0x59 0x58 0x53 0x4f 0x50 0x53 0x55 ,0x49 0x45 0x44 0x3d 0x4b 0x4a 0x47 0x4b 0x3f ,
mid  :0x84 0x88 0x8c 0x89 0x7c 0x7d 0x81 0x7e 0x7d ,0x70 0x6e 0x66 0x68 0x72 0x6d 0x70 0x6d 0x6b ,
      0x7a 0x7b 0x73 0x71 0x6e 0x69 0x6b 0x6e 0x70 ,0x63 0x5e 0x5d 0x56 0x66 0x66 0x61 0x67 0x5a ,
max  :0x9d 0xa2 0xa7 0xa4 0x95 0x97 0x9a 0x97 0x96 ,0x8b 0x89 0x81 0x82 0x8d 0x88 0x8b 0x88 0x87 ,
      0x96 0x96 0x8d 0x8b 0x8a 0x83 0x86 0x89 0x8b ,0x7d 0x78 0x77 0x70 0x81 0x83 0x7c 0x83 0x76 ,
range:0x31 0x34 0x35 0x36 0x32 0x33 0x32 0x31 0x31 ,0x36 0x36 0x35 0x33 0x35 0x35 0x36 0x35 0x38 ,
      0x37 0x35 0x34 0x33 0x37 0x34 0x36 0x36 0x36 ,0x34 0x33 0x33 0x33 0x36 0x39 0x35 0x38 0x37 ,
CA Training result:
cs:0 min  :0x58 0x4a 0x4d 0x3d 0x50 0x38 0x50 ,0x53 0x44 0x44 0x37 0x46 0x37 0x4e ,
cs:0 mid  :0x8e 0x90 0x82 0x81 0x85 0x7c 0x77 ,0x8a 0x8a 0x7d 0x7b 0x7d 0x7a 0x77 ,
cs:0 max  :0xc4 0xd6 0xb8 0xc5 0xba 0xc1 0x9e ,0xc1 0xd0 0xb6 0xc0 0xb4 0xbe 0xa1 ,
cs:0 range:0x6c 0x8c 0x6b 0x88 0x6a 0x89 0x4e ,0x6e 0x8c 0x72 0x89 0x6e 0x87 0x53 ,
cs:1 min  :0x53 0x50 0x47 0x44 0x48 0x42 0x4e ,0x4e 0x4f 0x42 0x42 0x42 0x40 0x4d ,
cs:1 mid  :0x90 0x8e 0x85 0x80 0x85 0x7e 0x7a ,0x8e 0x8c 0x81 0x7e 0x7f 0x7d 0x7b ,
cs:1 max  :0xce 0xcd 0xc3 0xbd 0xc3 0xbb 0xa7 ,0xce 0xca 0xc0 0xbb 0xbd 0xbb 0xa9 ,
cs:1 range:0x7b 0x7d 0x7c 0x79 0x7b 0x79 0x59 ,0x80 0x7b 0x7e 0x79 0x7b 0x7b 0x5c ,
out

U-Boot SPL 2025.01-armbian-2025.01-S6d41-P6f62-H4cab-V390e-Bb703-R448a-dirty (Feb 03 2025 - 19:34:24 +0000)
Trying to boot from SPI
## Checking hash(es) for config config-1 ... OK
## Checking hash(es) for Image atf-1 ... sha256+ OK
## Checking hash(es) for Image u-boot ... sha256+ OK
## Checking hash(es) for Image fdt-1 ... sha256+ OK
## Checking hash(es) for Image atf-2 ... sha256+ OK
## Checking hash(es) for Image atf-3 ... sha256+ OK
## Checking hash(es) for Image atf-4 ... sha256+ OK
## Checking hash(es) for Image atf-5 ... sha256+ OK
## Checking hash(es) for Image atf-6 ... sha256+ OK
INFO:    Preloader serial: 2
NOTICE:  BL31: v2.3():v2.3-645-g8cea6ab0b:cl, fwver: v1.44
NOTICE:  BL31: Built : 16:36:43, Sep 19 2023
INFO:    GICv3 without legacy support detected.
INFO:    ARM GICv3 driver initialized in EL3
INFO:    pmu v1 is valid 220114
INFO:    l3 cache partition cfg-0
INFO:    dfs DDR fsp_param[0].freq_mhz= 1560MHz
INFO:    dfs DDR fsp_param[1].freq_mhz= 324MHz
INFO:    dfs DDR fsp_param[2].freq_mhz= 528MHz
INFO:    dfs DDR fsp_param[3].freq_mhz= 780MHz
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 0
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0xa00000
INFO:    SPSR = 0x3c9


U-Boot 2025.01-armbian-2025.01-S6d41-P6f62-H4cab-V390e-Bb703-R448a-dirty (Feb 03 2025 - 19:34:24 +0000)

Model: Hardkernel ODROID-M1
DRAM:  8 GiB (effective 7.7 GiB)
PMIC:  RK809 (on=0x40, off=0x00)
Core:  328 devices, 35 uclasses, devicetree: separate
MMC:   mmc@fe2b0000: 1, mmc@fe310000: 0
Loading Environment from SPIFlash... SF: Detected mx25u12835f with page size 256 Bytes, erase size 4 KiB, total 16 MiB
OK
In:    serial@fe660000
Out:   serial@fe660000
Err:   serial@fe660000
Model: Hardkernel ODROID-M1
Net:   eth0: ethernet@fe2a0000
armbian leds
armbian env already set once
Hit any key to stop autoboot:  0
Card did not respond to voltage select! : -110
Failed to load EFI variables
Bus usb@fd000000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@fd800000: USB EHCI 1.00
Bus usb@fd840000: USB OHCI 1.0
Bus usb@fd880000: USB EHCI 1.00
Bus usb@fd8c0000: USB OHCI 1.0
scanning bus usb@fd000000 for devices... 1 USB Device(s) found
scanning bus usb@fd800000 for devices... 2 USB Device(s) found
scanning bus usb@fd840000 for devices... 1 USB Device(s) found
scanning bus usb@fd880000 for devices... 1 USB Device(s) found
scanning bus usb@fd8c0000 for devices... 1 USB Device(s) found
Card did not respond to voltage select! : -110
scanning bus for devices...
SATA link 0 timeout.
AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp fbss pio slum part ccc apst
ethernet@fe2a0000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
phy_startup() failed: -110
FAILED: -110
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again
ethernet@fe2a0000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
phy_startup() failed: -110
FAILED: -110
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again
=> mmc info
Device: mmc@fe310000
Manufacturer ID: 70
OEM: 0
Name: Y29128
Bus Speed: 200000000
Mode: HS200 (200MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 116.6 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 116.6 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected
=>

@iav
Copy link
Contributor

iav commented Feb 5, 2025

@rpardini maybe we use different M1 devices? Mine is Rev1

@rpardini
Copy link
Member Author

rpardini commented Feb 6, 2025

I'm baffled. From your mmc info output the uboot is able to see the eMMC correctly.
Can you try poking at it, for example

  • try to get a list of partitions on the eMMC: part list mmc 0
  • try to get file list of files in some partition: ls mmc 0 <partition> -- the HAOS image should have quite a few partitions, one of them should have boot.scr and cmdline.txt in it.

…le squashfs support

- as Armbian u-boot is possibly deployed to SPI (replacing Petitboot),
  try to make as compatible as possible; eg enable squashfs support
- in this case, `setexpr` and `fileenv` are used by HAOS
  - found `fileenv` here spikerguy/khadas-uboot@049e1a1

Signed-off-by: Ricardo Pardini <[email protected]>
@rpardini rpardini force-pushed the pr/odroidm1-u-boot-enable-setexpr-patch-202501-for-fileenv-enable-squashfs-support branch from 652aea5 to 7d3d616 Compare February 6, 2025 15:41
@rpardini
Copy link
Member Author

rpardini commented Feb 6, 2025

maybe we use different M1 devices? Mine is Rev1

Mine is Rev 1.0 20211112

@iav
Copy link
Contributor

iav commented Feb 6, 2025

Rev 1.0 20220613
today's update uboot, emmc with HAOS, no recovery button

DDR 2d653b3476 typ 24/01/20-15:04:19,fwver: v1.21
In
LP4/4x derate en, other dram:1x trefi
ddrconfig:7
LPDDR4X, 324MHz
BW=32 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=8192MB
tdqss: cs0 dqs0: -72ps, dqs1: -168ps, dqs2: -144ps, dqs3: -217ps,
tdqss: cs1 dqs0: -48ps, dqs1: -144ps, dqs2: -120ps, dqs3: -217ps,

change to: 324MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vrefinner:24%, vrefout:41%
dram drv:40,odt:0
clk skew:0x65
rx vref: 34.4%
tx vref: 42.0%

change to: 528MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vrefinner:24%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58
rx vref: 34.4%
tx vref: 40.0%

change to: 780MHz
PHY drv:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58
rx vref: 17.6%
tx vref: 40.0%

change to: 1560MHz(final freq)
PHY drv:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:22%
dram drv:40,odt:80
vref_ca:00000071
clk skew:0x3a
rx vref: 17.6%
tx vref: 20.8%
cs 0:
the read training result:
DQS0:0x2c, DQS1:0x2e, DQS2:0x2e, DQS3:0x2a,
min  : 0xc  0xd  0xf  0xc  0x2  0x4  0x7  0x4 , 0xa  0xa  0x2  0x2  0xc  0x9  0xc  0x8 ,
      0x10 0x10  0xa  0x8  0x2  0x1  0x3  0x3 , 0x8  0x6  0x5  0x1  0xf  0xd  0xa  0xe ,
mid  :0x25 0x25 0x28 0x25 0x1b 0x1e 0x20 0x1d ,0x24 0x23 0x1a 0x1b 0x25 0x23 0x24 0x21 ,
      0x29 0x2a 0x23 0x22 0x1d 0x1a 0x1b 0x1d ,0x23 0x1f 0x1f 0x1a 0x28 0x27 0x23 0x27 ,
max  :0x3e 0x3e 0x41 0x3f 0x34 0x38 0x3a 0x36 ,0x3e 0x3c 0x32 0x35 0x3e 0x3d 0x3d 0x3b ,
      0x43 0x45 0x3d 0x3c 0x38 0x34 0x34 0x38 ,0x3e 0x38 0x3a 0x33 0x41 0x42 0x3d 0x41 ,
range:0x32 0x31 0x32 0x33 0x32 0x34 0x33 0x32 ,0x34 0x32 0x30 0x33 0x32 0x34 0x31 0x33 ,
      0x33 0x35 0x33 0x34 0x36 0x33 0x31 0x35 ,0x36 0x32 0x35 0x32 0x32 0x35 0x33 0x33 ,
the write training result:
DQS0:0x31, DQS1:0x1e, DQS2:0x23, DQS3:0xf,
min  :0x6c 0x6e 0x73 0x6e 0x63 0x64 0x68 0x66 0x65 ,0x55 0x53 0x4c 0x4e 0x58 0x53 0x55 0x53 0x4f ,
      0x5e 0x5f 0x59 0x58 0x53 0x4e 0x51 0x54 0x55 ,0x49 0x45 0x45 0x3d 0x4b 0x4b 0x47 0x4c 0x3f ,
mid  :0x86 0x88 0x8d 0x89 0x7c 0x7d 0x81 0x7f 0x7d ,0x70 0x6e 0x66 0x67 0x72 0x6d 0x6f 0x6d 0x6a ,
      0x7a 0x7b 0x73 0x71 0x6e 0x68 0x6b 0x6e 0x70 ,0x63 0x5e 0x5e 0x57 0x66 0x66 0x61 0x67 0x5a ,
max  :0xa0 0xa2 0xa7 0xa4 0x95 0x97 0x9b 0x98 0x96 ,0x8b 0x89 0x81 0x81 0x8c 0x88 0x8a 0x88 0x86 ,
      0x96 0x97 0x8d 0x8a 0x89 0x83 0x86 0x89 0x8b ,0x7d 0x78 0x77 0x72 0x81 0x82 0x7c 0x82 0x76 ,
range:0x34 0x34 0x34 0x36 0x32 0x33 0x33 0x32 0x31 ,0x36 0x36 0x35 0x33 0x34 0x35 0x35 0x35 0x37 ,
      0x38 0x38 0x34 0x32 0x36 0x35 0x35 0x35 0x36 ,0x34 0x33 0x32 0x35 0x36 0x37 0x35 0x36 0x37 ,
cs 1:
the read training result:
DQS0:0x2c, DQS1:0x2e, DQS2:0x2e, DQS3:0x2a,
min  : 0xc  0xd  0xf  0xc  0x2  0x4  0x7  0x4 , 0xa  0xa  0x2  0x2  0xc  0x9  0xc  0x8 ,
      0x10 0x10  0xa  0x8  0x2  0x1  0x3  0x3 , 0x8  0x6  0x5  0x1  0xf  0xd  0xa  0xe ,
mid  :0x25 0x25 0x28 0x25 0x1b 0x1e 0x20 0x1d ,0x24 0x23 0x1a 0x1b 0x25 0x23 0x24 0x21 ,
      0x29 0x2a 0x23 0x22 0x1d 0x1a 0x1b 0x1d ,0x23 0x1f 0x1f 0x1a 0x28 0x27 0x23 0x27 ,
max  :0x3e 0x3e 0x41 0x3f 0x34 0x38 0x3a 0x36 ,0x3e 0x3c 0x32 0x35 0x3e 0x3d 0x3d 0x3b ,
      0x43 0x45 0x3d 0x3c 0x38 0x34 0x34 0x38 ,0x3e 0x38 0x3a 0x33 0x41 0x42 0x3d 0x41 ,
range:0x32 0x31 0x32 0x33 0x32 0x34 0x33 0x32 ,0x34 0x32 0x30 0x33 0x32 0x34 0x31 0x33 ,
      0x33 0x35 0x33 0x34 0x36 0x33 0x31 0x35 ,0x36 0x32 0x35 0x32 0x32 0x35 0x33 0x33 ,
the write training result:
DQS0:0x31, DQS1:0x1e, DQS2:0x23, DQS3:0xf,
min  :0x6c 0x6e 0x73 0x6e 0x63 0x64 0x68 0x66 0x65 ,0x55 0x53 0x4c 0x4e 0x58 0x53 0x55 0x53 0x4f ,
      0x5e 0x5f 0x59 0x58 0x53 0x4e 0x51 0x54 0x55 ,0x49 0x45 0x45 0x3d 0x4b 0x4b 0x47 0x4c 0x3f ,
mid  :0x86 0x88 0x8d 0x89 0x7c 0x7d 0x81 0x7f 0x7d ,0x70 0x6e 0x66 0x67 0x72 0x6d 0x6f 0x6d 0x6a ,
      0x7a 0x7b 0x73 0x71 0x6e 0x68 0x6b 0x6e 0x70 ,0x63 0x5e 0x5e 0x57 0x66 0x66 0x61 0x67 0x5a ,
max  :0xa0 0xa2 0xa7 0xa4 0x95 0x97 0x9b 0x98 0x96 ,0x8b 0x89 0x81 0x81 0x8c 0x88 0x8a 0x88 0x86 ,
      0x96 0x97 0x8d 0x8a 0x89 0x83 0x86 0x89 0x8b ,0x7d 0x78 0x77 0x72 0x81 0x82 0x7c 0x82 0x76 ,
range:0x34 0x34 0x34 0x36 0x32 0x33 0x33 0x32 0x31 ,0x36 0x36 0x35 0x33 0x34 0x35 0x35 0x35 0x37 ,
      0x38 0x38 0x34 0x32 0x36 0x35 0x35 0x35 0x36 ,0x34 0x33 0x32 0x35 0x36 0x37 0x35 0x36 0x37 ,
CA Training result:
cs:0 min  :0x57 0x4d 0x4c 0x42 0x4e 0x3d 0x51 ,0x52 0x44 0x42 0x39 0x44 0x37 0x4d ,
cs:0 mid  :0x90 0x90 0x85 0x83 0x87 0x7f 0x7a ,0x8a 0x88 0x7c 0x7b 0x7c 0x79 0x78 ,
cs:0 max  :0xc9 0xd4 0xbe 0xc4 0xc1 0xc1 0xa3 ,0xc3 0xcd 0xb6 0xbe 0xb4 0xbb 0xa3 ,
cs:0 range:0x72 0x87 0x72 0x82 0x73 0x84 0x52 ,0x71 0x89 0x74 0x85 0x70 0x84 0x56 ,
cs:1 min  :0x53 0x50 0x46 0x44 0x48 0x42 0x4e ,0x4e 0x4f 0x42 0x42 0x42 0x3f 0x4d ,
cs:1 mid  :0x90 0x8e 0x84 0x80 0x85 0x7e 0x7a ,0x8e 0x8c 0x81 0x7e 0x7f 0x7d 0x7b ,
cs:1 max  :0xce 0xcd 0xc3 0xbd 0xc3 0xbb 0xa7 ,0xce 0xca 0xc0 0xba 0xbd 0xbb 0xa9 ,
cs:1 range:0x7b 0x7d 0x7d 0x79 0x7b 0x79 0x59 ,0x80 0x7b 0x7e 0x78 0x7b 0x7c 0x5c ,
out

U-Boot SPL 2025.01-armbian-2025.01-S6d41-Pfda2-H4cab-V390e-Bb703-R448a-dirty (Feb 06 2025 - 18:35:07 +0000)
Trying to boot from SPI
## Checking hash(es) for config config-1 ... OK
## Checking hash(es) for Image atf-1 ... sha256+ OK
## Checking hash(es) for Image u-boot ... sha256+ OK
## Checking hash(es) for Image fdt-1 ... sha256+ OK
## Checking hash(es) for Image atf-2 ... sha256+ OK
## Checking hash(es) for Image atf-3 ... sha256+ OK
## Checking hash(es) for Image atf-4 ... sha256+ OK
## Checking hash(es) for Image atf-5 ... sha256+ OK
## Checking hash(es) for Image atf-6 ... sha256+ OK
INFO:    Preloader serial: 2
NOTICE:  BL31: v2.3():v2.3-645-g8cea6ab0b:cl, fwver: v1.44
NOTICE:  BL31: Built : 16:36:43, Sep 19 2023
INFO:    GICv3 without legacy support detected.
INFO:    ARM GICv3 driver initialized in EL3
INFO:    pmu v1 is valid 220114
INFO:    l3 cache partition cfg-0
INFO:    dfs DDR fsp_param[0].freq_mhz= 1560MHz
INFO:    dfs DDR fsp_param[1].freq_mhz= 324MHz
INFO:    dfs DDR fsp_param[2].freq_mhz= 528MHz
INFO:    dfs DDR fsp_param[3].freq_mhz= 780MHz
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 0
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0xa00000
INFO:    SPSR = 0x3c9


U-Boot 2025.01-armbian-2025.01-S6d41-Pfda2-H4cab-V390e-Bb703-R448a-dirty (Feb 06 2025 - 18:35:07 +0000)

Model: Hardkernel ODROID-M1
DRAM:  8 GiB (effective 7.7 GiB)
PMIC:  RK809 (on=0x40, off=0x00)
Core:  328 devices, 35 uclasses, devicetree: separate
MMC:   mmc@fe2b0000: 1, mmc@fe310000: 0
Loading Environment from SPIFlash... SF: Detected mx25u12835f with page size 256 Bytes, erase size 4 KiB, total 16 MiB
OK
In:    serial@fe660000
Out:   serial@fe660000
Err:   serial@fe660000
Model: Hardkernel ODROID-M1
Net:   eth0: ethernet@fe2a0000
armbian leds
armbian env already set once
Hit any key to stop autoboot:  0
Card did not respond to voltage select! : -110
Bus usb@fd000000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@fd800000: USB EHCI 1.00
Bus usb@fd840000: USB OHCI 1.0
Bus usb@fd880000: USB EHCI 1.00
Bus usb@fd8c0000: USB OHCI 1.0
scanning bus usb@fd000000 for devices... 1 USB Device(s) found
scanning bus usb@fd800000 for devices... 1 USB Device(s) found
scanning bus usb@fd840000 for devices... ERROR:  USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR:  USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR:  USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
unable to get device descriptor (error=-1)
1 USB Device(s) found
scanning bus usb@fd880000 for devices... 1 USB Device(s) found
scanning bus usb@fd8c0000 for devices... 1 USB Device(s) found
Card did not respond to voltage select! : -110
scanning bus for devices...
SATA link 0 timeout.
AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp fbss pio slum part ccc apst
ethernet@fe2a0000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
phy_startup() failed: -110
FAILED: -110
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again
ethernet@fe2a0000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
phy_startup() failed: -110
FAILED: -110
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again
=> mmc info
Device: mmc@fe310000
Manufacturer ID: 70
OEM: 0
Name: Y29128
Bus Speed: 200000000
Mode: HS200 (200MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 116.6 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 116.6 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected
=> part list mmc 0

Partition Map for mmc device 0  --   Partition Type: EFI

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00004000      0x00007fff      "uboot"
        attrs:  0x0000000000000000
        type:   e3c9e316-0b5c-4db8-817d-f92df00215ae
        guid:   ccf27e7d-b886-4cc8-815a-f5395b4e324c
  2     0x00008000      0x0000ffff      "hassos-boot"
        attrs:  0x0000000000000000
        type:   c12a7328-f81f-11d2-ba4b-00a0c93ec93b
        guid:   b3dd0952-733c-4c88-8cba-cab9b8b4377f
  3     0x00010000      0x0001bfff      "hassos-kernel0"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   26700fc6-b0bc-4ccf-9837-ea1a4cba3e65
  4     0x0001c000      0x0009bfff      "hassos-system0"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   8d3d53e3-6d49-4c38-8349-aff6859e82fd
  5     0x0009c000      0x000a7fff      "hassos-kernel1"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   fc02a4f0-5350-406f-93a2-56cbed636b5f
  6     0x000a8000      0x00127fff      "hassos-system1"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   a3ec664e-32ce-4665-95ea-7ae90ce9aa20
  7     0x00128000      0x0012bfff      "hassos-bootstate"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   33236519-7f32-4dff-8002-3390b62c309d
  8     0x0012c000      0x0015bfff      "hassos-overlay"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   f1326040-5236-40eb-b683-aaa100a9afcf
  9     0x0015c000      0x003dbfff      "hassos-data"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   a52a4597-fa3a-4851-aefd-2fbe9f849079
=> ls mmc 0 1
=> ls mmc 0 2
=> ls mmc 0 3
=> ls mmc 0 4
=> ls mmc 0 5
=> ls mmc 0 6
=> ls mmc 0 7
=> ls mmc 0 8
=> ls mmc 0 9
=> 

@rpardini
Copy link
Member Author

rpardini commented Feb 7, 2025

2 0x00008000 0x0000ffff "hassos-boot" -- this is a FAT32 partition, that contains boot.scr and cmdline.txt and a few others.

Thus ls for partition 2 should show them.

Fact the u-boot can talk to eMMC, can list partitions, but can't access the most basic FAT32 filesystem is very strange -- I can't attribute this to a different board revision. How are you burning the image? Can you check that partition indeed contains the expected files using another machine? Also, try creating some file in there and see if it shows up in u-boot's ls.

@rpardini
Copy link
Member Author

rpardini commented Feb 7, 2025

Also, check the help for the ls command; it might be it is actually ls mmc 0:2 /
please run ls ? or ? ls and it will show the help text/syntax

@iav
Copy link
Contributor

iav commented Feb 7, 2025

You are right

DDR 2d653b3476 typ 24/01/20-15:04:19,fwver: v1.21
In
LP4/4x derate en, other dram:1x trefi
ddrconfig:7
LPDDR4X, 324MHz
BW=32 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=8192MB
tdqss: cs0 dqs0: -72ps, dqs1: -168ps, dqs2: -144ps, dqs3: -217ps,
tdqss: cs1 dqs0: -72ps, dqs1: -168ps, dqs2: -144ps, dqs3: -217ps,

change to: 324MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vrefinner:24%, vrefout:41%
dram drv:40,odt:0
clk skew:0x65
rx vref: 34.4%
tx vref: 42.0%

change to: 528MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vrefinner:24%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58
rx vref: 34.4%
tx vref: 40.0%

change to: 780MHz
PHY drv:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58
rx vref: 17.6%
tx vref: 42.0%

change to: 1560MHz(final freq)
PHY drv:clk:36,ca:36,DQ:29,odt:60
vrefinner:16%, vrefout:22%
dram drv:40,odt:80
vref_ca:00000071
clk skew:0x3a
rx vref: 17.6%
tx vref: 20.8%
cs 0:
the read training result:
DQS0:0x2c, DQS1:0x2e, DQS2:0x2f, DQS3:0x2b,
min  : 0xc  0xc  0xf  0xc  0x2  0x4  0x7  0x4 , 0xa  0xa  0x2  0x2  0xc  0xa  0xc  0x7 ,
      0x10 0x11  0xa  0x8  0x3  0x2  0x3  0x3 , 0x8  0x6  0x6  0x1  0xf  0xe  0xa  0xe ,
mid  :0x25 0x25 0x28 0x25 0x1b 0x1e 0x20 0x1d ,0x24 0x22 0x1a 0x1b 0x25 0x23 0x24 0x21 ,
      0x2a 0x2b 0x24 0x22 0x1d 0x1b 0x1b 0x1e ,0x23 0x1f 0x20 0x19 0x28 0x28 0x23 0x27 ,
max  :0x3f 0x3f 0x41 0x3f 0x34 0x38 0x3a 0x36 ,0x3e 0x3b 0x32 0x34 0x3e 0x3d 0x3d 0x3b ,
      0x44 0x45 0x3e 0x3d 0x38 0x34 0x34 0x3a ,0x3e 0x38 0x3a 0x32 0x41 0x42 0x3d 0x41 ,
range:0x33 0x33 0x32 0x33 0x32 0x34 0x33 0x32 ,0x34 0x31 0x30 0x32 0x32 0x33 0x31 0x34 ,
      0x34 0x34 0x34 0x35 0x35 0x32 0x31 0x37 ,0x36 0x32 0x34 0x31 0x32 0x34 0x33 0x33 ,
the write training result:
DQS0:0x2c, DQS1:0x19, DQS2:0x1e, DQS3:0xf,
min  :0x66 0x6a 0x6d 0x69 0x5d 0x5d 0x62 0x5d 0x5e ,0x51 0x4e 0x47 0x4a 0x53 0x4e 0x51 0x4e 0x4a ,
      0x59 0x5c 0x55 0x55 0x50 0x4a 0x4c 0x50 0x53 ,0x48 0x44 0x44 0x3d 0x4a 0x4a 0x45 0x4b 0x3e ,
mid  :0x7e 0x83 0x87 0x83 0x76 0x77 0x7a 0x77 0x78 ,0x6b 0x69 0x61 0x63 0x6d 0x68 0x6b 0x68 0x66 ,
      0x76 0x78 0x70 0x6f 0x6b 0x65 0x67 0x6b 0x6d ,0x62 0x5e 0x5d 0x56 0x65 0x66 0x61 0x66 0x5a ,
max  :0x97 0x9c 0xa2 0x9d 0x8f 0x92 0x93 0x92 0x92 ,0x86 0x84 0x7b 0x7c 0x87 0x83 0x85 0x83 0x82 ,
      0x93 0x94 0x8c 0x8a 0x86 0x81 0x83 0x86 0x87 ,0x7d 0x78 0x77 0x70 0x81 0x82 0x7d 0x82 0x76 ,
range:0x31 0x32 0x35 0x34 0x32 0x35 0x31 0x35 0x34 ,0x35 0x36 0x34 0x32 0x34 0x35 0x34 0x35 0x38 ,
      0x3a 0x38 0x37 0x35 0x36 0x37 0x37 0x36 0x34 ,0x35 0x34 0x33 0x33 0x37 0x38 0x38 0x37 0x38 ,
cs 1:
the read training result:
DQS0:0x2c, DQS1:0x2e, DQS2:0x2f, DQS3:0x2b,
min  : 0xc  0xc  0xf  0xc  0x2  0x4  0x7  0x4 , 0xa  0xa  0x2  0x2  0xc  0xa  0xc  0x7 ,
      0x10 0x11  0xa  0x8  0x3  0x2  0x3  0x3 , 0x8  0x6  0x6  0x1  0xf  0xe  0xa  0xe ,
mid  :0x25 0x25 0x28 0x25 0x1b 0x1e 0x20 0x1d ,0x24 0x22 0x1a 0x1b 0x25 0x23 0x24 0x21 ,
      0x2a 0x2b 0x24 0x22 0x1d 0x1b 0x1b 0x1e ,0x23 0x1f 0x20 0x19 0x28 0x28 0x23 0x27 ,
max  :0x3f 0x3f 0x41 0x3f 0x34 0x38 0x3a 0x36 ,0x3e 0x3b 0x32 0x34 0x3e 0x3d 0x3d 0x3b ,
      0x44 0x45 0x3e 0x3d 0x38 0x34 0x34 0x3a ,0x3e 0x38 0x3a 0x32 0x41 0x42 0x3d 0x41 ,
range:0x33 0x33 0x32 0x33 0x32 0x34 0x33 0x32 ,0x34 0x31 0x30 0x32 0x32 0x33 0x31 0x34 ,
      0x34 0x34 0x34 0x35 0x35 0x32 0x31 0x37 ,0x36 0x32 0x34 0x31 0x32 0x34 0x33 0x33 ,
the write training result:
DQS0:0x2c, DQS1:0x19, DQS2:0x1e, DQS3:0xf,
min  :0x66 0x6a 0x6d 0x69 0x5d 0x5d 0x62 0x5d 0x5e ,0x51 0x4e 0x47 0x4a 0x53 0x4e 0x51 0x4e 0x4a ,
      0x59 0x5c 0x55 0x55 0x50 0x4a 0x4c 0x50 0x53 ,0x48 0x44 0x44 0x3d 0x4a 0x4a 0x45 0x4b 0x3e ,
mid  :0x7e 0x83 0x87 0x83 0x76 0x77 0x7a 0x77 0x78 ,0x6b 0x69 0x61 0x63 0x6d 0x68 0x6b 0x68 0x66 ,
      0x76 0x78 0x70 0x6f 0x6b 0x65 0x67 0x6b 0x6d ,0x62 0x5e 0x5d 0x56 0x65 0x66 0x61 0x66 0x5a ,
max  :0x97 0x9c 0xa2 0x9d 0x8f 0x92 0x93 0x92 0x92 ,0x86 0x84 0x7b 0x7c 0x87 0x83 0x85 0x83 0x82 ,
      0x93 0x94 0x8c 0x8a 0x86 0x81 0x83 0x86 0x87 ,0x7d 0x78 0x77 0x70 0x81 0x82 0x7d 0x82 0x76 ,
range:0x31 0x32 0x35 0x34 0x32 0x35 0x31 0x35 0x34 ,0x35 0x36 0x34 0x32 0x34 0x35 0x34 0x35 0x38 ,
      0x3a 0x38 0x37 0x35 0x36 0x37 0x37 0x36 0x34 ,0x35 0x34 0x33 0x33 0x37 0x38 0x38 0x37 0x38 ,
CA Training result:
cs:0 min  :0x59 0x4a 0x4c 0x3d 0x4f 0x39 0x50 ,0x53 0x44 0x44 0x37 0x45 0x37 0x4e ,
cs:0 mid  :0x8f 0x90 0x82 0x80 0x85 0x7d 0x77 ,0x8a 0x89 0x7d 0x7b 0x7c 0x7a 0x76 ,
cs:0 max  :0xc5 0xd6 0xb9 0xc4 0xbb 0xc1 0x9e ,0xc1 0xcf 0xb6 0xbf 0xb4 0xbd 0x9e ,
cs:0 range:0x6c 0x8c 0x6d 0x87 0x6c 0x88 0x4e ,0x6e 0x8b 0x72 0x88 0x6f 0x86 0x50 ,
cs:1 min  :0x56 0x4c 0x48 0x3f 0x49 0x3e 0x52 ,0x50 0x4b 0x44 0x3f 0x43 0x3c 0x4e ,
cs:1 mid  :0x90 0x8f 0x83 0x80 0x84 0x7e 0x7a ,0x8d 0x8b 0x80 0x7d 0x7e 0x7c 0x7a ,
cs:1 max  :0xcb 0xd2 0xbe 0xc1 0xc0 0xbe 0xa3 ,0xcb 0xcb 0xbc 0xbc 0xba 0xbc 0xa7 ,
cs:1 range:0x75 0x86 0x76 0x82 0x77 0x80 0x51 ,0x7b 0x80 0x78 0x7d 0x77 0x80 0x59 ,
out

U-Boot SPL 2025.01-armbian-2025.01-S6d41-Pfda2-H4cab-V390e-Bb703-R448a-dirty (Feb 06 2025 - 18:35:07 +0000)
Trying to boot from SPI
## Checking hash(es) for config config-1 ... OK
## Checking hash(es) for Image atf-1 ... sha256+ OK
## Checking hash(es) for Image u-boot ... sha256+ OK
## Checking hash(es) for Image fdt-1 ... sha256+ OK
## Checking hash(es) for Image atf-2 ... sha256+ OK
## Checking hash(es) for Image atf-3 ... sha256+ OK
## Checking hash(es) for Image atf-4 ... sha256+ OK
## Checking hash(es) for Image atf-5 ... sha256+ OK
## Checking hash(es) for Image atf-6 ... sha256+ OK
INFO:    Preloader serial: 2
NOTICE:  BL31: v2.3():v2.3-645-g8cea6ab0b:cl, fwver: v1.44
NOTICE:  BL31: Built : 16:36:43, Sep 19 2023
INFO:    GICv3 without legacy support detected.
INFO:    ARM GICv3 driver initialized in EL3
INFO:    pmu v1 is valid 220114
INFO:    l3 cache partition cfg-0
INFO:    dfs DDR fsp_param[0].freq_mhz= 1560MHz
INFO:    dfs DDR fsp_param[1].freq_mhz= 324MHz
INFO:    dfs DDR fsp_param[2].freq_mhz= 528MHz
INFO:    dfs DDR fsp_param[3].freq_mhz= 780MHz
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 0
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0xa00000
INFO:    SPSR = 0x3c9


U-Boot 2025.01-armbian-2025.01-S6d41-Pfda2-H4cab-V390e-Bb703-R448a-dirty (Feb 06 2025 - 18:35:07 +0000)

Model: Hardkernel ODROID-M1
DRAM:  8 GiB (effective 7.7 GiB)
PMIC:  RK809 (on=0x40, off=0x00)
Core:  328 devices, 35 uclasses, devicetree: separate
MMC:   mmc@fe2b0000: 1, mmc@fe310000: 0
Loading Environment from SPIFlash... SF: Detected mx25u12835f with page size 256 Bytes, erase size 4 KiB, total 16 MiB
OK
In:    serial@fe660000
Out:   serial@fe660000
Err:   serial@fe660000
Model: Hardkernel ODROID-M1
Net:   eth0: ethernet@fe2a0000
armbian leds
armbian env already set once
Hit any key to stop autoboot:  0
Card did not respond to voltage select! : -110
Bus usb@fd000000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@fd800000: USB EHCI 1.00
Bus usb@fd840000: USB OHCI 1.0
Bus usb@fd880000: USB EHCI 1.00
Bus usb@fd8c0000: USB OHCI 1.0
scanning bus usb@fd000000 for devices... 1 USB Device(s) found
scanning bus usb@fd800000 for devices... 1 USB Device(s) found
scanning bus usb@fd840000 for devices... ERROR:  USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR:  USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR:  USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
unable to get device descriptor (error=-1)
1 USB Device(s) found
scanning bus usb@fd880000 for devices... 1 USB Device(s) found
scanning bus usb@fd8c0000 for devices... 1 USB Device(s) found
Card did not respond to voltage select! : -110
scanning bus for devices...
SATA link 0 timeout.
AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp fbss pio slum part ccc apst
ethernet@fe2a0000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
phy_startup() failed: -110
FAILED: -110
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again
ethernet@fe2a0000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
phy_startup() failed: -110
FAILED: -110
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again
=> mmc info
Device: mmc@fe310000
Manufacturer ID: 70
OEM: 0
Name: Y29128
Bus Speed: 200000000
Mode: HS200 (200MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 116.6 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 116.6 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected
=> part list mmc 0

Partition Map for mmc device 0  --   Partition Type: EFI

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00004000      0x00007fff      "uboot"
        attrs:  0x0000000000000000
        type:   e3c9e316-0b5c-4db8-817d-f92df00215ae
        guid:   ccf27e7d-b886-4cc8-815a-f5395b4e324c
  2     0x00008000      0x0000ffff      "hassos-boot"
        attrs:  0x0000000000000000
        type:   c12a7328-f81f-11d2-ba4b-00a0c93ec93b
        guid:   b3dd0952-733c-4c88-8cba-cab9b8b4377f
  3     0x00010000      0x0001bfff      "hassos-kernel0"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   26700fc6-b0bc-4ccf-9837-ea1a4cba3e65
  4     0x0001c000      0x0009bfff      "hassos-system0"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   8d3d53e3-6d49-4c38-8349-aff6859e82fd
  5     0x0009c000      0x000a7fff      "hassos-kernel1"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   fc02a4f0-5350-406f-93a2-56cbed636b5f
  6     0x000a8000      0x00127fff      "hassos-system1"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   a3ec664e-32ce-4665-95ea-7ae90ce9aa20
  7     0x00128000      0x0012bfff      "hassos-bootstate"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   33236519-7f32-4dff-8002-3390b62c309d
  8     0x0012c000      0x0015bfff      "hassos-overlay"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   f1326040-5236-40eb-b683-aaa100a9afcf
  9     0x0015c000      0x003dbfff      "hassos-data"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   a52a4597-fa3a-4851-aefd-2fbe9f849079
=> ls ?
** No device specified **
Couldn't find partition ? <NULL>
=> ? ls
ls - list files in a directory (default /)

Usage:
ls <interface> [<dev[:part]> [directory]]
    - List files in directory 'directory' of partition 'part' on
      device type 'interface' instance 'dev'.
=> ls mmc 0:2
     3471   boot.scr
       13   cmdline.txt
        0   haos-config.txt
   118453   rk3568-odroid-m1.dtb
      496   ubootefi.var

5 file(s), 0 dir(s)

=> ls mmc 0:1
=> ls mmc 0:1 /
=> ls mmc 0:3
 30921216   Image

1 file(s), 0 dir(s)

=> ls mmc 0:4
=> ls mmc 0:5
=> ls mmc 0:6
=> ls mmc 0:6 /
=> ls mmc 0:7
=> ls mmc 0:8
            ./
            ../
            lost+found/

0 file(s), 3 dir(s)

=> ls mmc 0:9
            ./
            ../
            lost+found/
            docker/
            supervisor/

0 file(s), 5 dir(s)

=>

@rpardini
Copy link
Member Author

rpardini commented Feb 9, 2025

Ok. Since your device can

  • talk to the eMMC / SD correctly
  • list partitions correctly
  • list files in FAT32 filesystem correctly

in my understanding there is no reason why this wouldn't frakking boot the boot.scr that is right there.

Unless... you've instructed it to not do that, in the SPI environment. Could you please capture the full output of running

printenv

please?

@iav
Copy link
Contributor

iav commented Feb 9, 2025

=> printenv
arch=arm
armbian=once
baudrate=1500000
board=odroid_m1
board_name=odroid_m1
boot_targets=usb mmc1 mmc0 nvme scsi pxe dhcp spi
bootcmd=bootflow scan
bootdelay=2
cpu=armv8
cpuid#=5448484e363600000000000000101013
cramfsaddr=0x0c000000
eth1addr=3e:d5:e1:3e:22:ba
ethact=ethernet@fe2a0000
ethaddr=3e:d5:e1:3e:22:bb
fdt_addr_r=0x0a100000
fdtcontroladdr=edeaf4b0
fdtfile=rockchip/rk3568-odroid-m1.dtb
fdtoverlay_addr_r=0x02000000
kernel_addr_r=0x02080000
kernel_comp_addr_r=0x08000000
kernel_comp_size=0x2000000
loadaddr=0xc00800
mtdparts=nor0:0x100000(reserved),0x200000(uboot),0x100000(splash),0xc00000(Firmware)
partitions=uuid_disk=${uuid_gpt_disk};name=loader1,start=32K,size=4000K,uuid=${uuid_gpt_loader1};name=loader2,start=8MB,size=4MB,uuid=${uuid_gpt_loader2};name=trust,size=4M,uuid=${uuid_gpt_atf};name=boot,size=112M,bootable,uuid=${uuid_gpt_boot};name=rootfs,size=-,uuid=B921B045-1DF0-41C3-AF44-4C6F280D3FAE;
preboot=echo armbian leds; led led-0 on; led led-1 on; sleep 0.1; led led-0 off; led led-1 off; sleep 0.1; led led-0 on; if test "${armbian}" = "once"; then echo armbian env already set once; else echo armbian resetting environment once; setenv armbian once; saveenv; fi
pxefile_addr_r=0x00e00000
ramdisk_addr_r=0x0a200000
script_offset_f=0xffe000
script_size_f=0x2000
scriptaddr=0x00c00000
serial#=XXremovedXXX
soc=rk3568
stderr=serial@fe660000
stdin=serial@fe660000
stdout=serial@fe660000
vendor=hardkernel
ver=U-Boot 2025.01-armbian-2025.01-S6d41-Pfda2-H4cab-V390e-Bb703-R448a-dirty (Feb 06 2025 - 18:35:07 +0000)

Environment size: 1537/131068 bytes
=>

@rpardini
Copy link
Member Author

rpardini commented Feb 9, 2025

Hmm, your env says boot_targets=usb mmc1 mmc0 nvme scsi pxe dhcp spi -- thus it should indeed boot the eMMC using std boot. It would scan all partitions for boot.scr (and extlinux.conf) in both / and /boot of each partition.

I am, in case you've not noticed, completely at a loss here.

Maybe someone more knowledgeable will spot this and help.

I don't wanna invoke Jonas with a mention -- yet -- but also dunno what else to try.

Maybe, if you keep everything else as-is and downgrade BOOTBRANCH to 2024.04 (or whatever is the last working one; keep BOOTPATCHDIR so it picks up the patch for fileenv) we can at least finish this saga with "some crazy happened upstream which affects only some boards/users".

@rpardini
Copy link
Member Author

rpardini commented Feb 9, 2025

Also, maybe try interrupting "Hit any key to stop autoboot" and do:

setenv boot_targets mmc0
boot

to see if it reveals any more? maybe it is the USB scan that is somehow frakking up things.

@rpardini
Copy link
Member Author

rpardini commented Feb 9, 2025

maybe it is the USB scan that is somehow frakking up things

This is highly likely. I see now that the default I used in the board file is
declare -a rockchip_uboot_targets=("mmc1" "nvme" "scsi" "usb" "mmc0" "pxe" "dhcp" "spi")

thus you have manually changed to boot USB first in your environment? That might be affecting things...?

@rpardini
Copy link
Member Author

rpardini commented Feb 9, 2025

Do you have USB devices plugged in when testing? :-D Maybe try without...

@iav
Copy link
Contributor

iav commented Feb 9, 2025

Do you have USB devices plugged in when testing?

no one, even usb wifi pulled out.

@iav
Copy link
Contributor

iav commented Feb 9, 2025

Also, maybe try interrupting "Hit any key to stop autoboot" and do:

setenv boot_targets mmc0
boot
Hit any key to stop autoboot:  0
=> mmc info
Device: mmc@fe310000
Manufacturer ID: 70
OEM: 0
Name: Y29128
Bus Speed: 200000000
Mode: HS200 (200MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 116.6 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 116.6 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected
=> setenv boot_targets mmc0
=> boot
Card did not respond to voltage select! : -110

@iav
Copy link
Contributor

iav commented Feb 9, 2025

thus you have manually changed to boot USB first in your environment? That might be affecting things...?

no. I can't remember anything like that. I have no knowledge about uBoot and newer tune it.

@iav
Copy link
Contributor

iav commented Feb 9, 2025

Maybe, if you keep everything else as-is and downgrade BOOTBRANCH to 2024.04 (or whatever is the last working one; keep BOOTPATCHDIR so it picks up the patch for fileenv) we can at least finish this saga

I set BOARD=odroidm1 build BOOTBRANCH=2024.04 into build command, but got an error

[🐳|🌱] artifact [ uboot :: uboot() ]
[🐳|🌱] Producing new & caching [ GIT_INFO_UBOOT ]
[🐳|💥] error! [ Error in configuration; git_ref '2024.04' is not valid  ]
[🐳|💥] Exiting with error 43 [ at /armbian/lib/functions/logging/traps.sh:1

(complete https://paste.next.armbian.com/owizexuvor)

@rpardini
Copy link
Member Author

Yeah, no idea then. Other than your FAT32 boot.scr being corrupted somehow, I can't imagine what else could be wrong.

@iav
Copy link
Contributor

iav commented Feb 10, 2025

We need more testers.

@igorpecovnik igorpecovnik added the Help needed We need your involvement label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
02 Milestone: First quarter release Hardware Hardware related like kernel, U-Boot, ... Help needed We need your involvement Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/medium PR with more then 50 and less then 250 lines
Development

Successfully merging this pull request may close these issues.

3 participants