Dasharo / dasharo-issues

The Dasharo issue tracker
https://dasharo.com/
24 stars 0 forks source link

SD card is not recognized as bootable #454

Open zollerd opened 1 year ago

zollerd commented 1 year ago

Dasharo version v1.4.0 https://docs.dasharo.com/variants/novacustom_nv4x_tgl/releases/#v140-2023-02-24

Affected component(s) or functionality Booting into kernel stored on SD card

Brief summary I'm unable to boot into Linux from SD card, it seems the card is not recognized. No corresponding menu option is rendered in any place where bootable USB sticks normally show up (alongside the always-present iPXE Network Boot and UEFI Shell):

How reproducible Always.

Steps to reproduce the behavior

  1. Plug bootable SD card into the SD card slot (example partitioning scheme given below)
  2. Power on device
  3. Try one of the options listed in the Brief summary section
  4. Menu entry for the SD card is missing

Expected behavior A menu option for the SD card should be shown, and if chosen, the device should boot into the kernel stored on the card.

Actual behavior No menu option for the SD card is generated, thus it is not possible to boot from SD card.

Additional context

Partitioning scheme: # parted /dev/mmcblk0 -- print (executed from archlinux-2023.06.01-x86_64.iso)

Model: SD SH64G (sd/mmc)
Disk /dev/mmcblk0: 63.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system  Name    Flags
 1      1049kB  512MB  511MB   fat32        ESP     boot, esp
 2      512MB   528MB  16.8MB               header

Dasharo firmware logs SD card plugged in before boot, booting into DTS 1.2.0 using an USB stick plugged into the USB-A port on the right side of the device. cbmem -1: cbmem_1_with_sdcard.log

No SD card plugged in, booting into DTS 1.2.0 using an USB stick plugged into the USB-A port on the right side of the device. cbmem -1: cbmem_1_without_sdcard.log

Additional notes

Happy to collect more information if necessary.

Solutions you've tried

An different SD card with a different partitioning scheme (MBR-based) is also not recognized (this is archlinux-2023.06.01-x86_64.iso flashed to the card, which works via a USB stick):

Model: SD SH64G (sd/mmc)
Disk /dev/mmcblk0: 63.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start  End    Size    Type     File system  Flags
 2      813MB  828MB  15.7MB  primary  fat16        esp
zollerd commented 1 year ago

I did get the lines GPE0 STD STS: eSPI and gpe0_sts[3]: 00004000 gpe0_en[3]: 00000000 once without an SD card as you can see in the given logs (I'm pretty sure I didn't mix this up...). But I can't seem to reproduce it now, the former line was always absent in subsequent cycles, the latter was always gpe0_sts[3]: 00000000 gpe0_en[3]: 00000000, SD card inserted or not.

miczyg1 commented 1 year ago

Thank you for submitting the issue.

GPE0 is just waking status bits, probably not relevant here

miczyg1 commented 1 year ago

From what I have investigated so far on other laptops, the SD card controller returns timeout and the SD card cannot be initialized. So there may be something needed for the SD controller initialization before it can enumerate the card...

miczyg1 commented 2 months ago

Not sure why I closed it as one of the comments in the PR of edk2 says it does not fix the problem...

Reopening with some more pointers. There are patches for the BayHub SD card readers for edk2: https://edk2.groups.io/g/devel/message/100548 which may be needed to get the SD boot capability.