[UEFI][Bootloader]EDK II port for sagit

Search This thread

fxsheep

Senior Member
May 26, 2017
404
554
Xiaomi Redmi 2
Xiaomi Mi 9
An explain goes first:
This may surprise a lot of people ,"Whaaaat ? Isn't UEFI a kind of BIOS on PC?"Well, it can also be on your phone too , in fact.

This is an EDK II (UEFI) port for MI 6.Currently it's incomplete,and how much it will be in the future depends on whether I have enough time.

What is this port for?
This is an UEFI port, so there are many possibilities. As a second-stage bootloader, it can boot any ARM64 OSes that support UEFI.
But at this point, only Linux is capable.Windows booting still need more efforts.

See Github README.md for more details.

Download:
Only source is provided since it's not completed.
Source: https://github.com/fxsheep/edk2-sagit
 

ccelik97

Senior Member
Feb 22, 2015
199
96
Thanks for the source and btw, @vantoman has built it yesterday and I tried it (fastboot boot uefi.img), it starts up and shows a grub shell just fine. But I couldn't figure out the way to input anything to there (tried usb otg keyboard but nope, not even the usb port outputs power lol). But to me, this is a proof of concept so, if we can help in any ways, please let us know ?
 

fxsheep

Senior Member
May 26, 2017
404
554
Xiaomi Redmi 2
Xiaomi Mi 9
Thanks for the source and btw, @vantoman has built it yesterday and I tried it (fastboot boot uefi.img), it starts up and shows a grub shell just fine. But I couldn't figure out the way to input anything to there (tried usb otg keyboard but nope, not even the usb port outputs power lol). But to me, this is a proof of concept so, if we can help in any ways, please let us know ?
That's right as USB OTG hasn't been implemented yet.And probably it won't be easily.Basically I use drivers extracted from the device's XBL.While the OTG isn't probably even exist in that, I just wonder if it's possible.Maybe the bios from some SD835 laptops will help though.
 

ccelik97

Senior Member
Feb 22, 2015
199
96
That's right as USB OTG hasn't been implemented yet.And probably it won't be easily.Basically I use drivers extracted from the device's XBL.While the OTG isn't probably even exist in that, I just wonder if it's possible.Maybe the bios from some SD835 laptops will help though.
Hmmm, right.. Tell me if I can help you in any ways then ?

---------- Post added at 12:47 PM ---------- Previous post was at 12:46 PM ----------

Anyway input isn't necessary for GRUB2 to boot a linux kernel:)
Yeah :D But streamlining the installation processes etc (but yeah, üt could be done after getting the more important parts to work).
 
  • Like
Reactions: degdag new dev

fxsheep

Senior Member
May 26, 2017
404
554
Xiaomi Redmi 2
Xiaomi Mi 9
Hmmm, right.. Tell me if I can help you in any ways then ?

---------- Post added at 12:47 PM ---------- Previous post was at 12:46 PM ----------


Yeah :D But streamlining the installation processes etc (but yeah, üt could be done after getting the more important parts to work).
You can do all the installation process on your PC instead on phone.Just use a chroot environment.
Mount the phone's storage to PC using mass_storage in Android kernel.
 
  • Like
Reactions: ccelik97

leo.sfsm

New member
Mar 20, 2018
1
0
Just to know about the possibilities and implications:
Could it be possible to multiboot some day?
And something like the efidroid project?
 

fxsheep

Senior Member
May 26, 2017
404
554
Xiaomi Redmi 2
Xiaomi Mi 9
Just to know about the possibilities and implications:
Could it be possible to multiboot some day?
And something like the efidroid project?
If you are asking about 'possibilities', then of course, it is possible,by porting EFIDroid multiboot components to ARM64.
(Yeah nothing is impossible, even Windows 10 Desktop.There's already working SoC drivers available and touchscreen driver is probably also available ,since MI6 has synaptics_dsx ,the same as Lumia950XL)

But again, it needs countless efforts, especially UEFI part, and that's currently out of my reach.
 
Aug 13, 2013
29
5
Thanks for the source bro , but , anyone know how to debug ? Cas there's no input avalaible on the shell , no usb output or input ...? Anyone help
edit: i can boot the last manline ubuntu kernel 5.4-arm64 to the initeamfs ;) no kernel panic:D
usin a startup.nsh script uder the root of firmware partition
the txt file attatched rename it to startup.nsh and place it to /vendor/firmware_mnt/startup.nsh
and place your initrd to /vendor/firmware_mnt/initrd.img
copy your vmlinuz to /vendor/firmware_mnt/efi/boot/vmlinuz.efi
reboot to fastboot than fastboot boot uefi.img
 

Attachments

  • startup.txt
    48 bytes · Views: 87
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 26
    An explain goes first:
    This may surprise a lot of people ,"Whaaaat ? Isn't UEFI a kind of BIOS on PC?"Well, it can also be on your phone too , in fact.

    This is an EDK II (UEFI) port for MI 6.Currently it's incomplete,and how much it will be in the future depends on whether I have enough time.

    What is this port for?
    This is an UEFI port, so there are many possibilities. As a second-stage bootloader, it can boot any ARM64 OSes that support UEFI.
    But at this point, only Linux is capable.Windows booting still need more efforts.

    See Github README.md for more details.

    Download:
    Only source is provided since it's not completed.
    Source: https://github.com/fxsheep/edk2-sagit
    3
    UPDATE 20200331
    Added a few DXE Drivers (blob) extracted from XBL.
    Keypad still not working but much more underlying stuffs are wokring now.TL.DR. one step towards it.
    2
    Thanks for the source and btw, @vantoman has built it yesterday and I tried it (fastboot boot uefi.img), it starts up and shows a grub shell just fine. But I couldn't figure out the way to input anything to there (tried usb otg keyboard but nope, not even the usb port outputs power lol). But to me, this is a proof of concept so, if we can help in any ways, please let us know ?
    2
    Thanks for the source and btw, @vantoman has built it yesterday and I tried it (fastboot boot uefi.img), it starts up and shows a grub shell just fine. But I couldn't figure out the way to input anything to there (tried usb otg keyboard but nope, not even the usb port outputs power lol). But to me, this is a proof of concept so, if we can help in any ways, please let us know ?
    That's right as USB OTG hasn't been implemented yet.And probably it won't be easily.Basically I use drivers extracted from the device's XBL.While the OTG isn't probably even exist in that, I just wonder if it's possible.Maybe the bios from some SD835 laptops will help though.