This is a UEFI only device where openSUSE does not boot, hanging after loading the kernel and the initramfs even disabling secure boot.

The goal of this project is to learn as much as possible about UEFI, secure boot and finally install openSUSE on this device.

Looking for hackers with the skills:

uefi

This project is part of:

Hack Week 16

Activity

  • about 7 years ago: scabrero added keyword "uefi" to this project.
  • about 7 years ago: scabrero started this project.
  • about 7 years ago: scabrero originated this project.

  • Comments

    • scabrero
      about 7 years ago by scabrero | Reply

      Hackweek result

      Success. I have learned about UEFI and installed Tumbleweed in this machine. The problem is not related to secure boot, the bootloader neither the kernel EFI stub loader. It seems to be just a buggy UEFI firmware implementation on this machine.

      Boot problem

      When booting the kernel through the EFI handover protocol, the UEFI stub loader queries the firmware to find the devices implementing the PCI IO protocol and checks if any device provides a ROM image not available through the PCI ROM BAR to make a copy of it as it won't be available after exiting UEFI boot services. The problem is that the returned data structures from the firmware to the stub loader contains invalid values in the RomSize and RomImage fields, so the kernel hangs trying to memcpy the rom. Even more surprising, the attributes returned for all PCI devices have the EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM set, which means that the PCI option ROM described by the RomImage and RomSize fields is not from ROM BAR of the PCI controller.

      These are the returned values from the firmware for all device handles implementing the PCI IO protocol:

      RomImage=77D334934 RomSize=0
      RomImage=77D334934 RomSize=767CBA98 Attributes=4700
      RomImage=77D334934 RomSize=767CB718 Attributes=4600
      RomImage=77D334934 RomSize=767CB398 Attributes=4700
      RomImage=77D334934 RomSize=767CB018 Attributes=4600
      RomImage=77D334934 RomSize=767CAA98 Attributes=4600
      RomImage=77D334934 RomSize=767CA718 Attributes=4600
      RomImage=77D334934 RomSize=767CA398 Attributes=4600
      RomImage=77D334934 RomSize=767CA018 Attributes=4600
      RomImage=77D334934 RomSize=767C9A98 Attributes=4600
      RomImage=77D334934 RomSize=767C9718 Attributes=4600
      RomImage=77D334934 RomSize=767C9398 Attributes=4600
      RomImage=77D334934 RomSize=767C9018 Attributes=4600
      RomImage=77D334934 RomSize=767C7A98 Attributes=4600
      RomImage=77D334934 RomSize=767C7718 Attributes=4600
      RomImage=77D334934 RomSize=767C7398 Attributes=4600
      RomImage=77D334934 RomSize=767C7018 Attributes=4600
      RomImage=77D334934 RomSize=767C6A98 Attributes=4600
      RomImage=77D334934 RomSize=767C6718 Attributes=4600
      RomImage=77D334934 RomSize=767C6398 Attributes=4600
      RomImage=77D334934 RomSize=767C6018 Attributes=4600
      RomImage=77D334934 RomSize=767C5A98 Attributes=4600
      RomImage=77D334934 RomSize=767C5718 Attributes=4600
      RomImage=77D334934 RomSize=767C5398 Attributes=4600
      RomImage=77D334934 RomSize=767C5018 Attributes=4600
      RomImage=77D334934 RomSize=7678DA98 Attributes=4700
      

      To workaroung the firmware issues, I have built a grub binary which includes the regular linux and initrd commands and modified the entries in grub.conf to use them istead of their 'efi' variant. To preserve this changes across updates it is also necessary to change to false the variable GRUB_USE_LINUXEFI in /etc/default/grub.

      Display

      Another issue in this machine is that the display is 90º rotated clockwise, so it is necessary to add the orientation matrix for iio-sensor-proxy creating a file in /etc/udev/hwdb.d/61-sensor-local.hwdb:

      sensor:modalias:acpi:*KIOX000A*:dmi:*svn*LENOVO:*pn*80SG*
       ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, -1; 0, 0, 1
      

      To be done

      • The snd-hdmi-intel-lpe module has to be blacklisted, otherwise pulseaudio is killed

      • Bluetooth is not detected.

      • Webcam is not detected.

    Similar Projects

    This project is one of its kind!