Skip to content

[DNM] WIP: Initial fastboot support#48

Open
Dominduchami wants to merge 1 commit intomainfrom
exp-fastboot-dirty
Open

[DNM] WIP: Initial fastboot support#48
Dominduchami wants to merge 1 commit intomainfrom
exp-fastboot-dirty

Conversation

@Dominduchami
Copy link
Copy Markdown

This is mostly to see the changes because I also did a lot of unrelated changes that I want to remove

@Dominduchami Dominduchami changed the title Exp fastboot dirty [DNM] WIP: Initial fastboot support Mar 21, 2026
.product = "LEO EDK2",
};

#define MEMBASE 0x28000000
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this dynamic from PCD

{
fastboot_register("boot", cmd_boot);
//fastboot_register("continue", cmd_continue);
fastboot_register("reboot", cmd_reboot);
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oem redmem/write? Use the mem code
dmesg+smesg?
flashing to sd

@@ -0,0 +1,238 @@
#ifndef __LIBRARY_LKENV_H__
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge to the header in Include

EFI_TPL OriginalTPL;
EFI_STATUS Status = EFI_SUCCESS;

void enter_critical_section(void) {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused sooo

#include <Chipset/irqs.h>
#include <Chipset/interrupts.h>


Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean up includes

return -1;
}

/* create our device descriptor */
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be hardcoded?

Largely based on EFIDroid fastboot implementation
@Dominduchami
Copy link
Copy Markdown
Author

Current status:

  • command "interpreter" works so calling functions from fastboot (for example to reboot) is working fine
  • also getvar works fine
  • HOWEVER booting doesn't work yet, and from what I was able to find out till now I'm pretty sure downloading the binary to ram is faulty (needs further checking)

FastbootRegister("boot", CommandBoot);
FastbootRegister("reboot", CommandReboot);
FastbootPublish("product", "EDK2 LEO");
FastbootPublish("kernel", "lk");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bit nitpicky, but isn't registering this fastboot var as lk incorrect?


FastbootRegister("boot", CommandBoot);
FastbootRegister("reboot", CommandReboot);
FastbootPublish("product", "EDK2 LEO");
Copy link
Copy Markdown

@halal-beef halal-beef Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I guess this variable should be crafted on build time or something similar if intended to be ran on multiple supported devices

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely, getting this from PCD is on my todo list

const char *Info
)
{
FastbootAck("OKAY", Info);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC extra bootloader messages don't get shown on OKAY ack so any info provided through this is discarded by the fastboot client

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx, I'll change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants